uuagc 0.9.30 → 0.9.31
raw patch · 30 files changed
+30619/−30824 lines, 30 files
Files
- src-derived/AbstractSyntax.hs +1/−1
- src-derived/AbstractSyntaxDump.hs +89/−103
- src-derived/Code.hs +1/−1
- src-derived/CodeSyntax.hs +1/−1
- src-derived/CodeSyntaxDump.hs +89/−103
- src-derived/ConcreteSyntax.hs +1/−1
- src-derived/DeclBlocks.hs +1/−1
- src-derived/DefaultRules.hs +2394/−2409
- src-derived/Desugar.hs +2519/−2540
- src-derived/ErrorMessages.hs +1/−1
- src-derived/Expression.hs +1/−1
- src-derived/GenerateCode.hs +7191/−7207
- src-derived/HsToken.hs +1/−1
- src-derived/Interfaces.hs +1/−1
- src-derived/InterfacesRules.hs +1223/−1237
- src-derived/Order.hs +5009/−5023
- src-derived/Patterns.hs +1/−1
- src-derived/PrintCode.hs +3661/−3679
- src-derived/PrintErrorMessages.hs +102/−104
- src-derived/PrintOcamlCode.hs +2053/−2071
- src-derived/PrintVisitCode.hs +76/−92
- src-derived/SemHsTokens.hs +75/−78
- src-derived/TfmToVisage.hs +99/−113
- src-derived/Transform.hs +5964/−5978
- src-derived/Visage.hs +60/−72
- src-derived/VisagePatterns.hs +1/−1
- src-derived/VisageSyntax.hs +1/−1
- src/Version.hs +1/−1
- uuagc.cabal +1/−1
- uuagc.cabal-for-ghc-6.6 +1/−1
src-derived/AbstractSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (AbstractSyntax.ag)+-- UUAGC 0.9.30 (AbstractSyntax.ag) module AbstractSyntax where {-# LINE 2 "AbstractSyntax.ag" #-}
src-derived/AbstractSyntaxDump.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (AbstractSyntaxDump.ag)+-- UUAGC 0.9.30 (AbstractSyntaxDump.ag) module AbstractSyntaxDump where {-# LINE 6 "AbstractSyntaxDump.ag" #-} @@ -62,8 +62,7 @@ Inh_Child -> Syn_Child wrap_Child (T_Child sem ) (Inh_Child ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_Child _lhsOpp )) sem_Child_Child :: Identifier -> Type ->@@ -77,7 +76,7 @@ _lhsOpp = ({-# LINE 35 "AbstractSyntaxDump.ag" #-} ppNestInfo ["Child","Child"] [pp name_, ppShow tp_] [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_] []- {-# LINE 81 "AbstractSyntaxDump.hs" #-})+ {-# LINE 80 "AbstractSyntaxDump.hs" #-}) in ( _lhsOpp)) ) -- Children ---------------------------------------------------- {-@@ -104,8 +103,7 @@ Inh_Children -> Syn_Children wrap_Children (T_Children sem ) (Inh_Children ) =- (let ( _lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOpp,_lhsOppL) = sem in (Syn_Children _lhsOpp _lhsOppL )) sem_Children_Cons :: T_Child -> T_Children ->@@ -120,16 +118,16 @@ _lhsOppL = ({-# LINE 67 "AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 124 "AbstractSyntaxDump.hs" #-})+ {-# LINE 122 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 129 "AbstractSyntaxDump.hs" #-})+ {-# LINE 127 "AbstractSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOpp,_lhsOppL)) ) sem_Children_Nil :: T_Children sem_Children_Nil =@@ -139,12 +137,12 @@ _lhsOppL = ({-# LINE 68 "AbstractSyntaxDump.ag" #-} []- {-# LINE 143 "AbstractSyntaxDump.hs" #-})+ {-# LINE 141 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} empty- {-# LINE 148 "AbstractSyntaxDump.hs" #-})+ {-# LINE 146 "AbstractSyntaxDump.hs" #-}) in ( _lhsOpp,_lhsOppL)) ) -- Expression -------------------------------------------------- {-@@ -169,8 +167,7 @@ Inh_Expression -> Syn_Expression wrap_Expression (T_Expression sem ) (Inh_Expression ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_Expression _lhsOpp )) sem_Expression_Expression :: Pos -> ([HsToken]) ->@@ -181,7 +178,7 @@ _lhsOpp = ({-# LINE 50 "AbstractSyntaxDump.ag" #-} ppNestInfo ["Expression","Expression"] [ppShow pos_] [ppF "txt" $ vlist . showTokens . tokensToStrings $ tks_] []- {-# LINE 185 "AbstractSyntaxDump.hs" #-})+ {-# LINE 182 "AbstractSyntaxDump.hs" #-}) in ( _lhsOpp)) ) -- Grammar ----------------------------------------------------- {-@@ -217,8 +214,7 @@ Inh_Grammar -> Syn_Grammar wrap_Grammar (T_Grammar sem ) (Inh_Grammar ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_Grammar _lhsOpp )) sem_Grammar_Grammar :: TypeSyns -> UseMap ->@@ -248,9 +244,9 @@ , ppF "wrappers" $ ppShow $ wrappers_ , ppF "nonts" $ ppVList _nontsIppL ] []- {-# LINE 252 "AbstractSyntaxDump.hs" #-})+ {-# LINE 248 "AbstractSyntaxDump.hs" #-}) ( _nontsIpp,_nontsIppL) =- (nonts_ )+ nonts_ in ( _lhsOpp)) ) -- Nonterminal ------------------------------------------------- {-@@ -278,8 +274,7 @@ Inh_Nonterminal -> Syn_Nonterminal wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_Nonterminal _lhsOpp )) sem_Nonterminal_Nonterminal :: NontermIdent -> ([Identifier]) ->@@ -295,9 +290,9 @@ _lhsOpp = ({-# LINE 29 "AbstractSyntaxDump.ag" #-} ppNestInfo ["Nonterminal","Nonterminal"] (pp nt_ : map pp params_) [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "prods" $ ppVList _prodsIppL] []- {-# LINE 299 "AbstractSyntaxDump.hs" #-})+ {-# LINE 294 "AbstractSyntaxDump.hs" #-}) ( _prodsIpp,_prodsIppL) =- (prods_ )+ prods_ in ( _lhsOpp)) ) -- Nonterminals ------------------------------------------------ {-@@ -324,8 +319,7 @@ Inh_Nonterminals -> Syn_Nonterminals wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals ) =- (let ( _lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOpp,_lhsOppL) = sem in (Syn_Nonterminals _lhsOpp _lhsOppL )) sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals ->@@ -340,16 +334,16 @@ _lhsOppL = ({-# LINE 75 "AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 344 "AbstractSyntaxDump.hs" #-})+ {-# LINE 338 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 349 "AbstractSyntaxDump.hs" #-})+ {-# LINE 343 "AbstractSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOpp,_lhsOppL)) ) sem_Nonterminals_Nil :: T_Nonterminals sem_Nonterminals_Nil =@@ -359,12 +353,12 @@ _lhsOppL = ({-# LINE 76 "AbstractSyntaxDump.ag" #-} []- {-# LINE 363 "AbstractSyntaxDump.hs" #-})+ {-# LINE 357 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} empty- {-# LINE 368 "AbstractSyntaxDump.hs" #-})+ {-# LINE 362 "AbstractSyntaxDump.hs" #-}) in ( _lhsOpp,_lhsOppL)) ) -- Pattern ----------------------------------------------------- {-@@ -420,8 +414,7 @@ Inh_Pattern -> Syn_Pattern wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOpp) =- (sem )+ (let ( _lhsOcopy,_lhsOpp) = sem in (Syn_Pattern _lhsOcopy _lhsOpp )) sem_Pattern_Alias :: Identifier -> Identifier ->@@ -440,21 +433,21 @@ _lhsOpp = ({-# LINE 46 "AbstractSyntaxDump.ag" #-} ppNestInfo ["Pattern","Alias"] [pp field_, pp attr_] [ppF "pat" $ _patIpp] []- {-# LINE 444 "AbstractSyntaxDump.hs" #-})+ {-# LINE 437 "AbstractSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 449 "AbstractSyntaxDump.hs" #-})+ {-# LINE 442 "AbstractSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 454 "AbstractSyntaxDump.hs" #-})+ {-# LINE 447 "AbstractSyntaxDump.hs" #-}) ( _patIcopy,_patIpp) =- (pat_ )+ pat_ ( _partsIcopy,_partsIpp,_partsIppL) =- (parts_ )+ parts_ in ( _lhsOcopy,_lhsOpp)) ) sem_Pattern_Constr :: ConstructorIdent -> T_Patterns ->@@ -469,19 +462,19 @@ _lhsOpp = ({-# LINE 44 "AbstractSyntaxDump.ag" #-} ppNestInfo ["Pattern","Constr"] [pp name_] [ppF "pats" $ ppVList _patsIppL] []- {-# LINE 473 "AbstractSyntaxDump.hs" #-})+ {-# LINE 466 "AbstractSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Constr name_ _patsIcopy- {-# LINE 478 "AbstractSyntaxDump.hs" #-})+ {-# LINE 471 "AbstractSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 483 "AbstractSyntaxDump.hs" #-})+ {-# LINE 476 "AbstractSyntaxDump.hs" #-}) ( _patsIcopy,_patsIpp,_patsIppL) =- (pats_ )+ pats_ in ( _lhsOcopy,_lhsOpp)) ) sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern @@ -494,19 +487,19 @@ _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} _patIpp- {-# LINE 498 "AbstractSyntaxDump.hs" #-})+ {-# LINE 491 "AbstractSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Irrefutable _patIcopy- {-# LINE 503 "AbstractSyntaxDump.hs" #-})+ {-# LINE 496 "AbstractSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 508 "AbstractSyntaxDump.hs" #-})+ {-# LINE 501 "AbstractSyntaxDump.hs" #-}) ( _patIcopy,_patIpp) =- (pat_ )+ pat_ in ( _lhsOcopy,_lhsOpp)) ) sem_Pattern_Product :: Pos -> T_Patterns ->@@ -521,19 +514,19 @@ _lhsOpp = ({-# LINE 45 "AbstractSyntaxDump.ag" #-} ppNestInfo ["Pattern","Product"] [ppShow pos_] [ppF "pats" $ ppVList _patsIppL] []- {-# LINE 525 "AbstractSyntaxDump.hs" #-})+ {-# LINE 518 "AbstractSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Product pos_ _patsIcopy- {-# LINE 530 "AbstractSyntaxDump.hs" #-})+ {-# LINE 523 "AbstractSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 535 "AbstractSyntaxDump.hs" #-})+ {-# LINE 528 "AbstractSyntaxDump.hs" #-}) ( _patsIcopy,_patsIpp,_patsIppL) =- (pats_ )+ pats_ in ( _lhsOcopy,_lhsOpp)) ) sem_Pattern_Underscore :: Pos -> T_Pattern @@ -544,17 +537,17 @@ _lhsOpp = ({-# LINE 47 "AbstractSyntaxDump.ag" #-} ppNestInfo ["Pattern","Underscore"] [ppShow pos_] [] []- {-# LINE 548 "AbstractSyntaxDump.hs" #-})+ {-# LINE 541 "AbstractSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Underscore pos_- {-# LINE 553 "AbstractSyntaxDump.hs" #-})+ {-# LINE 546 "AbstractSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 558 "AbstractSyntaxDump.hs" #-})+ {-# LINE 551 "AbstractSyntaxDump.hs" #-}) in ( _lhsOcopy,_lhsOpp)) ) -- Patterns ---------------------------------------------------- {-@@ -586,8 +579,7 @@ Inh_Patterns -> Syn_Patterns wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOcopy,_lhsOpp,_lhsOppL) = sem in (Syn_Patterns _lhsOcopy _lhsOpp _lhsOppL )) sem_Patterns_Cons :: T_Pattern -> T_Patterns ->@@ -605,26 +597,26 @@ _lhsOppL = ({-# LINE 55 "AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 609 "AbstractSyntaxDump.hs" #-})+ {-# LINE 601 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 614 "AbstractSyntaxDump.hs" #-})+ {-# LINE 606 "AbstractSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} (:) _hdIcopy _tlIcopy- {-# LINE 619 "AbstractSyntaxDump.hs" #-})+ {-# LINE 611 "AbstractSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 624 "AbstractSyntaxDump.hs" #-})+ {-# LINE 616 "AbstractSyntaxDump.hs" #-}) ( _hdIcopy,_hdIpp) =- (hd_ )+ hd_ ( _tlIcopy,_tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOcopy,_lhsOpp,_lhsOppL)) ) sem_Patterns_Nil :: T_Patterns sem_Patterns_Nil =@@ -635,22 +627,22 @@ _lhsOppL = ({-# LINE 56 "AbstractSyntaxDump.ag" #-} []- {-# LINE 639 "AbstractSyntaxDump.hs" #-})+ {-# LINE 631 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} empty- {-# LINE 644 "AbstractSyntaxDump.hs" #-})+ {-# LINE 636 "AbstractSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} []- {-# LINE 649 "AbstractSyntaxDump.hs" #-})+ {-# LINE 641 "AbstractSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 654 "AbstractSyntaxDump.hs" #-})+ {-# LINE 646 "AbstractSyntaxDump.hs" #-}) in ( _lhsOcopy,_lhsOpp,_lhsOppL)) ) -- Production -------------------------------------------------- {-@@ -677,8 +669,7 @@ Inh_Production -> Syn_Production wrap_Production (T_Production sem ) (Inh_Production ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_Production _lhsOpp )) sem_Production_Production :: ConstructorIdent -> T_Children ->@@ -697,13 +688,13 @@ _lhsOpp = ({-# LINE 32 "AbstractSyntaxDump.ag" #-} ppNestInfo ["Production","Production"] [pp con_] [ppF "children" $ ppVList _childrenIppL,ppF "rules" $ ppVList _rulesIppL,ppF "typeSigs" $ ppVList _typeSigsIppL] []- {-# LINE 701 "AbstractSyntaxDump.hs" #-})+ {-# LINE 692 "AbstractSyntaxDump.hs" #-}) ( _childrenIpp,_childrenIppL) =- (children_ )+ children_ ( _rulesIpp,_rulesIppL) =- (rules_ )+ rules_ ( _typeSigsIpp,_typeSigsIppL) =- (typeSigs_ )+ typeSigs_ in ( _lhsOpp)) ) -- Productions ------------------------------------------------- {-@@ -730,8 +721,7 @@ Inh_Productions -> Syn_Productions wrap_Productions (T_Productions sem ) (Inh_Productions ) =- (let ( _lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOpp,_lhsOppL) = sem in (Syn_Productions _lhsOpp _lhsOppL )) sem_Productions_Cons :: T_Production -> T_Productions ->@@ -746,16 +736,16 @@ _lhsOppL = ({-# LINE 71 "AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 750 "AbstractSyntaxDump.hs" #-})+ {-# LINE 740 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 755 "AbstractSyntaxDump.hs" #-})+ {-# LINE 745 "AbstractSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOpp,_lhsOppL)) ) sem_Productions_Nil :: T_Productions sem_Productions_Nil =@@ -765,12 +755,12 @@ _lhsOppL = ({-# LINE 72 "AbstractSyntaxDump.ag" #-} []- {-# LINE 769 "AbstractSyntaxDump.hs" #-})+ {-# LINE 759 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} empty- {-# LINE 774 "AbstractSyntaxDump.hs" #-})+ {-# LINE 764 "AbstractSyntaxDump.hs" #-}) in ( _lhsOpp,_lhsOppL)) ) -- Rule -------------------------------------------------------- {-@@ -799,8 +789,7 @@ Inh_Rule -> Syn_Rule wrap_Rule (T_Rule sem ) (Inh_Rule ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_Rule _lhsOpp )) sem_Rule_Rule :: (Maybe Identifier) -> T_Pattern ->@@ -818,11 +807,11 @@ _lhsOpp = ({-# LINE 38 "AbstractSyntaxDump.ag" #-} ppNestInfo ["Rule","Rule"] [ppShow owrt_, pp origin_] [ppF "pattern" $ _patternIpp, ppF "rhs" $ _rhsIpp] []- {-# LINE 822 "AbstractSyntaxDump.hs" #-})+ {-# LINE 811 "AbstractSyntaxDump.hs" #-}) ( _patternIcopy,_patternIpp) =- (pattern_ )+ pattern_ ( _rhsIpp) =- (rhs_ )+ rhs_ in ( _lhsOpp)) ) -- Rules ------------------------------------------------------- {-@@ -849,8 +838,7 @@ Inh_Rules -> Syn_Rules wrap_Rules (T_Rules sem ) (Inh_Rules ) =- (let ( _lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOpp,_lhsOppL) = sem in (Syn_Rules _lhsOpp _lhsOppL )) sem_Rules_Cons :: T_Rule -> T_Rules ->@@ -865,16 +853,16 @@ _lhsOppL = ({-# LINE 63 "AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 869 "AbstractSyntaxDump.hs" #-})+ {-# LINE 857 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 874 "AbstractSyntaxDump.hs" #-})+ {-# LINE 862 "AbstractSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOpp,_lhsOppL)) ) sem_Rules_Nil :: T_Rules sem_Rules_Nil =@@ -884,12 +872,12 @@ _lhsOppL = ({-# LINE 64 "AbstractSyntaxDump.ag" #-} []- {-# LINE 888 "AbstractSyntaxDump.hs" #-})+ {-# LINE 876 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} empty- {-# LINE 893 "AbstractSyntaxDump.hs" #-})+ {-# LINE 881 "AbstractSyntaxDump.hs" #-}) in ( _lhsOpp,_lhsOppL)) ) -- TypeSig ----------------------------------------------------- {-@@ -914,8 +902,7 @@ Inh_TypeSig -> Syn_TypeSig wrap_TypeSig (T_TypeSig sem ) (Inh_TypeSig ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_TypeSig _lhsOpp )) sem_TypeSig_TypeSig :: Identifier -> Type ->@@ -926,7 +913,7 @@ _lhsOpp = ({-# LINE 41 "AbstractSyntaxDump.ag" #-} ppNestInfo ["TypeSig","TypeSig"] [pp name_, ppShow tp_] [] []- {-# LINE 930 "AbstractSyntaxDump.hs" #-})+ {-# LINE 917 "AbstractSyntaxDump.hs" #-}) in ( _lhsOpp)) ) -- TypeSigs ---------------------------------------------------- {-@@ -953,8 +940,7 @@ Inh_TypeSigs -> Syn_TypeSigs wrap_TypeSigs (T_TypeSigs sem ) (Inh_TypeSigs ) =- (let ( _lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOpp,_lhsOppL) = sem in (Syn_TypeSigs _lhsOpp _lhsOppL )) sem_TypeSigs_Cons :: T_TypeSig -> T_TypeSigs ->@@ -969,16 +955,16 @@ _lhsOppL = ({-# LINE 59 "AbstractSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 973 "AbstractSyntaxDump.hs" #-})+ {-# LINE 959 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 978 "AbstractSyntaxDump.hs" #-})+ {-# LINE 964 "AbstractSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOpp,_lhsOppL)) ) sem_TypeSigs_Nil :: T_TypeSigs sem_TypeSigs_Nil =@@ -988,10 +974,10 @@ _lhsOppL = ({-# LINE 60 "AbstractSyntaxDump.ag" #-} []- {-# LINE 992 "AbstractSyntaxDump.hs" #-})+ {-# LINE 978 "AbstractSyntaxDump.hs" #-}) -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp = ({-# LINE 17 "AbstractSyntaxDump.ag" #-} empty- {-# LINE 997 "AbstractSyntaxDump.hs" #-})+ {-# LINE 983 "AbstractSyntaxDump.hs" #-}) in ( _lhsOpp,_lhsOppL)) )
src-derived/Code.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (Code.ag)+-- UUAGC 0.9.30 (Code.ag) module Code where {-# LINE 2 "Code.ag" #-}
src-derived/CodeSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (CodeSyntax.ag)+-- UUAGC 0.9.30 (CodeSyntax.ag) module CodeSyntax where {-# LINE 2 "CodeSyntax.ag" #-}
src-derived/CodeSyntaxDump.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (CodeSyntaxDump.ag)+-- UUAGC 0.9.30 (CodeSyntaxDump.ag) module CodeSyntaxDump where {-# LINE 5 "CodeSyntaxDump.ag" #-} @@ -86,8 +86,7 @@ Inh_CGrammar -> Syn_CGrammar wrap_CGrammar (T_CGrammar sem ) (Inh_CGrammar ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_CGrammar _lhsOpp )) sem_CGrammar_CGrammar :: TypeSyns -> Derivings ->@@ -112,9 +111,9 @@ , ppF "derivings" $ ppMap $ derivings_ , ppF "nonts" $ ppVList _nontsIppL ] []- {-# LINE 116 "CodeSyntaxDump.hs" #-})+ {-# LINE 115 "CodeSyntaxDump.hs" #-}) ( _nontsIpp,_nontsIppL) =- (nonts_ )+ nonts_ in ( _lhsOpp)) ) -- CInterface -------------------------------------------------- {-@@ -138,8 +137,7 @@ Inh_CInterface -> Syn_CInterface wrap_CInterface (T_CInterface sem ) (Inh_CInterface ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_CInterface _lhsOpp )) sem_CInterface_CInterface :: T_CSegments -> T_CInterface @@ -151,9 +149,9 @@ _lhsOpp = ({-# LINE 57 "CodeSyntaxDump.ag" #-} ppNestInfo ["CInterface","CInterface"] [] [ppF "seg" $ ppVList _segIppL] []- {-# LINE 155 "CodeSyntaxDump.hs" #-})+ {-# LINE 153 "CodeSyntaxDump.hs" #-}) ( _segIpp,_segIppL) =- (seg_ )+ seg_ in ( _lhsOpp)) ) -- CNonterminal ------------------------------------------------ {-@@ -182,8 +180,7 @@ Inh_CNonterminal -> Syn_CNonterminal wrap_CNonterminal (T_CNonterminal sem ) (Inh_CNonterminal ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_CNonterminal _lhsOpp )) sem_CNonterminal_CNonterminal :: NontermIdent -> ([Identifier]) ->@@ -201,11 +198,11 @@ _lhsOpp = ({-# LINE 54 "CodeSyntaxDump.ag" #-} ppNestInfo ["CNonterminal","CNonterminal"] (pp nt_ : map pp params_) [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "prods" $ ppVList _prodsIppL, ppF "inter" _interIpp] []- {-# LINE 205 "CodeSyntaxDump.hs" #-})+ {-# LINE 202 "CodeSyntaxDump.hs" #-}) ( _prodsIpp,_prodsIppL) =- (prods_ )+ prods_ ( _interIpp) =- (inter_ )+ inter_ in ( _lhsOpp)) ) -- CNonterminals ----------------------------------------------- {-@@ -232,8 +229,7 @@ Inh_CNonterminals -> Syn_CNonterminals wrap_CNonterminals (T_CNonterminals sem ) (Inh_CNonterminals ) =- (let ( _lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOpp,_lhsOppL) = sem in (Syn_CNonterminals _lhsOpp _lhsOppL )) sem_CNonterminals_Cons :: T_CNonterminal -> T_CNonterminals ->@@ -248,16 +244,16 @@ _lhsOppL = ({-# LINE 102 "CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 252 "CodeSyntaxDump.hs" #-})+ {-# LINE 248 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 257 "CodeSyntaxDump.hs" #-})+ {-# LINE 253 "CodeSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOpp,_lhsOppL)) ) sem_CNonterminals_Nil :: T_CNonterminals sem_CNonterminals_Nil =@@ -267,12 +263,12 @@ _lhsOppL = ({-# LINE 103 "CodeSyntaxDump.ag" #-} []- {-# LINE 271 "CodeSyntaxDump.hs" #-})+ {-# LINE 267 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} empty- {-# LINE 276 "CodeSyntaxDump.hs" #-})+ {-# LINE 272 "CodeSyntaxDump.hs" #-}) in ( _lhsOpp,_lhsOppL)) ) -- CProduction ------------------------------------------------- {-@@ -299,8 +295,7 @@ Inh_CProduction -> Syn_CProduction wrap_CProduction (T_CProduction sem ) (Inh_CProduction ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_CProduction _lhsOpp )) sem_CProduction_CProduction :: ConstructorIdent -> T_CVisits ->@@ -315,9 +310,9 @@ _lhsOpp = ({-# LINE 63 "CodeSyntaxDump.ag" #-} ppNestInfo ["CProduction","CProduction"] [pp con_] [ppF "visits" $ ppVList _visitsIppL, ppF "children" $ ppVList (map ppChild children_),ppF "terminals" $ ppVList (map ppShow terminals_)] []- {-# LINE 319 "CodeSyntaxDump.hs" #-})+ {-# LINE 314 "CodeSyntaxDump.hs" #-}) ( _visitsIpp,_visitsIppL) =- (visits_ )+ visits_ in ( _lhsOpp)) ) -- CProductions ------------------------------------------------ {-@@ -344,8 +339,7 @@ Inh_CProductions -> Syn_CProductions wrap_CProductions (T_CProductions sem ) (Inh_CProductions ) =- (let ( _lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOpp,_lhsOppL) = sem in (Syn_CProductions _lhsOpp _lhsOppL )) sem_CProductions_Cons :: T_CProduction -> T_CProductions ->@@ -360,16 +354,16 @@ _lhsOppL = ({-# LINE 94 "CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 364 "CodeSyntaxDump.hs" #-})+ {-# LINE 358 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 369 "CodeSyntaxDump.hs" #-})+ {-# LINE 363 "CodeSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOpp,_lhsOppL)) ) sem_CProductions_Nil :: T_CProductions sem_CProductions_Nil =@@ -379,12 +373,12 @@ _lhsOppL = ({-# LINE 95 "CodeSyntaxDump.ag" #-} []- {-# LINE 383 "CodeSyntaxDump.hs" #-})+ {-# LINE 377 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} empty- {-# LINE 388 "CodeSyntaxDump.hs" #-})+ {-# LINE 382 "CodeSyntaxDump.hs" #-}) in ( _lhsOpp,_lhsOppL)) ) -- CRule ------------------------------------------------------- {-@@ -432,8 +426,7 @@ Inh_CRule -> Syn_CRule wrap_CRule (T_CRule sem ) (Inh_CRule ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_CRule _lhsOpp )) sem_CRule_CChildVisit :: Identifier -> NontermIdent ->@@ -448,7 +441,7 @@ _lhsOpp = ({-# LINE 70 "CodeSyntaxDump.ag" #-} ppNestInfo ["CRule","CChildVisit"] [pp name_] [ppF "nt" $ pp nt_, ppF "nr" $ ppShow nr_, ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "last" $ ppBool isLast_] []- {-# LINE 452 "CodeSyntaxDump.hs" #-})+ {-# LINE 445 "CodeSyntaxDump.hs" #-}) in ( _lhsOpp)) ) sem_CRule_CRule :: Identifier -> Bool ->@@ -475,9 +468,9 @@ _lhsOpp = ({-# LINE 69 "CodeSyntaxDump.ag" #-} ppNestInfo ["CRule","CRule"] [pp name_] [ppF "isIn" $ ppBool isIn_, ppF "hasCode" $ ppBool hasCode_, ppF "nt" $ pp nt_, ppF "con" $ pp con_, ppF "field" $ pp field_, ppF "childnt" $ ppMaybeShow childnt_, ppF "tp" $ ppMaybeShow tp_, ppF "pattern" $ if isIn_ then pp "<no pat because In>" else _patternIpp, ppF "rhs" $ ppStrings rhs_, ppF "defines" $ ppVertexMap defines_, ppF "owrt" $ ppBool owrt_, ppF "origin" $ pp origin_] []- {-# LINE 479 "CodeSyntaxDump.hs" #-})+ {-# LINE 472 "CodeSyntaxDump.hs" #-}) ( _patternIcopy,_patternIpp) =- (pattern_ )+ pattern_ in ( _lhsOpp)) ) -- CSegment ---------------------------------------------------- {-@@ -502,8 +495,7 @@ Inh_CSegment -> Syn_CSegment wrap_CSegment (T_CSegment sem ) (Inh_CSegment ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_CSegment _lhsOpp )) sem_CSegment_CSegment :: Attributes -> Attributes ->@@ -514,7 +506,7 @@ _lhsOpp = ({-# LINE 60 "CodeSyntaxDump.ag" #-} ppNestInfo ["CSegment","CSegment"] [] [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_] []- {-# LINE 518 "CodeSyntaxDump.hs" #-})+ {-# LINE 510 "CodeSyntaxDump.hs" #-}) in ( _lhsOpp)) ) -- CSegments --------------------------------------------------- {-@@ -541,8 +533,7 @@ Inh_CSegments -> Syn_CSegments wrap_CSegments (T_CSegments sem ) (Inh_CSegments ) =- (let ( _lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOpp,_lhsOppL) = sem in (Syn_CSegments _lhsOpp _lhsOppL )) sem_CSegments_Cons :: T_CSegment -> T_CSegments ->@@ -557,16 +548,16 @@ _lhsOppL = ({-# LINE 98 "CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 561 "CodeSyntaxDump.hs" #-})+ {-# LINE 552 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 566 "CodeSyntaxDump.hs" #-})+ {-# LINE 557 "CodeSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOpp,_lhsOppL)) ) sem_CSegments_Nil :: T_CSegments sem_CSegments_Nil =@@ -576,12 +567,12 @@ _lhsOppL = ({-# LINE 99 "CodeSyntaxDump.ag" #-} []- {-# LINE 580 "CodeSyntaxDump.hs" #-})+ {-# LINE 571 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} empty- {-# LINE 585 "CodeSyntaxDump.hs" #-})+ {-# LINE 576 "CodeSyntaxDump.hs" #-}) in ( _lhsOpp,_lhsOppL)) ) -- CVisit ------------------------------------------------------ {-@@ -609,8 +600,7 @@ Inh_CVisit -> Syn_CVisit wrap_CVisit (T_CVisit sem ) (Inh_CVisit ) =- (let ( _lhsOpp) =- (sem )+ (let ( _lhsOpp) = sem in (Syn_CVisit _lhsOpp )) sem_CVisit_CVisit :: Attributes -> Attributes ->@@ -626,11 +616,11 @@ _lhsOpp = ({-# LINE 66 "CodeSyntaxDump.ag" #-} ppNestInfo ["CVisit","CVisit"] [] [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "sequence" $ ppVList _vssIppL, ppF "intra" $ ppVList _intraIppL, ppF "ordered" $ ppBool ordered_] []- {-# LINE 630 "CodeSyntaxDump.hs" #-})+ {-# LINE 620 "CodeSyntaxDump.hs" #-}) ( _vssIppL) =- (vss_ )+ vss_ ( _intraIppL) =- (intra_ )+ intra_ in ( _lhsOpp)) ) -- CVisits ----------------------------------------------------- {-@@ -657,8 +647,7 @@ Inh_CVisits -> Syn_CVisits wrap_CVisits (T_CVisits sem ) (Inh_CVisits ) =- (let ( _lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOpp,_lhsOppL) = sem in (Syn_CVisits _lhsOpp _lhsOppL )) sem_CVisits_Cons :: T_CVisit -> T_CVisits ->@@ -673,16 +662,16 @@ _lhsOppL = ({-# LINE 90 "CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 677 "CodeSyntaxDump.hs" #-})+ {-# LINE 666 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 682 "CodeSyntaxDump.hs" #-})+ {-# LINE 671 "CodeSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOpp,_lhsOppL)) ) sem_CVisits_Nil :: T_CVisits sem_CVisits_Nil =@@ -692,12 +681,12 @@ _lhsOppL = ({-# LINE 91 "CodeSyntaxDump.ag" #-} []- {-# LINE 696 "CodeSyntaxDump.hs" #-})+ {-# LINE 685 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} empty- {-# LINE 701 "CodeSyntaxDump.hs" #-})+ {-# LINE 690 "CodeSyntaxDump.hs" #-}) in ( _lhsOpp,_lhsOppL)) ) -- Pattern ----------------------------------------------------- {-@@ -753,8 +742,7 @@ Inh_Pattern -> Syn_Pattern wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOpp) =- (sem )+ (let ( _lhsOcopy,_lhsOpp) = sem in (Syn_Pattern _lhsOcopy _lhsOpp )) sem_Pattern_Alias :: Identifier -> Identifier ->@@ -773,21 +761,21 @@ _lhsOpp = ({-# LINE 75 "CodeSyntaxDump.ag" #-} ppNestInfo ["Pattern","Alias"] [pp field_, pp attr_] [ppF "pat" $ _patIpp] []- {-# LINE 777 "CodeSyntaxDump.hs" #-})+ {-# LINE 765 "CodeSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 782 "CodeSyntaxDump.hs" #-})+ {-# LINE 770 "CodeSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 787 "CodeSyntaxDump.hs" #-})+ {-# LINE 775 "CodeSyntaxDump.hs" #-}) ( _patIcopy,_patIpp) =- (pat_ )+ pat_ ( _partsIcopy,_partsIpp,_partsIppL) =- (parts_ )+ parts_ in ( _lhsOcopy,_lhsOpp)) ) sem_Pattern_Constr :: ConstructorIdent -> T_Patterns ->@@ -802,19 +790,19 @@ _lhsOpp = ({-# LINE 73 "CodeSyntaxDump.ag" #-} ppNestInfo ["Pattern","Constr"] [pp name_] [ppF "pats" $ ppVList _patsIppL] []- {-# LINE 806 "CodeSyntaxDump.hs" #-})+ {-# LINE 794 "CodeSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Constr name_ _patsIcopy- {-# LINE 811 "CodeSyntaxDump.hs" #-})+ {-# LINE 799 "CodeSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 816 "CodeSyntaxDump.hs" #-})+ {-# LINE 804 "CodeSyntaxDump.hs" #-}) ( _patsIcopy,_patsIpp,_patsIppL) =- (pats_ )+ pats_ in ( _lhsOcopy,_lhsOpp)) ) sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern @@ -827,19 +815,19 @@ _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} _patIpp- {-# LINE 831 "CodeSyntaxDump.hs" #-})+ {-# LINE 819 "CodeSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Irrefutable _patIcopy- {-# LINE 836 "CodeSyntaxDump.hs" #-})+ {-# LINE 824 "CodeSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 841 "CodeSyntaxDump.hs" #-})+ {-# LINE 829 "CodeSyntaxDump.hs" #-}) ( _patIcopy,_patIpp) =- (pat_ )+ pat_ in ( _lhsOcopy,_lhsOpp)) ) sem_Pattern_Product :: Pos -> T_Patterns ->@@ -854,19 +842,19 @@ _lhsOpp = ({-# LINE 74 "CodeSyntaxDump.ag" #-} ppNestInfo ["Pattern","Product"] [ppShow pos_] [ppF "pats" $ ppVList _patsIppL] []- {-# LINE 858 "CodeSyntaxDump.hs" #-})+ {-# LINE 846 "CodeSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Product pos_ _patsIcopy- {-# LINE 863 "CodeSyntaxDump.hs" #-})+ {-# LINE 851 "CodeSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 868 "CodeSyntaxDump.hs" #-})+ {-# LINE 856 "CodeSyntaxDump.hs" #-}) ( _patsIcopy,_patsIpp,_patsIppL) =- (pats_ )+ pats_ in ( _lhsOcopy,_lhsOpp)) ) sem_Pattern_Underscore :: Pos -> T_Pattern @@ -877,17 +865,17 @@ _lhsOpp = ({-# LINE 76 "CodeSyntaxDump.ag" #-} ppNestInfo ["Pattern","Underscore"] [ppShow pos_] [] []- {-# LINE 881 "CodeSyntaxDump.hs" #-})+ {-# LINE 869 "CodeSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Underscore pos_- {-# LINE 886 "CodeSyntaxDump.hs" #-})+ {-# LINE 874 "CodeSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 891 "CodeSyntaxDump.hs" #-})+ {-# LINE 879 "CodeSyntaxDump.hs" #-}) in ( _lhsOcopy,_lhsOpp)) ) -- Patterns ---------------------------------------------------- {-@@ -919,8 +907,7 @@ Inh_Patterns -> Syn_Patterns wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOpp,_lhsOppL) =- (sem )+ (let ( _lhsOcopy,_lhsOpp,_lhsOppL) = sem in (Syn_Patterns _lhsOcopy _lhsOpp _lhsOppL )) sem_Patterns_Cons :: T_Pattern -> T_Patterns ->@@ -938,26 +925,26 @@ _lhsOppL = ({-# LINE 82 "CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 942 "CodeSyntaxDump.hs" #-})+ {-# LINE 929 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 947 "CodeSyntaxDump.hs" #-})+ {-# LINE 934 "CodeSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} (:) _hdIcopy _tlIcopy- {-# LINE 952 "CodeSyntaxDump.hs" #-})+ {-# LINE 939 "CodeSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 957 "CodeSyntaxDump.hs" #-})+ {-# LINE 944 "CodeSyntaxDump.hs" #-}) ( _hdIcopy,_hdIpp) =- (hd_ )+ hd_ ( _tlIcopy,_tlIpp,_tlIppL) =- (tl_ )+ tl_ in ( _lhsOcopy,_lhsOpp,_lhsOppL)) ) sem_Patterns_Nil :: T_Patterns sem_Patterns_Nil =@@ -968,22 +955,22 @@ _lhsOppL = ({-# LINE 83 "CodeSyntaxDump.ag" #-} []- {-# LINE 972 "CodeSyntaxDump.hs" #-})+ {-# LINE 959 "CodeSyntaxDump.hs" #-}) -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp = ({-# LINE 44 "CodeSyntaxDump.ag" #-} empty- {-# LINE 977 "CodeSyntaxDump.hs" #-})+ {-# LINE 964 "CodeSyntaxDump.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} []- {-# LINE 982 "CodeSyntaxDump.hs" #-})+ {-# LINE 969 "CodeSyntaxDump.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 987 "CodeSyntaxDump.hs" #-})+ {-# LINE 974 "CodeSyntaxDump.hs" #-}) in ( _lhsOcopy,_lhsOpp,_lhsOppL)) ) -- Sequence ---------------------------------------------------- {-@@ -1009,8 +996,7 @@ Inh_Sequence -> Syn_Sequence wrap_Sequence (T_Sequence sem ) (Inh_Sequence ) =- (let ( _lhsOppL) =- (sem )+ (let ( _lhsOppL) = sem in (Syn_Sequence _lhsOppL )) sem_Sequence_Cons :: T_CRule -> T_Sequence ->@@ -1023,11 +1009,11 @@ _lhsOppL = ({-# LINE 86 "CodeSyntaxDump.ag" #-} _hdIpp : _tlIppL- {-# LINE 1027 "CodeSyntaxDump.hs" #-})+ {-# LINE 1013 "CodeSyntaxDump.hs" #-}) ( _hdIpp) =- (hd_ )+ hd_ ( _tlIppL) =- (tl_ )+ tl_ in ( _lhsOppL)) ) sem_Sequence_Nil :: T_Sequence sem_Sequence_Nil =@@ -1036,5 +1022,5 @@ _lhsOppL = ({-# LINE 87 "CodeSyntaxDump.ag" #-} []- {-# LINE 1040 "CodeSyntaxDump.hs" #-})+ {-# LINE 1026 "CodeSyntaxDump.hs" #-}) in ( _lhsOppL)) )
src-derived/ConcreteSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (ConcreteSyntax.ag)+-- UUAGC 0.9.30 (ConcreteSyntax.ag) module ConcreteSyntax where {-# LINE 2 "ConcreteSyntax.ag" #-}
src-derived/DeclBlocks.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (DeclBlocks.ag)+-- UUAGC 0.9.30 (DeclBlocks.ag) module DeclBlocks where {-# LINE 2 "DeclBlocks.ag" #-}
src-derived/DefaultRules.hs view
@@ -1,2413 +1,2398 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.29 (DefaultRules.ag)-module DefaultRules where-{-# LINE 10 "DefaultRules.ag" #-}--import qualified List (delete,intersperse)--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 Maybe-import HsToken-import HsTokenScanner-import Data.List(intersperse)--import AbstractSyntax-import ErrorMessages--import Options(Options,modcopy,rename)-{-# LINE 26 "../src-derived/DefaultRules.hs" #-}--{-# LINE 2 "./AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import CommonTypes-{-# LINE 36 "../src-derived/DefaultRules.hs" #-}--{-# LINE 2 "./Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 43 "../src-derived/DefaultRules.hs" #-}-{-# LINE 61 "DefaultRules.ag" #-}--fieldName n = '@' : getName n- -locName n = '@' : getName n--attrName fld attr- | fld == _LOC = '@' : getName attr - | otherwise = '@' : getName fld ++ "." ++ getName attr--_ACHILD = Ident "(" noPos -- hack- - -getConName typeSyns rename nt con1 - | nt `elem` map fst typeSyns = synonym- | otherwise = normalName- where con = getName con1- normalName | rename = getName nt++"_"++ con- | otherwise = con- synonym | con == "Cons" = "(:)"- | con == "Nil" = "[]"- | con == "Just" = "Just"- | con == "Nothing" = "Nothing"- | otherwise = normalName----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 91 "../src-derived/DefaultRules.hs" #-}--{-# LINE 172 "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 -> Rule-makeRule (f1,a1) expr origin - = Rule Nothing- (Alias f1 a1 (Underscore noPos) []) - expr - False - origin- 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- ]-- expr | Set.member n locals = attrName _LOC n- | null elems = e- | otherwise = foldr1 (\x y -> x ++ " " ++ op ++ " " ++ y) - (map (flip attrName n) elems)-- tks | Set.member n locals = [AGLocal n noPos Nothing]- | null elems = lexTokens noPos e- | otherwise = lexTokens noPos str- where- str = foldr1 (\x y -> x ++ " " ++ op ++ " " ++ y) - (map (flip attrName n) elems)-- in makeRule (_LHS,n) - (Expression noPos tks)- ("use rule " ++ pos)-----selfRule lhsNecLoc attr x - = let expr | lhsNecLoc = locName attr- | otherwise = x-- tks | lhsNecLoc = [AGLocal attr noPos Nothing]- | otherwise = lexTokens noPos x-- in makeRule (if lhsNecLoc then _LHS else _LOC,attr)- (Expression noPos tks)- "self rule"- ----concatRE rsess = let (rss,ess) = unzip rsess- in (concat rss, concatSeq ess)---copyRule :: Identifier -> Identifier -> Bool -> Set Identifier -> (Map Identifier Identifier, (Identifier,[Identifier])) -> ([Rule], Seq Error)-copyRule nt con modcopy locals (env,(fld,as)) - = concatRE (map copyRu as)- - where - copyRu a- = ( [ makeRule (fld,a) - (Expression noPos tks)- (cruletxt sel)- ]- , err- )- - where - sel - | not modcopy - && Set.member a locals = Just _LOC- | otherwise = Map.lookup a env-- (expr,err) - = case sel of- Nothing -> ( missingRuleErrorExpr nt con fld a- , Seq.singleton (MissingRule nt con fld a)- )- Just f - | f == _ACHILD -> ( fieldName a- , Seq.singleton (deprecatedCopyRuleError nt con fld a)- )- | otherwise -> ( attrName f a- , Seq.empty- )- - (tks,err')- = case sel of- Nothing -> ( [HsToken (missingRuleErrorExpr nt con fld a) noPos]- , Seq.singleton (MissingRule nt con fld a)- )- Just f - | f == _ACHILD -> ( [AGLocal a noPos Nothing]- , Seq.singleton (deprecatedCopyRuleError nt con fld a)- )- | otherwise -> ( [AGField f a noPos Nothing]- , Seq.empty- )-- 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 244 "../src-derived/DefaultRules.hs" #-}--{-# LINE 403 "DefaultRules.ag" #-}--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- rhs = Expression noPos tks- tks = [ HsToken "foldr ($) " noPos, AGLocal substSyn noPos Nothing, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]- funs = intersperse (HsToken ", " noPos) (map (\n -> AGLocal 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) funNames exprs-- modify (Rule mbNm pat rhs owrt origin expl)- | containsSyn pat = Rule mbNm (modifyPat pat) rhs owrt origin expl- 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 parts) = (field == _LHS && attr == syn) || containsSyn pat || any containsSyn parts- 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 parts)- | field == _LHS && attr == syn = Alias _LOC substSyn (modifyPat pat) (map modifyPat parts)- | otherwise = Alias field attr (modifyPat pat) (map modifyPat parts)- modifyPat p = p--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- rhs = Expression noPos tks- tks = [ HsToken "\\s -> foldr ($) s " noPos, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]- funs = intersperse (HsToken ", " noPos) (map (\n -> AGLocal 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) funNames exprs--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- childLoc = Ident (show target ++ "_merge") (getPos target)-{-# LINE 301 "../src-derived/DefaultRules.hs" #-}--{-# LINE 518 "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 (Just nm) pat expr owrt origin expl) uniq- = let pos = getPos nm- r = Rule Nothing (Alias _LOC (Ident ("_rule_" ++ show nm) pos) (Underscore pos) []) expr owrt origin expl- expr' = Expression pos tks- tks = [AGLocal (Ident ("_rule_" ++ show nm) pos) pos (Just ("Indirection to rule " ++ show nm))]- (rs,uniq') = multiRule (Rule Nothing pat expr' owrt origin False) uniq- in (r:rs, uniq')--multiRule (Rule Nothing pat expr owrt origin expl) 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) pats- 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' : rs9- , n9- )- )- f expl' w e p n - = ( p- , ( [Rule Nothing (w p) e owrt origin expl']- , n- )- )- in snd (f expl id expr pat uniq)--{-# LINE 359 "../src-derived/DefaultRules.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- cr : Bool- merged : Set Identifier- nt : NontermIdent- synthesized attributes:- errors : Seq Error- field : (Identifier,Type,Maybe (Maybe Type)) - inherited : Attributes- name : Identifier- output : SELF - synthesized : Attributes- alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child inh : {Attributes}- child syn : {Attributes}- child virtual : {Maybe (Maybe Type)}- visit 0:- local output : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child !(Child _name _tp _inh _syn _virtual ) =- (sem_Child_Child _name _tp _inh _syn _virtual )--- semantic domain-newtype T_Child = T_Child (ConstructorIdent ->- Bool ->- (Set Identifier) ->- NontermIdent ->- ( (Seq Error),( (Identifier,Type,Maybe (Maybe Type)) ),Attributes,Identifier,Child ,Attributes))-data Inh_Child = Inh_Child {con_Inh_Child :: !(ConstructorIdent),cr_Inh_Child :: !(Bool),merged_Inh_Child :: !((Set Identifier)),nt_Inh_Child :: !(NontermIdent)}-data Syn_Child = Syn_Child {errors_Syn_Child :: !((Seq Error)),field_Syn_Child :: !(( (Identifier,Type,Maybe (Maybe Type)) )),inherited_Syn_Child :: !(Attributes),name_Syn_Child :: !(Identifier),output_Syn_Child :: !(Child ),synthesized_Syn_Child :: !(Attributes)}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child !(T_Child sem ) !(Inh_Child _lhsIcon _lhsIcr _lhsImerged _lhsInt ) =- (let ( !_lhsOerrors,!_lhsOfield,!_lhsOinherited,!_lhsOname,!_lhsOoutput,!_lhsOsynthesized) =- (sem _lhsIcon _lhsIcr _lhsImerged _lhsInt )- in (Syn_Child _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized ))-sem_Child_Child :: Identifier ->- Type ->- Attributes ->- Attributes ->- (Maybe (Maybe Type)) ->- T_Child -sem_Child_Child !name_ !tp_ !inh_ !syn_ !virtual_ =- (T_Child (\ (!_lhsIcon)- (!_lhsIcr)- (!_lhsImerged)- (!_lhsInt) ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- Seq.empty- {-# LINE 418 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 477 "DefaultRules.ag" #-}- (name_,tp_,virtual_)- {-# LINE 422 "DefaultRules.hs" #-})) of- { !_lhsOfield ->- (case (({-# LINE 155 "DefaultRules.ag" #-}- inh_- {-# LINE 426 "DefaultRules.hs" #-})) of- { !_lhsOinherited ->- (case (({-# LINE 146 "DefaultRules.ag" #-}- name_- {-# LINE 430 "DefaultRules.hs" #-})) of- { !_lhsOname ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- Child name_ tp_ inh_ syn_ virtual_- {-# LINE 434 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 438 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 156 "DefaultRules.ag" #-}- if name_ `Set.member` _lhsImerged- then Map.empty- else syn_- {-# LINE 444 "DefaultRules.hs" #-})) of- { !_lhsOsynthesized ->- ( _lhsOerrors,_lhsOfield,_lhsOinherited,_lhsOname,_lhsOoutput,_lhsOsynthesized) }) }) }) }) }) }) })) )--- Children -----------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- cr : Bool- merged : Set Identifier- nt : NontermIdent- synthesized attributes:- errors : Seq Error- fields : [(Identifier,Type,Maybe (Maybe Type))]- inputs : [(Identifier, Attributes)]- output : SELF - outputs : [(Identifier, Attributes)]- alternatives:- alternative Cons:- child hd : Child - child tl : Children - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-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 (ConstructorIdent ->- Bool ->- (Set Identifier) ->- NontermIdent ->- ( (Seq Error),([(Identifier,Type,Maybe (Maybe Type))]),([(Identifier, Attributes)]),Children ,([(Identifier, Attributes)])))-data Inh_Children = Inh_Children {con_Inh_Children :: !(ConstructorIdent),cr_Inh_Children :: !(Bool),merged_Inh_Children :: !((Set Identifier)),nt_Inh_Children :: !(NontermIdent)}-data Syn_Children = Syn_Children {errors_Syn_Children :: !((Seq Error)),fields_Syn_Children :: !(([(Identifier,Type,Maybe (Maybe Type))])),inputs_Syn_Children :: !(([(Identifier, Attributes)])),output_Syn_Children :: !(Children ),outputs_Syn_Children :: !(([(Identifier, Attributes)]))}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children !(T_Children sem ) !(Inh_Children _lhsIcon _lhsIcr _lhsImerged _lhsInt ) =- (let ( !_lhsOerrors,!_lhsOfields,!_lhsOinputs,!_lhsOoutput,!_lhsOoutputs) =- (sem _lhsIcon _lhsIcr _lhsImerged _lhsInt )- in (Syn_Children _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons !(T_Child hd_ ) !(T_Children tl_ ) =- (T_Children (\ (!_lhsIcon)- (!_lhsIcr)- (!_lhsImerged)- (!_lhsInt) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 501 "DefaultRules.hs" #-})) of- { !_tlOnt ->- (case (({-# LINE 662 "DefaultRules.ag" #-}- _lhsImerged- {-# LINE 505 "DefaultRules.hs" #-})) of- { !_tlOmerged ->- (case (({-# LINE 47 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 509 "DefaultRules.hs" #-})) of- { !_tlOcr ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 513 "DefaultRules.hs" #-})) of- { !_tlOcon ->- (case ((tl_ _tlOcon _tlOcr _tlOmerged _tlOnt )) of- { ( !_tlIerrors,!_tlIfields,!_tlIinputs,!_tlIoutput,!_tlIoutputs) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 519 "DefaultRules.hs" #-})) of- { !_hdOnt ->- (case (({-# LINE 662 "DefaultRules.ag" #-}- _lhsImerged- {-# LINE 523 "DefaultRules.hs" #-})) of- { !_hdOmerged ->- (case (({-# LINE 47 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 527 "DefaultRules.hs" #-})) of- { !_hdOcr ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 531 "DefaultRules.hs" #-})) of- { !_hdOcon ->- (case ((hd_ _hdOcon _hdOcr _hdOmerged _hdOnt )) of- { ( !_hdIerrors,!_hdIfield,!_hdIinherited,!_hdIname,!_hdIoutput,!_hdIsynthesized) ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 537 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 473 "DefaultRules.ag" #-}- _hdIfield : _tlIfields- {-# LINE 541 "DefaultRules.hs" #-})) of- { !_lhsOfields ->- (case (({-# LINE 161 "DefaultRules.ag" #-}- (_hdIname, _hdIinherited) : _tlIinputs- {-# LINE 545 "DefaultRules.hs" #-})) of- { !_lhsOinputs ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 549 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 553 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 162 "DefaultRules.ag" #-}- (_hdIname, _hdIsynthesized) : _tlIoutputs- {-# LINE 557 "DefaultRules.hs" #-})) of- { !_lhsOoutputs ->- ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (\ (!_lhsIcon)- (!_lhsIcr)- (!_lhsImerged)- (!_lhsInt) ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- Seq.empty- {-# LINE 568 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 474 "DefaultRules.ag" #-}- []- {-# LINE 572 "DefaultRules.hs" #-})) of- { !_lhsOfields ->- (case (({-# LINE 163 "DefaultRules.ag" #-}- []- {-# LINE 576 "DefaultRules.hs" #-})) of- { !_lhsOinputs ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- []- {-# LINE 580 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 584 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 164 "DefaultRules.ag" #-}- []- {-# LINE 588 "DefaultRules.hs" #-})) of- { !_lhsOoutputs ->- ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) })) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Grammar:- child typeSyns : {TypeSyns}- child useMap : {UseMap}- child derivings : {Derivings}- child wrappers : {Set NontermIdent}- child nonts : Nonterminals - child pragmas : {PragmaMap}- child manualAttrOrderMap : {AttrOrderMap}- child paramMap : {ParamMap}- child contextMap : {ContextMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}- visit 0:- local output : _--}--- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )--- semantic domain-newtype T_Grammar = T_Grammar (Options ->- ( (Seq Error),Grammar ))-data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: !(Options)}-data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: !((Seq Error)),output_Syn_Grammar :: !(Grammar )}-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar !(T_Grammar sem ) !(Inh_Grammar _lhsIoptions ) =- (let ( !_lhsOerrors,!_lhsOoutput) =- (sem _lhsIoptions )- in (Syn_Grammar _lhsOerrors _lhsOoutput ))-sem_Grammar_Grammar :: TypeSyns ->- UseMap ->- Derivings ->- (Set NontermIdent) ->- T_Nonterminals ->- PragmaMap ->- AttrOrderMap ->- ParamMap ->- ContextMap ->- UniqueMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ =- (T_Grammar (\ (!_lhsIoptions) ->- (case (({-# LINE 664 "DefaultRules.ag" #-}- mergeMap_- {-# LINE 652 "DefaultRules.hs" #-})) of- { !_nontsOmergesIn ->- (case (({-# LINE 583 "DefaultRules.ag" #-}- manualAttrOrderMap_- {-# LINE 656 "DefaultRules.hs" #-})) of- { !_nontsOmanualAttrOrderMap ->- (case (({-# LINE 150 "DefaultRules.ag" #-}- typeSyns_- {-# LINE 660 "DefaultRules.hs" #-})) of- { !_nontsOtypeSyns ->- (case (({-# LINE 148 "DefaultRules.ag" #-}- useMap_- {-# LINE 664 "DefaultRules.hs" #-})) of- { !_nontsOuseMap ->- (case (({-# LINE 50 "DefaultRules.ag" #-}- modcopy _lhsIoptions- {-# LINE 668 "DefaultRules.hs" #-})) of- { !_nontsOcr ->- (case (({-# LINE 49 "DefaultRules.ag" #-}- rename _lhsIoptions- {-# LINE 672 "DefaultRules.hs" #-})) of- { !_nontsOo_rename ->- (case ((nonts_ )) of- { ( !_nontsIcollect_nts,!T_Nonterminals_1 nonts_1) ->- (case (({-# LINE 656 "DefaultRules.ag" #-}- aroundsMap_- {-# LINE 678 "DefaultRules.hs" #-})) of- { !_nontsOaroundsIn ->- (case (({-# LINE 649 "DefaultRules.ag" #-}- augmentsMap_- {-# LINE 682 "DefaultRules.hs" #-})) of- { !_nontsOaugmentsIn ->- (case (({-# LINE 494 "DefaultRules.ag" #-}- 1- {-# LINE 686 "DefaultRules.hs" #-})) of- { !_nontsOuniq ->- (case (({-# LINE 127 "DefaultRules.ag" #-}- _nontsIcollect_nts- {-# LINE 690 "DefaultRules.hs" #-})) of- { !_nontsOnonterminals ->- (case ((nonts_1 _nontsOaroundsIn _nontsOaugmentsIn _nontsOcr _nontsOmanualAttrOrderMap _nontsOmergesIn _nontsOnonterminals _nontsOo_rename _nontsOtypeSyns _nontsOuniq _nontsOuseMap )) of- { ( !_nontsIerrors,!_nontsIoutput,!_nontsIuniq) ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _nontsIerrors- {-# LINE 696 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_- {-# LINE 700 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 704 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Nonterminal --------------------------------------------------{-- visit 0:- synthesized attribute:- collect_nts : Set NontermIdent- visit 1:- inherited attributes:- aroundsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- cr : Bool- manualAttrOrderMap : AttrOrderMap- mergesIn : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))- nonterminals : Set NontermIdent- o_rename : Bool- typeSyns : TypeSyns- useMap : UseMap- chained attribute:- uniq : Int- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Nonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : Productions - visit 1:- local mergesIn : _- local augmentsIn : _- local aroundsIn : _- local output : _--}--- cata-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 (( (Set NontermIdent),T_Nonterminal_1 ))-newtype T_Nonterminal_1 = T_Nonterminal_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- Bool ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->- (Set NontermIdent) ->- Bool ->- TypeSyns ->- Int ->- UseMap ->- ( (Seq Error),Nonterminal ,Int))-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),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),typeSyns_Inh_Nonterminal :: !(TypeSyns),uniq_Inh_Nonterminal :: !(Int),useMap_Inh_Nonterminal :: !(UseMap)}-data Syn_Nonterminal = Syn_Nonterminal {collect_nts_Syn_Nonterminal :: !((Set NontermIdent)),errors_Syn_Nonterminal :: !((Seq Error)),output_Syn_Nonterminal :: !(Nonterminal ),uniq_Syn_Nonterminal :: !(Int)}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal !(T_Nonterminal sem ) !(Inh_Nonterminal _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap ) =- (let ( !_lhsOcollect_nts,!T_Nonterminal_1 sem_1) =- (sem )- ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =- (sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap )- in (Syn_Nonterminal _lhsOcollect_nts _lhsOerrors _lhsOoutput _lhsOuniq ))-sem_Nonterminal_Nonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal !nt_ !params_ !inh_ !syn_ !(T_Productions prods_ ) =- (T_Nonterminal (case (({-# LINE 123 "DefaultRules.ag" #-}- Set.singleton nt_- {-# LINE 779 "DefaultRules.hs" #-})) of- { !_lhsOcollect_nts ->- (case ((let sem_Nonterminal_Nonterminal_1 :: T_Nonterminal_1 - sem_Nonterminal_Nonterminal_1 =- (T_Nonterminal_1 (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsIo_rename)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap) ->- (case (({-# LINE 55 "DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 795 "DefaultRules.hs" #-})) of- { !_prodsOtypeSyns ->- (case (({-# LINE 43 "DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 799 "DefaultRules.hs" #-})) of- { !_prodsOo_rename ->- (case (({-# LINE 665 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergesIn- {-# LINE 803 "DefaultRules.hs" #-})) of- { !_mergesIn ->- (case (({-# LINE 661 "DefaultRules.ag" #-}- _mergesIn- {-# LINE 807 "DefaultRules.hs" #-})) of- { !_prodsOmergesIn ->- (case (({-# LINE 579 "DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 811 "DefaultRules.hs" #-})) of- { !_prodsOmanualAttrOrderMap ->- (case (({-# LINE 44 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 815 "DefaultRules.hs" #-})) of- { !_prodsOcr ->- (case (({-# LINE 152 "DefaultRules.ag" #-}- nt_- {-# LINE 819 "DefaultRules.hs" #-})) of- { !_prodsOnt ->- (case (({-# LINE 140 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIuseMap- {-# LINE 823 "DefaultRules.hs" #-})) of- { !_prodsOuseMap ->- (case (({-# LINE 139 "DefaultRules.ag" #-}- syn_- {-# LINE 827 "DefaultRules.hs" #-})) of- { !_prodsOsyn ->- (case (({-# LINE 138 "DefaultRules.ag" #-}- inh_- {-# LINE 831 "DefaultRules.hs" #-})) of- { !_prodsOinh ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 835 "DefaultRules.hs" #-})) of- { !_prodsOuniq ->- (case (({-# LINE 125 "DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 839 "DefaultRules.hs" #-})) of- { !_prodsOnonterminals ->- (case (({-# LINE 650 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn- {-# LINE 843 "DefaultRules.hs" #-})) of- { !_augmentsIn ->- (case (({-# LINE 647 "DefaultRules.ag" #-}- _augmentsIn- {-# LINE 847 "DefaultRules.hs" #-})) of- { !_prodsOaugmentsIn ->- (case (({-# LINE 657 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundsIn- {-# LINE 851 "DefaultRules.hs" #-})) of- { !_aroundsIn ->- (case (({-# LINE 654 "DefaultRules.ag" #-}- _aroundsIn- {-# LINE 855 "DefaultRules.hs" #-})) of- { !_prodsOaroundsIn ->- (case ((prods_ _prodsOaroundsIn _prodsOaugmentsIn _prodsOcr _prodsOinh _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnonterminals _prodsOnt _prodsOo_rename _prodsOsyn _prodsOtypeSyns _prodsOuniq _prodsOuseMap )) of- { ( !_prodsIerrors,!_prodsIoutput,!_prodsIuniq) ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _prodsIerrors- {-# LINE 861 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- Nonterminal nt_ params_ inh_ syn_ _prodsIoutput- {-# LINE 865 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 869 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _prodsIuniq- {-# LINE 873 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Nonterminal_Nonterminal_1)) of- { ( !sem_Nonterminal_1) ->- ( _lhsOcollect_nts,sem_Nonterminal_1) }) }) )--- Nonterminals -------------------------------------------------{-- visit 0:- synthesized attribute:- collect_nts : Set NontermIdent- visit 1:- inherited attributes:- aroundsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- cr : Bool- manualAttrOrderMap : AttrOrderMap- mergesIn : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))- nonterminals : Set NontermIdent- o_rename : Bool- typeSyns : TypeSyns- useMap : UseMap- chained attribute:- uniq : Int- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Cons:- child hd : Nonterminal - child tl : Nonterminals - visit 1:- local output : _- alternative Nil:- visit 1:- local output : _--}--- cata-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 (( (Set NontermIdent),T_Nonterminals_1 ))-newtype T_Nonterminals_1 = T_Nonterminals_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- Bool ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->- (Set NontermIdent) ->- Bool ->- TypeSyns ->- Int ->- UseMap ->- ( (Seq Error),Nonterminals ,Int))-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),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),typeSyns_Inh_Nonterminals :: !(TypeSyns),uniq_Inh_Nonterminals :: !(Int),useMap_Inh_Nonterminals :: !(UseMap)}-data Syn_Nonterminals = Syn_Nonterminals {collect_nts_Syn_Nonterminals :: !((Set NontermIdent)),errors_Syn_Nonterminals :: !((Seq Error)),output_Syn_Nonterminals :: !(Nonterminals ),uniq_Syn_Nonterminals :: !(Int)}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals !(T_Nonterminals sem ) !(Inh_Nonterminals _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap ) =- (let ( !_lhsOcollect_nts,!T_Nonterminals_1 sem_1) =- (sem )- ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =- (sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap )- in (Syn_Nonterminals _lhsOcollect_nts _lhsOerrors _lhsOoutput _lhsOuniq ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons !(T_Nonterminal hd_ ) !(T_Nonterminals tl_ ) =- (T_Nonterminals (case ((tl_ )) of- { ( !_tlIcollect_nts,!T_Nonterminals_1 tl_1) ->- (case ((hd_ )) of- { ( !_hdIcollect_nts,!T_Nonterminal_1 hd_1) ->- (case (({-# LINE 121 "DefaultRules.ag" #-}- _hdIcollect_nts `Set.union` _tlIcollect_nts- {-# LINE 949 "DefaultRules.hs" #-})) of- { !_lhsOcollect_nts ->- (case ((let sem_Nonterminals_Cons_1 :: T_Nonterminals_1 - sem_Nonterminals_Cons_1 =- (T_Nonterminals_1 (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsIo_rename)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap) ->- (case (({-# LINE 134 "DefaultRules.ag" #-}- _lhsIuseMap- {-# LINE 965 "DefaultRules.hs" #-})) of- { !_tlOuseMap ->- (case (({-# LINE 55 "DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 969 "DefaultRules.hs" #-})) of- { !_tlOtypeSyns ->- (case (({-# LINE 43 "DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 973 "DefaultRules.hs" #-})) of- { !_tlOo_rename ->- (case (({-# LINE 660 "DefaultRules.ag" #-}- _lhsImergesIn- {-# LINE 977 "DefaultRules.hs" #-})) of- { !_tlOmergesIn ->- (case (({-# LINE 579 "DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 981 "DefaultRules.hs" #-})) of- { !_tlOmanualAttrOrderMap ->- (case (({-# LINE 44 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 985 "DefaultRules.hs" #-})) of- { !_tlOcr ->- (case (({-# LINE 134 "DefaultRules.ag" #-}- _lhsIuseMap- {-# LINE 989 "DefaultRules.hs" #-})) of- { !_hdOuseMap ->- (case (({-# LINE 55 "DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 993 "DefaultRules.hs" #-})) of- { !_hdOtypeSyns ->- (case (({-# LINE 43 "DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 997 "DefaultRules.hs" #-})) of- { !_hdOo_rename ->- (case (({-# LINE 660 "DefaultRules.ag" #-}- _lhsImergesIn- {-# LINE 1001 "DefaultRules.hs" #-})) of- { !_hdOmergesIn ->- (case (({-# LINE 579 "DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 1005 "DefaultRules.hs" #-})) of- { !_hdOmanualAttrOrderMap ->- (case (({-# LINE 44 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 1009 "DefaultRules.hs" #-})) of- { !_hdOcr ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 1013 "DefaultRules.hs" #-})) of- { !_hdOuniq ->- (case (({-# LINE 125 "DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 1017 "DefaultRules.hs" #-})) of- { !_hdOnonterminals ->- (case (({-# LINE 646 "DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 1021 "DefaultRules.hs" #-})) of- { !_hdOaugmentsIn ->- (case (({-# LINE 653 "DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 1025 "DefaultRules.hs" #-})) of- { !_hdOaroundsIn ->- (case ((hd_1 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOmanualAttrOrderMap _hdOmergesIn _hdOnonterminals _hdOo_rename _hdOtypeSyns _hdOuniq _hdOuseMap )) of- { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _hdIuniq- {-# LINE 1031 "DefaultRules.hs" #-})) of- { !_tlOuniq ->- (case (({-# LINE 125 "DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 1035 "DefaultRules.hs" #-})) of- { !_tlOnonterminals ->- (case (({-# LINE 646 "DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 1039 "DefaultRules.hs" #-})) of- { !_tlOaugmentsIn ->- (case (({-# LINE 653 "DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 1043 "DefaultRules.hs" #-})) of- { !_tlOaroundsIn ->- (case ((tl_1 _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOmanualAttrOrderMap _tlOmergesIn _tlOnonterminals _tlOo_rename _tlOtypeSyns _tlOuniq _tlOuseMap )) of- { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 1049 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 1053 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 1057 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _tlIuniq- {-# LINE 1061 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Nonterminals_Cons_1)) of- { ( !sem_Nonterminals_1) ->- ( _lhsOcollect_nts,sem_Nonterminals_1) }) }) }) }) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =- (T_Nonterminals (case (({-# LINE 121 "DefaultRules.ag" #-}- Set.empty- {-# LINE 1071 "DefaultRules.hs" #-})) of- { !_lhsOcollect_nts ->- (case ((let sem_Nonterminals_Nil_1 :: T_Nonterminals_1 - sem_Nonterminals_Nil_1 =- (T_Nonterminals_1 (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsIo_rename)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap) ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- Seq.empty- {-# LINE 1087 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- []- {-# LINE 1091 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 1095 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 1099 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) )- in sem_Nonterminals_Nil_1)) of- { ( !sem_Nonterminals_1) ->- ( _lhsOcollect_nts,sem_Nonterminals_1) }) }) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- nt : NontermIdent- synthesized attributes:- containsVars : Bool- copy : SELF - definedAttrs : Set (Identifier,Identifier)- errors : Seq Error- locals : Set Identifier- output : SELF - alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - child parts : Patterns - visit 0:- local copy : _- local output : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local copy : _- local output : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- local output : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local copy : _- local output : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _- local output : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern !(Alias _field _attr _pat _parts ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )-sem_Pattern !(Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern !(Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern !(Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern !(Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (ConstructorIdent ->- NontermIdent ->- ( Bool,Pattern ,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Pattern ))-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 )}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIcon _lhsInt ) =- (let ( !_lhsOcontainsVars,!_lhsOcopy,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput) =- (sem _lhsIcon _lhsInt )- in (Syn_Pattern _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Patterns ->- T_Pattern -sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) !(T_Patterns parts_ ) =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 485 "DefaultRules.ag" #-}- True- {-# LINE 1186 "DefaultRules.hs" #-})) of- { !_lhsOcontainsVars ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1190 "DefaultRules.hs" #-})) of- { !_partsOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1194 "DefaultRules.hs" #-})) of- { !_partsOcon ->- (case ((parts_ _partsOcon _partsOnt )) of- { ( !_partsIcontainsVars,!_partsIcopy,!_partsIdefinedAttrs,!_partsIerrors,!_partsIlocals,!_partsIoutput) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1200 "DefaultRules.hs" #-})) of- { !_patOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1204 "DefaultRules.hs" #-})) of- { !_patOcon ->- (case ((pat_ _patOcon _patOnt )) of- { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 1210 "DefaultRules.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1214 "DefaultRules.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 467 "DefaultRules.ag" #-}- Set.insert (field_,attr_) _patIdefinedAttrs- {-# LINE 1218 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _patIerrors Seq.>< _partsIerrors- {-# LINE 1222 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 468 "DefaultRules.ag" #-}- if field_ == _LOC- then Set.insert attr_ _patIlocals- else _patIlocals- {-# LINE 1228 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- Alias field_ attr_ _patIoutput _partsIoutput- {-# LINE 1232 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 1236 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1247 "DefaultRules.hs" #-})) of- { !_patsOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1251 "DefaultRules.hs" #-})) of- { !_patsOcon ->- (case ((pats_ _patsOcon _patsOnt )) of- { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _patsIcontainsVars- {-# LINE 1257 "DefaultRules.hs" #-})) of- { !_lhsOcontainsVars ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 1261 "DefaultRules.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1265 "DefaultRules.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 462 "DefaultRules.ag" #-}- _patsIdefinedAttrs- {-# LINE 1269 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _patsIerrors- {-# LINE 1273 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 461 "DefaultRules.ag" #-}- _patsIlocals- {-# LINE 1277 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- Constr name_ _patsIoutput- {-# LINE 1281 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 1285 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable !(T_Pattern pat_ ) =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1295 "DefaultRules.hs" #-})) of- { !_patOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1299 "DefaultRules.hs" #-})) of- { !_patOcon ->- (case ((pat_ _patOcon _patOnt )) of- { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _patIcontainsVars- {-# LINE 1305 "DefaultRules.hs" #-})) of- { !_lhsOcontainsVars ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 1309 "DefaultRules.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1313 "DefaultRules.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 462 "DefaultRules.ag" #-}- _patIdefinedAttrs- {-# LINE 1317 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _patIerrors- {-# LINE 1321 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 461 "DefaultRules.ag" #-}- _patIlocals- {-# LINE 1325 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- Irrefutable _patIoutput- {-# LINE 1329 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 1333 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1344 "DefaultRules.hs" #-})) of- { !_patsOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1348 "DefaultRules.hs" #-})) of- { !_patsOcon ->- (case ((pats_ _patsOcon _patsOnt )) of- { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _patsIcontainsVars- {-# LINE 1354 "DefaultRules.hs" #-})) of- { !_lhsOcontainsVars ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 1358 "DefaultRules.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1362 "DefaultRules.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 462 "DefaultRules.ag" #-}- _patsIdefinedAttrs- {-# LINE 1366 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _patsIerrors- {-# LINE 1370 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 461 "DefaultRules.ag" #-}- _patsIlocals- {-# LINE 1374 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- Product pos_ _patsIoutput- {-# LINE 1378 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 1382 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore !pos_ =- (T_Pattern (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- False- {-# LINE 1392 "DefaultRules.hs" #-})) of- { !_lhsOcontainsVars ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Underscore pos_- {-# LINE 1396 "DefaultRules.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1400 "DefaultRules.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 462 "DefaultRules.ag" #-}- Set.empty- {-# LINE 1404 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- Seq.empty- {-# LINE 1408 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 461 "DefaultRules.ag" #-}- Set.empty- {-# LINE 1412 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- Underscore pos_- {-# LINE 1416 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 1420 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- nt : NontermIdent- synthesized attributes:- containsVars : Bool- copy : SELF - definedAttrs : Set (Identifier,Identifier)- errors : Seq Error- locals : Set Identifier- output : SELF - alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- local output : _- alternative Nil:- visit 0:- local copy : _- local output : _--}--- cata-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 (ConstructorIdent ->- NontermIdent ->- ( Bool,Patterns ,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Patterns ))-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 )}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIcon _lhsInt ) =- (let ( !_lhsOcontainsVars,!_lhsOcopy,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput) =- (sem _lhsIcon _lhsInt )- in (Syn_Patterns _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =- (T_Patterns (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1474 "DefaultRules.hs" #-})) of- { !_tlOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1478 "DefaultRules.hs" #-})) of- { !_tlOcon ->- (case ((tl_ _tlOcon _tlOnt )) of- { ( !_tlIcontainsVars,!_tlIcopy,!_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1484 "DefaultRules.hs" #-})) of- { !_hdOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 1488 "DefaultRules.hs" #-})) of- { !_hdOcon ->- (case ((hd_ _hdOcon _hdOnt )) of- { ( !_hdIcontainsVars,!_hdIcopy,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput) ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _hdIcontainsVars || _tlIcontainsVars- {-# LINE 1494 "DefaultRules.hs" #-})) of- { !_lhsOcontainsVars ->- (case (({-# LINE 23 "./Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 1498 "DefaultRules.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1502 "DefaultRules.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 462 "DefaultRules.ag" #-}- _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs- {-# LINE 1506 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 1510 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 461 "DefaultRules.ag" #-}- _hdIlocals `Set.union` _tlIlocals- {-# LINE 1514 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 1518 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 1522 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ (!_lhsIcon)- (!_lhsInt) ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- False- {-# LINE 1531 "DefaultRules.hs" #-})) of- { !_lhsOcontainsVars ->- (case (({-# LINE 23 "./Patterns.ag" #-}- []- {-# LINE 1535 "DefaultRules.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1539 "DefaultRules.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 462 "DefaultRules.ag" #-}- Set.empty- {-# LINE 1543 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- Seq.empty- {-# LINE 1547 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 461 "DefaultRules.ag" #-}- Set.empty- {-# LINE 1551 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- []- {-# LINE 1555 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 1559 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })) )--- Production ---------------------------------------------------{-- visit 0:- inherited attributes:- aroundsIn : Map ConstructorIdent (Map Identifier [Expression])- augmentsIn : Map ConstructorIdent (Map Identifier [Expression])- cr : Bool- inh : Attributes- manualAttrOrderMap : AttrOrderMap- mergesIn : Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))- nonterminals : Set NontermIdent- nt : NontermIdent- o_rename : Bool- syn : Attributes- typeSyns : TypeSyns- useMap : Map Identifier (String,String,String)- chained attribute:- uniq : Int- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Production:- child con : {ConstructorIdent}- child children : Children - child rules : Rules - child typeSigs : TypeSigs - visit 0:- local mergesIn : _- local merged : _- local orderDeps : _- local orderErrs : _- local _tup1 : _- local errs : _- local aroundsIn : _- local augmentsIn : _- local newRls : _- local extra1 : _- local extra2 : _- local extra3 : _--}--- cata-sem_Production :: Production ->- T_Production -sem_Production !(Production _con _children _rules _typeSigs ) =- (sem_Production_Production _con (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) )--- semantic domain-newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->- (Map ConstructorIdent (Map Identifier [Expression])) ->- Bool ->- Attributes ->- AttrOrderMap ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->- (Set NontermIdent) ->- NontermIdent ->- Bool ->- Attributes ->- TypeSyns ->- Int ->- (Map Identifier (String,String,String)) ->- ( (Seq Error),Production ,Int))-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),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),syn_Inh_Production :: !(Attributes),typeSyns_Inh_Production :: !(TypeSyns),uniq_Inh_Production :: !(Int),useMap_Inh_Production :: !((Map Identifier (String,String,String)))}-data Syn_Production = Syn_Production {errors_Syn_Production :: !((Seq Error)),output_Syn_Production :: !(Production ),uniq_Syn_Production :: !(Int)}-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production !(T_Production sem ) !(Inh_Production _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap ) =- (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =- (sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap )- in (Syn_Production _lhsOerrors _lhsOoutput _lhsOuniq ))-sem_Production_Production :: ConstructorIdent ->- T_Children ->- T_Rules ->- T_TypeSigs ->- T_Production -sem_Production_Production !con_ !(T_Children children_ ) !(T_Rules rules_ ) !(T_TypeSigs typeSigs_ ) =- (T_Production (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsIinh)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsInt)- (!_lhsIo_rename)- (!_lhsIsyn)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap) ->- (case (({-# LINE 666 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergesIn- {-# LINE 1653 "DefaultRules.hs" #-})) of- { !_mergesIn ->- (case (({-# LINE 667 "DefaultRules.ag" #-}- Set.fromList [ c | (_,cs,_) <- Map.elems _mergesIn , c <- cs ]- {-# LINE 1657 "DefaultRules.hs" #-})) of- { !_merged ->- (case (({-# LINE 662 "DefaultRules.ag" #-}- _merged- {-# LINE 1661 "DefaultRules.hs" #-})) of- { !_childrenOmerged ->- (case (({-# LINE 593 "DefaultRules.ag" #-}- Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrOrderMap- {-# LINE 1665 "DefaultRules.hs" #-})) of- { !_orderDeps ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 1669 "DefaultRules.hs" #-})) of- { !_rulesOuniq ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1673 "DefaultRules.hs" #-})) of- { !_rulesOnt ->- (case (({-# LINE 143 "DefaultRules.ag" #-}- con_- {-# LINE 1677 "DefaultRules.hs" #-})) of- { !_rulesOcon ->- (case ((rules_ _rulesOcon _rulesOnt _rulesOuniq )) of- { ( !_rulesIdefinedAttrs,!_rulesIerrors,!_rulesIlocals,!_rulesIoutput,!_rulesIruleNames,!_rulesIuniq) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1683 "DefaultRules.hs" #-})) of- { !_childrenOnt ->- (case (({-# LINE 47 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 1687 "DefaultRules.hs" #-})) of- { !_childrenOcr ->- (case (({-# LINE 144 "DefaultRules.ag" #-}- con_- {-# LINE 1691 "DefaultRules.hs" #-})) of- { !_childrenOcon ->- (case ((children_ _childrenOcon _childrenOcr _childrenOmerged _childrenOnt )) of- { ( !_childrenIerrors,!_childrenIfields,!_childrenIinputs,!_childrenIoutput,!_childrenIoutputs) ->- (case (({-# LINE 595 "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 1731 "DefaultRules.hs" #-})) of- { !_orderErrs ->- (case (({-# LINE 332 "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.partition isSELFNonterminal _lhsIsyn- (_,undefAttrs)- = removeDefined _rulesIdefinedAttrs (_LHS, normalAttrs)- (useAttrs,others)- = splitAttrs _lhsIuseMap undefAttrs- (rules1, errors1)- = concatRE $ map (copyRule _lhsInt con_ _lhsIcr locals)- (zip envs (map (removeDefined _rulesIdefinedAttrs) _childrenIinputs))- uRules- = map (useRule locals _childrenIoutputs) useAttrs- selfLocRules- = [ selfRule False attr (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- | getName con_ == "Tuple" && _lhsInt `elem` map fst _lhsItypeSyns- = "(" ++ concat (List.intersperse "," fs) ++ ")"- | otherwise- = getConName _lhsItypeSyns _lhsIo_rename _lhsInt con_ ++ " " ++ unwords fs- childExists Nothing = True- childExists (Just (Just _)) = True- childExists (Just Nothing) = False- selfRules- = [ selfRule True attr undefined- | attr <- Map.keys selfAttrs- , not (Set.member (_LHS,attr) _rulesIdefinedAttrs)- ]- (rules5, errs5)- = copyRule _lhsInt- con_- _lhsIcr- locals- (lhs_env, (_LHS, others))- in (uRules++selfLocRules++selfRules++rules5++rules1, errors1><errs5)- {-# LINE 1790 "DefaultRules.hs" #-})) of- { !__tup1 ->- (case (({-# LINE 332 "DefaultRules.ag" #-}- __tup1- {-# LINE 1794 "DefaultRules.hs" #-})) of- { !(_,!_errs) ->- (case (({-# LINE 330 "DefaultRules.ag" #-}- _childrenIerrors >< _errs >< _rulesIerrors >< _orderErrs- {-# LINE 1798 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 658 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaroundsIn- {-# LINE 1802 "DefaultRules.hs" #-})) of- { !_aroundsIn ->- (case (({-# LINE 651 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaugmentsIn- {-# LINE 1806 "DefaultRules.hs" #-})) of- { !_augmentsIn ->- (case (({-# LINE 332 "DefaultRules.ag" #-}- __tup1- {-# LINE 1810 "DefaultRules.hs" #-})) of- { !(!_newRls,_) ->- (case (({-# LINE 505 "DefaultRules.ag" #-}- foldr addAugments (_rulesIoutput ++ _newRls) (Map.assocs _augmentsIn )- {-# LINE 1814 "DefaultRules.hs" #-})) of- { !_extra1 ->- (case (({-# LINE 506 "DefaultRules.ag" #-}- foldr addArounds _extra1 (Map.assocs _aroundsIn )- {-# LINE 1818 "DefaultRules.hs" #-})) of- { !_extra2 ->- (case (({-# LINE 507 "DefaultRules.ag" #-}- foldr addMerges _extra2 (Map.assocs _mergesIn )- {-# LINE 1822 "DefaultRules.hs" #-})) of- { !_extra3 ->- (case ((typeSigs_ )) of- { ( !_typeSigsIoutput) ->- (case (({-# LINE 508 "DefaultRules.ag" #-}- Production con_ _childrenIoutput _extra3 _typeSigsIoutput- {-# LINE 1828 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _rulesIuniq- {-# LINE 1832 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Productions --------------------------------------------------{-- visit 0:- inherited attributes:- aroundsIn : Map ConstructorIdent (Map Identifier [Expression])- augmentsIn : Map ConstructorIdent (Map Identifier [Expression])- cr : Bool- inh : Attributes- manualAttrOrderMap : AttrOrderMap- mergesIn : Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))- nonterminals : Set NontermIdent- nt : NontermIdent- o_rename : Bool- syn : Attributes- typeSyns : TypeSyns- useMap : Map Identifier (String,String,String)- chained attribute:- uniq : Int- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Cons:- child hd : Production - child tl : Productions - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-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 ((Map ConstructorIdent (Map Identifier [Expression])) ->- (Map ConstructorIdent (Map Identifier [Expression])) ->- Bool ->- Attributes ->- AttrOrderMap ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->- (Set NontermIdent) ->- NontermIdent ->- Bool ->- Attributes ->- TypeSyns ->- Int ->- (Map Identifier (String,String,String)) ->- ( (Seq Error),Productions ,Int))-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),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),syn_Inh_Productions :: !(Attributes),typeSyns_Inh_Productions :: !(TypeSyns),uniq_Inh_Productions :: !(Int),useMap_Inh_Productions :: !((Map Identifier (String,String,String)))}-data Syn_Productions = Syn_Productions {errors_Syn_Productions :: !((Seq Error)),output_Syn_Productions :: !(Productions ),uniq_Syn_Productions :: !(Int)}-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions !(T_Productions sem ) !(Inh_Productions _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap ) =- (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =- (sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap )- in (Syn_Productions _lhsOerrors _lhsOoutput _lhsOuniq ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons !(T_Production hd_ ) !(T_Productions tl_ ) =- (T_Productions (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsIinh)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsInt)- (!_lhsIo_rename)- (!_lhsIsyn)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap) ->- (case (({-# LINE 135 "DefaultRules.ag" #-}- _lhsIuseMap- {-# LINE 1914 "DefaultRules.hs" #-})) of- { !_tlOuseMap ->- (case (({-# LINE 55 "DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 1918 "DefaultRules.hs" #-})) of- { !_tlOtypeSyns ->- (case (({-# LINE 135 "DefaultRules.ag" #-}- _lhsIsyn- {-# LINE 1922 "DefaultRules.hs" #-})) of- { !_tlOsyn ->- (case (({-# LINE 43 "DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 1926 "DefaultRules.hs" #-})) of- { !_tlOo_rename ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1930 "DefaultRules.hs" #-})) of- { !_tlOnt ->- (case (({-# LINE 661 "DefaultRules.ag" #-}- _lhsImergesIn- {-# LINE 1934 "DefaultRules.hs" #-})) of- { !_tlOmergesIn ->- (case (({-# LINE 579 "DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 1938 "DefaultRules.hs" #-})) of- { !_tlOmanualAttrOrderMap ->- (case (({-# LINE 135 "DefaultRules.ag" #-}- _lhsIinh- {-# LINE 1942 "DefaultRules.hs" #-})) of- { !_tlOinh ->- (case (({-# LINE 44 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 1946 "DefaultRules.hs" #-})) of- { !_tlOcr ->- (case (({-# LINE 135 "DefaultRules.ag" #-}- _lhsIuseMap- {-# LINE 1950 "DefaultRules.hs" #-})) of- { !_hdOuseMap ->- (case (({-# LINE 55 "DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 1954 "DefaultRules.hs" #-})) of- { !_hdOtypeSyns ->- (case (({-# LINE 135 "DefaultRules.ag" #-}- _lhsIsyn- {-# LINE 1958 "DefaultRules.hs" #-})) of- { !_hdOsyn ->- (case (({-# LINE 43 "DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 1962 "DefaultRules.hs" #-})) of- { !_hdOo_rename ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 1966 "DefaultRules.hs" #-})) of- { !_hdOnt ->- (case (({-# LINE 661 "DefaultRules.ag" #-}- _lhsImergesIn- {-# LINE 1970 "DefaultRules.hs" #-})) of- { !_hdOmergesIn ->- (case (({-# LINE 579 "DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 1974 "DefaultRules.hs" #-})) of- { !_hdOmanualAttrOrderMap ->- (case (({-# LINE 135 "DefaultRules.ag" #-}- _lhsIinh- {-# LINE 1978 "DefaultRules.hs" #-})) of- { !_hdOinh ->- (case (({-# LINE 44 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 1982 "DefaultRules.hs" #-})) of- { !_hdOcr ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 1986 "DefaultRules.hs" #-})) of- { !_hdOuniq ->- (case (({-# LINE 125 "DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 1990 "DefaultRules.hs" #-})) of- { !_hdOnonterminals ->- (case (({-# LINE 647 "DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 1994 "DefaultRules.hs" #-})) of- { !_hdOaugmentsIn ->- (case (({-# LINE 654 "DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 1998 "DefaultRules.hs" #-})) of- { !_hdOaroundsIn ->- (case ((hd_ _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinh _hdOmanualAttrOrderMap _hdOmergesIn _hdOnonterminals _hdOnt _hdOo_rename _hdOsyn _hdOtypeSyns _hdOuniq _hdOuseMap )) of- { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _hdIuniq- {-# LINE 2004 "DefaultRules.hs" #-})) of- { !_tlOuniq ->- (case (({-# LINE 125 "DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 2008 "DefaultRules.hs" #-})) of- { !_tlOnonterminals ->- (case (({-# LINE 647 "DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 2012 "DefaultRules.hs" #-})) of- { !_tlOaugmentsIn ->- (case (({-# LINE 654 "DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 2016 "DefaultRules.hs" #-})) of- { !_tlOaroundsIn ->- (case ((tl_ _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOinh _tlOmanualAttrOrderMap _tlOmergesIn _tlOnonterminals _tlOnt _tlOo_rename _tlOsyn _tlOtypeSyns _tlOuniq _tlOuseMap )) of- { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2022 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2026 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 2030 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _tlIuniq- {-# LINE 2034 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =- (T_Productions (\ (!_lhsIaroundsIn)- (!_lhsIaugmentsIn)- (!_lhsIcr)- (!_lhsIinh)- (!_lhsImanualAttrOrderMap)- (!_lhsImergesIn)- (!_lhsInonterminals)- (!_lhsInt)- (!_lhsIo_rename)- (!_lhsIsyn)- (!_lhsItypeSyns)- (!_lhsIuniq)- (!_lhsIuseMap) ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- Seq.empty- {-# LINE 2054 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- []- {-# LINE 2058 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 2062 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 2066 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) )--- Rule ---------------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- nt : NontermIdent- chained attribute:- uniq : Int- synthesized attributes:- containsVars : Bool- definedAttrs : Set (Identifier,Identifier)- errors : Seq Error- locals : Set Identifier- output : SELF - outputs : Rules - ruleNames : Set Identifier- alternatives:- alternative Rule:- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : {Expression}- child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- visit 0:- local output : _- local _tup2 : {(Rules,Int)}--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) _rhs _owrt _origin _explicit )--- semantic domain-newtype T_Rule = T_Rule (ConstructorIdent ->- NontermIdent ->- Int ->- ( Bool,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rule ,Rules ,(Set Identifier),Int))-data Inh_Rule = Inh_Rule {con_Inh_Rule :: !(ConstructorIdent),nt_Inh_Rule :: !(NontermIdent),uniq_Inh_Rule :: !(Int)}-data Syn_Rule = Syn_Rule {containsVars_Syn_Rule :: !(Bool),definedAttrs_Syn_Rule :: !((Set (Identifier,Identifier))),errors_Syn_Rule :: !((Seq Error)),locals_Syn_Rule :: !((Set Identifier)),output_Syn_Rule :: !(Rule ),outputs_Syn_Rule :: !(Rules ),ruleNames_Syn_Rule :: !((Set Identifier)),uniq_Syn_Rule :: !(Int)}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule !(T_Rule sem ) !(Inh_Rule _lhsIcon _lhsInt _lhsIuniq ) =- (let ( !_lhsOcontainsVars,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput,!_lhsOoutputs,!_lhsOruleNames,!_lhsOuniq) =- (sem _lhsIcon _lhsInt _lhsIuniq )- in (Syn_Rule _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq ))-sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- Expression ->- Bool ->- String ->- Bool ->- T_Rule -sem_Rule_Rule !mbName_ !(T_Pattern pattern_ ) !rhs_ !owrt_ !origin_ !explicit_ =- (T_Rule (\ (!_lhsIcon)- (!_lhsInt)- (!_lhsIuniq) ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 2129 "DefaultRules.hs" #-})) of- { !_patternOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 2133 "DefaultRules.hs" #-})) of- { !_patternOcon ->- (case ((pattern_ _patternOcon _patternOnt )) of- { ( !_patternIcontainsVars,!_patternIcopy,!_patternIdefinedAttrs,!_patternIerrors,!_patternIlocals,!_patternIoutput) ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _patternIcontainsVars- {-# LINE 2139 "DefaultRules.hs" #-})) of- { !_lhsOcontainsVars ->- (case (({-# LINE 462 "DefaultRules.ag" #-}- _patternIdefinedAttrs- {-# LINE 2143 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _patternIerrors- {-# LINE 2147 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 461 "DefaultRules.ag" #-}- _patternIlocals- {-# LINE 2151 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- Rule mbName_ _patternIoutput rhs_ owrt_ origin_ explicit_- {-# LINE 2155 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 2159 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 515 "DefaultRules.ag" #-}- multiRule _output _lhsIuniq- {-# LINE 2163 "DefaultRules.hs" #-})) of- { !__tup2 ->- (case (({-# LINE 515 "DefaultRules.ag" #-}- __tup2- {-# LINE 2167 "DefaultRules.hs" #-})) of- { !(!_lhsOoutputs,_) ->- (case (({-# LINE 587 "DefaultRules.ag" #-}- case mbName_ of- Nothing -> Set.empty- Just nm -> Set.singleton nm- {-# LINE 2173 "DefaultRules.hs" #-})) of- { !_lhsOruleNames ->- (case (({-# LINE 515 "DefaultRules.ag" #-}- __tup2- {-# LINE 2177 "DefaultRules.hs" #-})) of- { !(_,!_lhsOuniq) ->- ( _lhsOcontainsVars,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOoutputs,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Rules --------------------------------------------------------{-- visit 0:- inherited attributes:- con : ConstructorIdent- nt : NontermIdent- chained attribute:- uniq : Int- synthesized attributes:- definedAttrs : Set (Identifier,Identifier)- errors : Seq Error- locals : Set Identifier- output : SELF - ruleNames : Set Identifier- alternatives:- alternative Cons:- child hd : Rule - child tl : Rules - alternative Nil:- visit 0:- local output : _--}--- cata-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 (ConstructorIdent ->- NontermIdent ->- Int ->- ( (Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rules ,(Set Identifier),Int))-data Inh_Rules = Inh_Rules {con_Inh_Rules :: !(ConstructorIdent),nt_Inh_Rules :: !(NontermIdent),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)}-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules !(T_Rules sem ) !(Inh_Rules _lhsIcon _lhsInt _lhsIuniq ) =- (let ( !_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput,!_lhsOruleNames,!_lhsOuniq) =- (sem _lhsIcon _lhsInt _lhsIuniq )- in (Syn_Rules _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons !(T_Rule hd_ ) !(T_Rules tl_ ) =- (T_Rules (\ (!_lhsIcon)- (!_lhsInt)- (!_lhsIuniq) ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 2230 "DefaultRules.hs" #-})) of- { !_hdOuniq ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 2234 "DefaultRules.hs" #-})) of- { !_hdOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 2238 "DefaultRules.hs" #-})) of- { !_hdOcon ->- (case ((hd_ _hdOcon _hdOnt _hdOuniq )) of- { ( !_hdIcontainsVars,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput,!_hdIoutputs,!_hdIruleNames,!_hdIuniq) ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _hdIuniq- {-# LINE 2244 "DefaultRules.hs" #-})) of- { !_tlOuniq ->- (case (({-# LINE 34 "DefaultRules.ag" #-}- _lhsInt- {-# LINE 2248 "DefaultRules.hs" #-})) of- { !_tlOnt ->- (case (({-# LINE 35 "DefaultRules.ag" #-}- _lhsIcon- {-# LINE 2252 "DefaultRules.hs" #-})) of- { !_tlOcon ->- (case ((tl_ _tlOcon _tlOnt _tlOuniq )) of- { ( !_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput,!_tlIruleNames,!_tlIuniq) ->- (case (({-# LINE 462 "DefaultRules.ag" #-}- _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs- {-# LINE 2258 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2262 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 461 "DefaultRules.ag" #-}- _hdIlocals `Set.union` _tlIlocals- {-# LINE 2266 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 511 "DefaultRules.ag" #-}- if _hdIcontainsVars then _hdIoutputs ++ _tlIoutput else _tlIoutput- {-# LINE 2270 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 585 "DefaultRules.ag" #-}- _hdIruleNames `Set.union` _tlIruleNames- {-# LINE 2274 "DefaultRules.hs" #-})) of- { !_lhsOruleNames ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _tlIuniq- {-# LINE 2278 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =- (T_Rules (\ (!_lhsIcon)- (!_lhsInt)- (!_lhsIuniq) ->- (case (({-# LINE 462 "DefaultRules.ag" #-}- Set.empty- {-# LINE 2288 "DefaultRules.hs" #-})) of- { !_lhsOdefinedAttrs ->- (case (({-# LINE 115 "DefaultRules.ag" #-}- Seq.empty- {-# LINE 2292 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 461 "DefaultRules.ag" #-}- Set.empty- {-# LINE 2296 "DefaultRules.hs" #-})) of- { !_lhsOlocals ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- []- {-# LINE 2300 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 2304 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 585 "DefaultRules.ag" #-}- Set.empty- {-# LINE 2308 "DefaultRules.hs" #-})) of- { !_lhsOruleNames ->- (case (({-# LINE 491 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 2312 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) })) )--- TypeSig ------------------------------------------------------{-- visit 0:- synthesized attribute:- output : SELF - alternatives:- alternative TypeSig:- child name : {Identifier}- child tp : {Type}- visit 0:- local output : _--}--- cata-sem_TypeSig :: TypeSig ->- T_TypeSig -sem_TypeSig !(TypeSig _name _tp ) =- (sem_TypeSig_TypeSig _name _tp )--- semantic domain-newtype T_TypeSig = T_TypeSig (( TypeSig ))-data Inh_TypeSig = Inh_TypeSig {}-data Syn_TypeSig = Syn_TypeSig {output_Syn_TypeSig :: !(TypeSig )}-wrap_TypeSig :: T_TypeSig ->- Inh_TypeSig ->- Syn_TypeSig -wrap_TypeSig !(T_TypeSig sem ) !(Inh_TypeSig ) =- (let ( !_lhsOoutput) =- (sem )- in (Syn_TypeSig _lhsOoutput ))-sem_TypeSig_TypeSig :: Identifier ->- Type ->- T_TypeSig -sem_TypeSig_TypeSig !name_ !tp_ =- (T_TypeSig (case (({-# LINE 498 "DefaultRules.ag" #-}- TypeSig name_ tp_- {-# LINE 2349 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 2353 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) )--- TypeSigs -----------------------------------------------------{-- visit 0:- synthesized attribute:- output : SELF - alternatives:- alternative Cons:- child hd : TypeSig - child tl : TypeSigs - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-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 (( TypeSigs ))-data Inh_TypeSigs = Inh_TypeSigs {}-data Syn_TypeSigs = Syn_TypeSigs {output_Syn_TypeSigs :: !(TypeSigs )}-wrap_TypeSigs :: T_TypeSigs ->- Inh_TypeSigs ->- Syn_TypeSigs -wrap_TypeSigs !(T_TypeSigs sem ) !(Inh_TypeSigs ) =- (let ( !_lhsOoutput) =- (sem )- in (Syn_TypeSigs _lhsOoutput ))-sem_TypeSigs_Cons :: T_TypeSig ->- T_TypeSigs ->- T_TypeSigs -sem_TypeSigs_Cons !(T_TypeSig hd_ ) !(T_TypeSigs tl_ ) =- (T_TypeSigs (case ((tl_ )) of- { ( !_tlIoutput) ->- (case ((hd_ )) of- { ( !_hdIoutput) ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2397 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 2401 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) }) }) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (case (({-# LINE 498 "DefaultRules.ag" #-}- []- {-# LINE 2408 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 498 "DefaultRules.ag" #-}- _output- {-# LINE 2412 "DefaultRules.hs" #-})) of+-- UUAGC 0.9.30 (DefaultRules.ag)+module DefaultRules where+{-# LINE 10 "DefaultRules.ag" #-}++import qualified List (delete,intersperse)++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 Maybe+import HsToken+import HsTokenScanner+import Data.List(intersperse)++import AbstractSyntax+import ErrorMessages++import Options(Options,modcopy,rename)+{-# LINE 26 "../src-derived/DefaultRules.hs" #-}++{-# LINE 2 "./AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import CommonTypes+{-# LINE 36 "../src-derived/DefaultRules.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 43 "../src-derived/DefaultRules.hs" #-}+{-# LINE 61 "DefaultRules.ag" #-}++fieldName n = '@' : getName n+ +locName n = '@' : getName n++attrName fld attr+ | fld == _LOC = '@' : getName attr + | otherwise = '@' : getName fld ++ "." ++ getName attr++_ACHILD = Ident "(" noPos -- hack+ + +getConName typeSyns rename nt con1 + | nt `elem` map fst typeSyns = synonym+ | otherwise = normalName+ where con = getName con1+ normalName | rename = getName nt++"_"++ con+ | otherwise = con+ synonym | con == "Cons" = "(:)"+ | con == "Nil" = "[]"+ | con == "Just" = "Just"+ | con == "Nothing" = "Nothing"+ | otherwise = normalName++++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 91 "../src-derived/DefaultRules.hs" #-}++{-# LINE 172 "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 -> Rule+makeRule (f1,a1) expr origin + = Rule Nothing+ (Alias f1 a1 (Underscore noPos) []) + expr + False + origin+ 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+ ]++ expr | Set.member n locals = attrName _LOC n+ | null elems = e+ | otherwise = foldr1 (\x y -> x ++ " " ++ op ++ " " ++ y) + (map (flip attrName n) elems)++ tks | Set.member n locals = [AGLocal n noPos Nothing]+ | null elems = lexTokens noPos e+ | otherwise = lexTokens noPos str+ where+ str = foldr1 (\x y -> x ++ " " ++ op ++ " " ++ y) + (map (flip attrName n) elems)++ in makeRule (_LHS,n) + (Expression noPos tks)+ ("use rule " ++ pos)+++++selfRule lhsNecLoc attr x + = let expr | lhsNecLoc = locName attr+ | otherwise = x++ tks | lhsNecLoc = [AGLocal attr noPos Nothing]+ | otherwise = lexTokens noPos x++ in makeRule (if lhsNecLoc then _LHS else _LOC,attr)+ (Expression noPos tks)+ "self rule"+ ++++concatRE rsess = let (rss,ess) = unzip rsess+ in (concat rss, concatSeq ess)+++copyRule :: Identifier -> Identifier -> Bool -> Set Identifier -> (Map Identifier Identifier, (Identifier,[Identifier])) -> ([Rule], Seq Error)+copyRule nt con modcopy locals (env,(fld,as)) + = concatRE (map copyRu as)+ + where + copyRu a+ = ( [ makeRule (fld,a) + (Expression noPos tks)+ (cruletxt sel)+ ]+ , err+ )+ + where + sel + | not modcopy + && Set.member a locals = Just _LOC+ | otherwise = Map.lookup a env++ (expr,err) + = case sel of+ Nothing -> ( missingRuleErrorExpr nt con fld a+ , Seq.singleton (MissingRule nt con fld a)+ )+ Just f + | f == _ACHILD -> ( fieldName a+ , Seq.singleton (deprecatedCopyRuleError nt con fld a)+ )+ | otherwise -> ( attrName f a+ , Seq.empty+ )+ + (tks,err')+ = case sel of+ Nothing -> ( [HsToken (missingRuleErrorExpr nt con fld a) noPos]+ , Seq.singleton (MissingRule nt con fld a)+ )+ Just f + | f == _ACHILD -> ( [AGLocal a noPos Nothing]+ , Seq.singleton (deprecatedCopyRuleError nt con fld a)+ )+ | otherwise -> ( [AGField f a noPos Nothing]+ , Seq.empty+ )++ 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 244 "../src-derived/DefaultRules.hs" #-}++{-# LINE 403 "DefaultRules.ag" #-}++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+ rhs = Expression noPos tks+ tks = [ HsToken "foldr ($) " noPos, AGLocal substSyn noPos Nothing, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]+ funs = intersperse (HsToken ", " noPos) (map (\n -> AGLocal 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) funNames exprs++ modify (Rule mbNm pat rhs owrt origin expl)+ | containsSyn pat = Rule mbNm (modifyPat pat) rhs owrt origin expl+ 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 parts) = (field == _LHS && attr == syn) || containsSyn pat || any containsSyn parts+ 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 parts)+ | field == _LHS && attr == syn = Alias _LOC substSyn (modifyPat pat) (map modifyPat parts)+ | otherwise = Alias field attr (modifyPat pat) (map modifyPat parts)+ modifyPat p = p++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+ rhs = Expression noPos tks+ tks = [ HsToken "\\s -> foldr ($) s " noPos, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]+ funs = intersperse (HsToken ", " noPos) (map (\n -> AGLocal 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) funNames exprs++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+ childLoc = Ident (show target ++ "_merge") (getPos target)+{-# LINE 301 "../src-derived/DefaultRules.hs" #-}++{-# LINE 518 "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 (Just nm) pat expr owrt origin expl) uniq+ = let pos = getPos nm+ r = Rule Nothing (Alias _LOC (Ident ("_rule_" ++ show nm) pos) (Underscore pos) []) expr owrt origin expl+ expr' = Expression pos tks+ tks = [AGLocal (Ident ("_rule_" ++ show nm) pos) pos (Just ("Indirection to rule " ++ show nm))]+ (rs,uniq') = multiRule (Rule Nothing pat expr' owrt origin False) uniq+ in (r:rs, uniq')++multiRule (Rule Nothing pat expr owrt origin expl) 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) pats+ 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' : rs9+ , n9+ )+ )+ f expl' w e p n + = ( p+ , ( [Rule Nothing (w p) e owrt origin expl']+ , n+ )+ )+ in snd (f expl id expr pat uniq)++{-# LINE 359 "../src-derived/DefaultRules.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ cr : Bool+ merged : Set Identifier+ nt : NontermIdent+ synthesized attributes:+ errors : Seq Error+ field : (Identifier,Type,Maybe (Maybe Type)) + inherited : Attributes+ name : Identifier+ output : SELF + synthesized : Attributes+ alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child inh : {Attributes}+ child syn : {Attributes}+ child virtual : {Maybe (Maybe Type)}+ visit 0:+ local output : _+-}+-- cata+sem_Child :: Child ->+ T_Child +sem_Child !(Child _name _tp _inh _syn _virtual ) =+ (sem_Child_Child _name _tp _inh _syn _virtual )+-- semantic domain+newtype T_Child = T_Child (ConstructorIdent ->+ Bool ->+ (Set Identifier) ->+ NontermIdent ->+ ( (Seq Error),( (Identifier,Type,Maybe (Maybe Type)) ),Attributes,Identifier,Child ,Attributes))+data Inh_Child = Inh_Child {con_Inh_Child :: !(ConstructorIdent),cr_Inh_Child :: !(Bool),merged_Inh_Child :: !((Set Identifier)),nt_Inh_Child :: !(NontermIdent)}+data Syn_Child = Syn_Child {errors_Syn_Child :: !((Seq Error)),field_Syn_Child :: !(( (Identifier,Type,Maybe (Maybe Type)) )),inherited_Syn_Child :: !(Attributes),name_Syn_Child :: !(Identifier),output_Syn_Child :: !(Child ),synthesized_Syn_Child :: !(Attributes)}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child +wrap_Child !(T_Child sem ) !(Inh_Child _lhsIcon _lhsIcr _lhsImerged _lhsInt ) =+ (let ( !_lhsOerrors,!_lhsOfield,!_lhsOinherited,!_lhsOname,!_lhsOoutput,!_lhsOsynthesized) = sem _lhsIcon _lhsIcr _lhsImerged _lhsInt + in (Syn_Child _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized ))+sem_Child_Child :: Identifier ->+ Type ->+ Attributes ->+ Attributes ->+ (Maybe (Maybe Type)) ->+ T_Child +sem_Child_Child !name_ !tp_ !inh_ !syn_ !virtual_ =+ (T_Child (\ (!_lhsIcon)+ (!_lhsIcr)+ (!_lhsImerged)+ (!_lhsInt) ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 417 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 477 "DefaultRules.ag" #-}+ (name_,tp_,virtual_)+ {-# LINE 421 "DefaultRules.hs" #-})) of+ { !_lhsOfield ->+ (case (({-# LINE 155 "DefaultRules.ag" #-}+ inh_+ {-# LINE 425 "DefaultRules.hs" #-})) of+ { !_lhsOinherited ->+ (case (({-# LINE 146 "DefaultRules.ag" #-}+ name_+ {-# LINE 429 "DefaultRules.hs" #-})) of+ { !_lhsOname ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ Child name_ tp_ inh_ syn_ virtual_+ {-# LINE 433 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 437 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 156 "DefaultRules.ag" #-}+ if name_ `Set.member` _lhsImerged+ then Map.empty+ else syn_+ {-# LINE 443 "DefaultRules.hs" #-})) of+ { !_lhsOsynthesized ->+ ( _lhsOerrors,_lhsOfield,_lhsOinherited,_lhsOname,_lhsOoutput,_lhsOsynthesized) }) }) }) }) }) }) })) )+-- Children ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ cr : Bool+ merged : Set Identifier+ nt : NontermIdent+ synthesized attributes:+ errors : Seq Error+ fields : [(Identifier,Type,Maybe (Maybe Type))]+ inputs : [(Identifier, Attributes)]+ output : SELF + outputs : [(Identifier, Attributes)]+ alternatives:+ alternative Cons:+ child hd : Child + child tl : Children + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+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 (ConstructorIdent ->+ Bool ->+ (Set Identifier) ->+ NontermIdent ->+ ( (Seq Error),([(Identifier,Type,Maybe (Maybe Type))]),([(Identifier, Attributes)]),Children ,([(Identifier, Attributes)])))+data Inh_Children = Inh_Children {con_Inh_Children :: !(ConstructorIdent),cr_Inh_Children :: !(Bool),merged_Inh_Children :: !((Set Identifier)),nt_Inh_Children :: !(NontermIdent)}+data Syn_Children = Syn_Children {errors_Syn_Children :: !((Seq Error)),fields_Syn_Children :: !(([(Identifier,Type,Maybe (Maybe Type))])),inputs_Syn_Children :: !(([(Identifier, Attributes)])),output_Syn_Children :: !(Children ),outputs_Syn_Children :: !(([(Identifier, Attributes)]))}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children +wrap_Children !(T_Children sem ) !(Inh_Children _lhsIcon _lhsIcr _lhsImerged _lhsInt ) =+ (let ( !_lhsOerrors,!_lhsOfields,!_lhsOinputs,!_lhsOoutput,!_lhsOoutputs) = sem _lhsIcon _lhsIcr _lhsImerged _lhsInt + in (Syn_Children _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs ))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children +sem_Children_Cons !(T_Child hd_ ) !(T_Children tl_ ) =+ (T_Children (\ (!_lhsIcon)+ (!_lhsIcr)+ (!_lhsImerged)+ (!_lhsInt) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 499 "DefaultRules.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 662 "DefaultRules.ag" #-}+ _lhsImerged+ {-# LINE 503 "DefaultRules.hs" #-})) of+ { !_tlOmerged ->+ (case (({-# LINE 47 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 507 "DefaultRules.hs" #-})) of+ { !_tlOcr ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 511 "DefaultRules.hs" #-})) of+ { !_tlOcon ->+ (case (tl_ _tlOcon _tlOcr _tlOmerged _tlOnt ) of+ { ( !_tlIerrors,!_tlIfields,!_tlIinputs,!_tlIoutput,!_tlIoutputs) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 517 "DefaultRules.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 662 "DefaultRules.ag" #-}+ _lhsImerged+ {-# LINE 521 "DefaultRules.hs" #-})) of+ { !_hdOmerged ->+ (case (({-# LINE 47 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 525 "DefaultRules.hs" #-})) of+ { !_hdOcr ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 529 "DefaultRules.hs" #-})) of+ { !_hdOcon ->+ (case (hd_ _hdOcon _hdOcr _hdOmerged _hdOnt ) of+ { ( !_hdIerrors,!_hdIfield,!_hdIinherited,!_hdIname,!_hdIoutput,!_hdIsynthesized) ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 535 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 473 "DefaultRules.ag" #-}+ _hdIfield : _tlIfields+ {-# LINE 539 "DefaultRules.hs" #-})) of+ { !_lhsOfields ->+ (case (({-# LINE 161 "DefaultRules.ag" #-}+ (_hdIname, _hdIinherited) : _tlIinputs+ {-# LINE 543 "DefaultRules.hs" #-})) of+ { !_lhsOinputs ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 547 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 551 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 162 "DefaultRules.ag" #-}+ (_hdIname, _hdIsynthesized) : _tlIoutputs+ {-# LINE 555 "DefaultRules.hs" #-})) of+ { !_lhsOoutputs ->+ ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Children_Nil :: T_Children +sem_Children_Nil =+ (T_Children (\ (!_lhsIcon)+ (!_lhsIcr)+ (!_lhsImerged)+ (!_lhsInt) ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 566 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 474 "DefaultRules.ag" #-}+ []+ {-# LINE 570 "DefaultRules.hs" #-})) of+ { !_lhsOfields ->+ (case (({-# LINE 163 "DefaultRules.ag" #-}+ []+ {-# LINE 574 "DefaultRules.hs" #-})) of+ { !_lhsOinputs ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ []+ {-# LINE 578 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 582 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 164 "DefaultRules.ag" #-}+ []+ {-# LINE 586 "DefaultRules.hs" #-})) of+ { !_lhsOoutputs ->+ ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) })) )+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ errors : Seq Error+ output : SELF + alternatives:+ alternative Grammar:+ child typeSyns : {TypeSyns}+ child useMap : {UseMap}+ child derivings : {Derivings}+ child wrappers : {Set NontermIdent}+ child nonts : Nonterminals + child pragmas : {PragmaMap}+ child manualAttrOrderMap : {AttrOrderMap}+ child paramMap : {ParamMap}+ child contextMap : {ContextMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}+ visit 0:+ local output : _+-}+-- cata+sem_Grammar :: Grammar ->+ T_Grammar +sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )+-- semantic domain+newtype T_Grammar = T_Grammar (Options ->+ ( (Seq Error),Grammar ))+data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: !(Options)}+data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: !((Seq Error)),output_Syn_Grammar :: !(Grammar )}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar +wrap_Grammar !(T_Grammar sem ) !(Inh_Grammar _lhsIoptions ) =+ (let ( !_lhsOerrors,!_lhsOoutput) = sem _lhsIoptions + in (Syn_Grammar _lhsOerrors _lhsOoutput ))+sem_Grammar_Grammar :: TypeSyns ->+ UseMap ->+ Derivings ->+ (Set NontermIdent) ->+ T_Nonterminals ->+ PragmaMap ->+ AttrOrderMap ->+ ParamMap ->+ ContextMap ->+ UniqueMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ T_Grammar +sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ =+ (T_Grammar (\ (!_lhsIoptions) ->+ (case (({-# LINE 664 "DefaultRules.ag" #-}+ mergeMap_+ {-# LINE 649 "DefaultRules.hs" #-})) of+ { !_nontsOmergesIn ->+ (case (({-# LINE 583 "DefaultRules.ag" #-}+ manualAttrOrderMap_+ {-# LINE 653 "DefaultRules.hs" #-})) of+ { !_nontsOmanualAttrOrderMap ->+ (case (({-# LINE 150 "DefaultRules.ag" #-}+ typeSyns_+ {-# LINE 657 "DefaultRules.hs" #-})) of+ { !_nontsOtypeSyns ->+ (case (({-# LINE 148 "DefaultRules.ag" #-}+ useMap_+ {-# LINE 661 "DefaultRules.hs" #-})) of+ { !_nontsOuseMap ->+ (case (({-# LINE 50 "DefaultRules.ag" #-}+ modcopy _lhsIoptions+ {-# LINE 665 "DefaultRules.hs" #-})) of+ { !_nontsOcr ->+ (case (({-# LINE 49 "DefaultRules.ag" #-}+ rename _lhsIoptions+ {-# LINE 669 "DefaultRules.hs" #-})) of+ { !_nontsOo_rename ->+ (case (nonts_ ) of+ { ( !_nontsIcollect_nts,!T_Nonterminals_1 nonts_1) ->+ (case (({-# LINE 656 "DefaultRules.ag" #-}+ aroundsMap_+ {-# LINE 675 "DefaultRules.hs" #-})) of+ { !_nontsOaroundsIn ->+ (case (({-# LINE 649 "DefaultRules.ag" #-}+ augmentsMap_+ {-# LINE 679 "DefaultRules.hs" #-})) of+ { !_nontsOaugmentsIn ->+ (case (({-# LINE 494 "DefaultRules.ag" #-}+ 1+ {-# LINE 683 "DefaultRules.hs" #-})) of+ { !_nontsOuniq ->+ (case (({-# LINE 127 "DefaultRules.ag" #-}+ _nontsIcollect_nts+ {-# LINE 687 "DefaultRules.hs" #-})) of+ { !_nontsOnonterminals ->+ (case (nonts_1 _nontsOaroundsIn _nontsOaugmentsIn _nontsOcr _nontsOmanualAttrOrderMap _nontsOmergesIn _nontsOnonterminals _nontsOo_rename _nontsOtypeSyns _nontsOuniq _nontsOuseMap ) of+ { ( !_nontsIerrors,!_nontsIoutput,!_nontsIuniq) ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _nontsIerrors+ {-# LINE 693 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_+ {-# LINE 697 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 701 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Nonterminal -------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ collect_nts : Set NontermIdent+ visit 1:+ inherited attributes:+ aroundsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ cr : Bool+ manualAttrOrderMap : AttrOrderMap+ mergesIn : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))+ nonterminals : Set NontermIdent+ o_rename : Bool+ typeSyns : TypeSyns+ useMap : UseMap+ chained attribute:+ uniq : Int+ synthesized attributes:+ errors : Seq Error+ output : SELF + alternatives:+ alternative Nonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : Productions + visit 1:+ local mergesIn : _+ local augmentsIn : _+ local aroundsIn : _+ local output : _+-}+-- cata+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 (( (Set NontermIdent),T_Nonterminal_1 ))+newtype T_Nonterminal_1 = T_Nonterminal_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ Bool ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->+ (Set NontermIdent) ->+ Bool ->+ TypeSyns ->+ Int ->+ UseMap ->+ ( (Seq Error),Nonterminal ,Int))+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),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),typeSyns_Inh_Nonterminal :: !(TypeSyns),uniq_Inh_Nonterminal :: !(Int),useMap_Inh_Nonterminal :: !(UseMap)}+data Syn_Nonterminal = Syn_Nonterminal {collect_nts_Syn_Nonterminal :: !((Set NontermIdent)),errors_Syn_Nonterminal :: !((Seq Error)),output_Syn_Nonterminal :: !(Nonterminal ),uniq_Syn_Nonterminal :: !(Int)}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal +wrap_Nonterminal !(T_Nonterminal sem ) !(Inh_Nonterminal _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap ) =+ (let ( !_lhsOcollect_nts,!T_Nonterminal_1 sem_1) = sem + ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap + in (Syn_Nonterminal _lhsOcollect_nts _lhsOerrors _lhsOoutput _lhsOuniq ))+sem_Nonterminal_Nonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_Productions ->+ T_Nonterminal +sem_Nonterminal_Nonterminal !nt_ !params_ !inh_ !syn_ !(T_Productions prods_ ) =+ (T_Nonterminal (case (({-# LINE 123 "DefaultRules.ag" #-}+ Set.singleton nt_+ {-# LINE 774 "DefaultRules.hs" #-})) of+ { !_lhsOcollect_nts ->+ (case ((let sem_Nonterminal_Nonterminal_1 :: T_Nonterminal_1 + sem_Nonterminal_Nonterminal_1 =+ (T_Nonterminal_1 (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsIo_rename)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap) ->+ (case (({-# LINE 55 "DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 790 "DefaultRules.hs" #-})) of+ { !_prodsOtypeSyns ->+ (case (({-# LINE 43 "DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 794 "DefaultRules.hs" #-})) of+ { !_prodsOo_rename ->+ (case (({-# LINE 665 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergesIn+ {-# LINE 798 "DefaultRules.hs" #-})) of+ { !_mergesIn ->+ (case (({-# LINE 661 "DefaultRules.ag" #-}+ _mergesIn+ {-# LINE 802 "DefaultRules.hs" #-})) of+ { !_prodsOmergesIn ->+ (case (({-# LINE 579 "DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 806 "DefaultRules.hs" #-})) of+ { !_prodsOmanualAttrOrderMap ->+ (case (({-# LINE 44 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 810 "DefaultRules.hs" #-})) of+ { !_prodsOcr ->+ (case (({-# LINE 152 "DefaultRules.ag" #-}+ nt_+ {-# LINE 814 "DefaultRules.hs" #-})) of+ { !_prodsOnt ->+ (case (({-# LINE 140 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIuseMap+ {-# LINE 818 "DefaultRules.hs" #-})) of+ { !_prodsOuseMap ->+ (case (({-# LINE 139 "DefaultRules.ag" #-}+ syn_+ {-# LINE 822 "DefaultRules.hs" #-})) of+ { !_prodsOsyn ->+ (case (({-# LINE 138 "DefaultRules.ag" #-}+ inh_+ {-# LINE 826 "DefaultRules.hs" #-})) of+ { !_prodsOinh ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 830 "DefaultRules.hs" #-})) of+ { !_prodsOuniq ->+ (case (({-# LINE 125 "DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 834 "DefaultRules.hs" #-})) of+ { !_prodsOnonterminals ->+ (case (({-# LINE 650 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn+ {-# LINE 838 "DefaultRules.hs" #-})) of+ { !_augmentsIn ->+ (case (({-# LINE 647 "DefaultRules.ag" #-}+ _augmentsIn+ {-# LINE 842 "DefaultRules.hs" #-})) of+ { !_prodsOaugmentsIn ->+ (case (({-# LINE 657 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundsIn+ {-# LINE 846 "DefaultRules.hs" #-})) of+ { !_aroundsIn ->+ (case (({-# LINE 654 "DefaultRules.ag" #-}+ _aroundsIn+ {-# LINE 850 "DefaultRules.hs" #-})) of+ { !_prodsOaroundsIn ->+ (case (prods_ _prodsOaroundsIn _prodsOaugmentsIn _prodsOcr _prodsOinh _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnonterminals _prodsOnt _prodsOo_rename _prodsOsyn _prodsOtypeSyns _prodsOuniq _prodsOuseMap ) of+ { ( !_prodsIerrors,!_prodsIoutput,!_prodsIuniq) ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _prodsIerrors+ {-# LINE 856 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ Nonterminal nt_ params_ inh_ syn_ _prodsIoutput+ {-# LINE 860 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 864 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _prodsIuniq+ {-# LINE 868 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Nonterminal_Nonterminal_1)) of+ { ( !sem_Nonterminal_1) ->+ ( _lhsOcollect_nts,sem_Nonterminal_1) }) }) )+-- Nonterminals ------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ collect_nts : Set NontermIdent+ visit 1:+ inherited attributes:+ aroundsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ cr : Bool+ manualAttrOrderMap : AttrOrderMap+ mergesIn : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))+ nonterminals : Set NontermIdent+ o_rename : Bool+ typeSyns : TypeSyns+ useMap : UseMap+ chained attribute:+ uniq : Int+ synthesized attributes:+ errors : Seq Error+ output : SELF + alternatives:+ alternative Cons:+ child hd : Nonterminal + child tl : Nonterminals + visit 1:+ local output : _+ alternative Nil:+ visit 1:+ local output : _+-}+-- cata+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 (( (Set NontermIdent),T_Nonterminals_1 ))+newtype T_Nonterminals_1 = T_Nonterminals_1 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ Bool ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->+ (Set NontermIdent) ->+ Bool ->+ TypeSyns ->+ Int ->+ UseMap ->+ ( (Seq Error),Nonterminals ,Int))+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),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),typeSyns_Inh_Nonterminals :: !(TypeSyns),uniq_Inh_Nonterminals :: !(Int),useMap_Inh_Nonterminals :: !(UseMap)}+data Syn_Nonterminals = Syn_Nonterminals {collect_nts_Syn_Nonterminals :: !((Set NontermIdent)),errors_Syn_Nonterminals :: !((Seq Error)),output_Syn_Nonterminals :: !(Nonterminals ),uniq_Syn_Nonterminals :: !(Int)}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals +wrap_Nonterminals !(T_Nonterminals sem ) !(Inh_Nonterminals _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap ) =+ (let ( !_lhsOcollect_nts,!T_Nonterminals_1 sem_1) = sem + ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap + in (Syn_Nonterminals _lhsOcollect_nts _lhsOerrors _lhsOoutput _lhsOuniq ))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals +sem_Nonterminals_Cons !(T_Nonterminal hd_ ) !(T_Nonterminals tl_ ) =+ (T_Nonterminals (case (tl_ ) of+ { ( !_tlIcollect_nts,!T_Nonterminals_1 tl_1) ->+ (case (hd_ ) of+ { ( !_hdIcollect_nts,!T_Nonterminal_1 hd_1) ->+ (case (({-# LINE 121 "DefaultRules.ag" #-}+ _hdIcollect_nts `Set.union` _tlIcollect_nts+ {-# LINE 942 "DefaultRules.hs" #-})) of+ { !_lhsOcollect_nts ->+ (case ((let sem_Nonterminals_Cons_1 :: T_Nonterminals_1 + sem_Nonterminals_Cons_1 =+ (T_Nonterminals_1 (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsIo_rename)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap) ->+ (case (({-# LINE 134 "DefaultRules.ag" #-}+ _lhsIuseMap+ {-# LINE 958 "DefaultRules.hs" #-})) of+ { !_tlOuseMap ->+ (case (({-# LINE 55 "DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 962 "DefaultRules.hs" #-})) of+ { !_tlOtypeSyns ->+ (case (({-# LINE 43 "DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 966 "DefaultRules.hs" #-})) of+ { !_tlOo_rename ->+ (case (({-# LINE 660 "DefaultRules.ag" #-}+ _lhsImergesIn+ {-# LINE 970 "DefaultRules.hs" #-})) of+ { !_tlOmergesIn ->+ (case (({-# LINE 579 "DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 974 "DefaultRules.hs" #-})) of+ { !_tlOmanualAttrOrderMap ->+ (case (({-# LINE 44 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 978 "DefaultRules.hs" #-})) of+ { !_tlOcr ->+ (case (({-# LINE 134 "DefaultRules.ag" #-}+ _lhsIuseMap+ {-# LINE 982 "DefaultRules.hs" #-})) of+ { !_hdOuseMap ->+ (case (({-# LINE 55 "DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 986 "DefaultRules.hs" #-})) of+ { !_hdOtypeSyns ->+ (case (({-# LINE 43 "DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 990 "DefaultRules.hs" #-})) of+ { !_hdOo_rename ->+ (case (({-# LINE 660 "DefaultRules.ag" #-}+ _lhsImergesIn+ {-# LINE 994 "DefaultRules.hs" #-})) of+ { !_hdOmergesIn ->+ (case (({-# LINE 579 "DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 998 "DefaultRules.hs" #-})) of+ { !_hdOmanualAttrOrderMap ->+ (case (({-# LINE 44 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 1002 "DefaultRules.hs" #-})) of+ { !_hdOcr ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 1006 "DefaultRules.hs" #-})) of+ { !_hdOuniq ->+ (case (({-# LINE 125 "DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 1010 "DefaultRules.hs" #-})) of+ { !_hdOnonterminals ->+ (case (({-# LINE 646 "DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 1014 "DefaultRules.hs" #-})) of+ { !_hdOaugmentsIn ->+ (case (({-# LINE 653 "DefaultRules.ag" #-}+ _lhsIaroundsIn+ {-# LINE 1018 "DefaultRules.hs" #-})) of+ { !_hdOaroundsIn ->+ (case (hd_1 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOmanualAttrOrderMap _hdOmergesIn _hdOnonterminals _hdOo_rename _hdOtypeSyns _hdOuniq _hdOuseMap ) of+ { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _hdIuniq+ {-# LINE 1024 "DefaultRules.hs" #-})) of+ { !_tlOuniq ->+ (case (({-# LINE 125 "DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 1028 "DefaultRules.hs" #-})) of+ { !_tlOnonterminals ->+ (case (({-# LINE 646 "DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 1032 "DefaultRules.hs" #-})) of+ { !_tlOaugmentsIn ->+ (case (({-# LINE 653 "DefaultRules.ag" #-}+ _lhsIaroundsIn+ {-# LINE 1036 "DefaultRules.hs" #-})) of+ { !_tlOaroundsIn ->+ (case (tl_1 _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOmanualAttrOrderMap _tlOmergesIn _tlOnonterminals _tlOo_rename _tlOtypeSyns _tlOuniq _tlOuseMap ) of+ { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1042 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1046 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 1050 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _tlIuniq+ {-# LINE 1054 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Nonterminals_Cons_1)) of+ { ( !sem_Nonterminals_1) ->+ ( _lhsOcollect_nts,sem_Nonterminals_1) }) }) }) }) )+sem_Nonterminals_Nil :: T_Nonterminals +sem_Nonterminals_Nil =+ (T_Nonterminals (case (({-# LINE 121 "DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1064 "DefaultRules.hs" #-})) of+ { !_lhsOcollect_nts ->+ (case ((let sem_Nonterminals_Nil_1 :: T_Nonterminals_1 + sem_Nonterminals_Nil_1 =+ (T_Nonterminals_1 (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsIo_rename)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap) ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 1080 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ []+ {-# LINE 1084 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 1088 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 1092 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) )+ in sem_Nonterminals_Nil_1)) of+ { ( !sem_Nonterminals_1) ->+ ( _lhsOcollect_nts,sem_Nonterminals_1) }) }) )+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ nt : NontermIdent+ synthesized attributes:+ containsVars : Bool+ copy : SELF + definedAttrs : Set (Identifier,Identifier)+ errors : Seq Error+ locals : Set Identifier+ output : SELF + alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + child parts : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ local output : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+ local output : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern +sem_Pattern !(Alias _field _attr _pat _parts ) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )+sem_Pattern !(Constr _name _pats ) =+ (sem_Pattern_Constr _name (sem_Patterns _pats ) )+sem_Pattern !(Irrefutable _pat ) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat ) )+sem_Pattern !(Product _pos _pats ) =+ (sem_Pattern_Product _pos (sem_Patterns _pats ) )+sem_Pattern !(Underscore _pos ) =+ (sem_Pattern_Underscore _pos )+-- semantic domain+newtype T_Pattern = T_Pattern (ConstructorIdent ->+ NontermIdent ->+ ( Bool,Pattern ,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Pattern ))+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 )}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern +wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIcon _lhsInt ) =+ (let ( !_lhsOcontainsVars,!_lhsOcopy,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput) = sem _lhsIcon _lhsInt + in (Syn_Pattern _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput ))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) !(T_Patterns parts_ ) =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 485 "DefaultRules.ag" #-}+ True+ {-# LINE 1178 "DefaultRules.hs" #-})) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1182 "DefaultRules.hs" #-})) of+ { !_partsOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1186 "DefaultRules.hs" #-})) of+ { !_partsOcon ->+ (case (parts_ _partsOcon _partsOnt ) of+ { ( !_partsIcontainsVars,!_partsIcopy,!_partsIdefinedAttrs,!_partsIerrors,!_partsIlocals,!_partsIoutput) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1192 "DefaultRules.hs" #-})) of+ { !_patOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1196 "DefaultRules.hs" #-})) of+ { !_patOcon ->+ (case (pat_ _patOcon _patOnt ) of+ { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Alias field_ attr_ _patIcopy _partsIcopy+ {-# LINE 1202 "DefaultRules.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1206 "DefaultRules.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 467 "DefaultRules.ag" #-}+ Set.insert (field_,attr_) _patIdefinedAttrs+ {-# LINE 1210 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _patIerrors Seq.>< _partsIerrors+ {-# LINE 1214 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 468 "DefaultRules.ag" #-}+ if field_ == _LOC+ then Set.insert attr_ _patIlocals+ else _patIlocals+ {-# LINE 1220 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ Alias field_ attr_ _patIoutput _partsIoutput+ {-# LINE 1224 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 1228 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1239 "DefaultRules.hs" #-})) of+ { !_patsOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1243 "DefaultRules.hs" #-})) of+ { !_patsOcon ->+ (case (pats_ _patsOcon _patsOnt ) of+ { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _patsIcontainsVars+ {-# LINE 1249 "DefaultRules.hs" #-})) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 1253 "DefaultRules.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1257 "DefaultRules.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 462 "DefaultRules.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 1261 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _patsIerrors+ {-# LINE 1265 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 461 "DefaultRules.ag" #-}+ _patsIlocals+ {-# LINE 1269 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ Constr name_ _patsIoutput+ {-# LINE 1273 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 1277 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern +sem_Pattern_Irrefutable !(T_Pattern pat_ ) =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1287 "DefaultRules.hs" #-})) of+ { !_patOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1291 "DefaultRules.hs" #-})) of+ { !_patOcon ->+ (case (pat_ _patOcon _patOnt ) of+ { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _patIcontainsVars+ {-# LINE 1297 "DefaultRules.hs" #-})) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 1301 "DefaultRules.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1305 "DefaultRules.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 462 "DefaultRules.ag" #-}+ _patIdefinedAttrs+ {-# LINE 1309 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _patIerrors+ {-# LINE 1313 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 461 "DefaultRules.ag" #-}+ _patIlocals+ {-# LINE 1317 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ Irrefutable _patIoutput+ {-# LINE 1321 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 1325 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1336 "DefaultRules.hs" #-})) of+ { !_patsOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1340 "DefaultRules.hs" #-})) of+ { !_patsOcon ->+ (case (pats_ _patsOcon _patsOnt ) of+ { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _patsIcontainsVars+ {-# LINE 1346 "DefaultRules.hs" #-})) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 1350 "DefaultRules.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1354 "DefaultRules.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 462 "DefaultRules.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 1358 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _patsIerrors+ {-# LINE 1362 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 461 "DefaultRules.ag" #-}+ _patsIlocals+ {-# LINE 1366 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ Product pos_ _patsIoutput+ {-# LINE 1370 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 1374 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )+sem_Pattern_Underscore :: Pos ->+ T_Pattern +sem_Pattern_Underscore !pos_ =+ (T_Pattern (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ False+ {-# LINE 1384 "DefaultRules.hs" #-})) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Underscore pos_+ {-# LINE 1388 "DefaultRules.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1392 "DefaultRules.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 462 "DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1396 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 1400 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 461 "DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1404 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ Underscore pos_+ {-# LINE 1408 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 1412 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })) )+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ nt : NontermIdent+ synthesized attributes:+ containsVars : Bool+ copy : SELF + definedAttrs : Set (Identifier,Identifier)+ errors : Seq Error+ locals : Set Identifier+ output : SELF + alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ local output : _+ alternative Nil:+ visit 0:+ local copy : _+ local output : _+-}+-- cata+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 (ConstructorIdent ->+ NontermIdent ->+ ( Bool,Patterns ,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Patterns ))+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 )}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns +wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIcon _lhsInt ) =+ (let ( !_lhsOcontainsVars,!_lhsOcopy,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput) = sem _lhsIcon _lhsInt + in (Syn_Patterns _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput ))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns +sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =+ (T_Patterns (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1465 "DefaultRules.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1469 "DefaultRules.hs" #-})) of+ { !_tlOcon ->+ (case (tl_ _tlOcon _tlOnt ) of+ { ( !_tlIcontainsVars,!_tlIcopy,!_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1475 "DefaultRules.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 1479 "DefaultRules.hs" #-})) of+ { !_hdOcon ->+ (case (hd_ _hdOcon _hdOnt ) of+ { ( !_hdIcontainsVars,!_hdIcopy,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput) ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _hdIcontainsVars || _tlIcontainsVars+ {-# LINE 1485 "DefaultRules.hs" #-})) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 1489 "DefaultRules.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1493 "DefaultRules.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 462 "DefaultRules.ag" #-}+ _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs+ {-# LINE 1497 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1501 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 461 "DefaultRules.ag" #-}+ _hdIlocals `Set.union` _tlIlocals+ {-# LINE 1505 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1509 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 1513 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil =+ (T_Patterns (\ (!_lhsIcon)+ (!_lhsInt) ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ False+ {-# LINE 1522 "DefaultRules.hs" #-})) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ []+ {-# LINE 1526 "DefaultRules.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1530 "DefaultRules.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 462 "DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1534 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 1538 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 461 "DefaultRules.ag" #-}+ Set.empty+ {-# LINE 1542 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ []+ {-# LINE 1546 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 1550 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })) )+-- Production --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundsIn : Map ConstructorIdent (Map Identifier [Expression])+ augmentsIn : Map ConstructorIdent (Map Identifier [Expression])+ cr : Bool+ inh : Attributes+ manualAttrOrderMap : AttrOrderMap+ mergesIn : Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))+ nonterminals : Set NontermIdent+ nt : NontermIdent+ o_rename : Bool+ syn : Attributes+ typeSyns : TypeSyns+ useMap : Map Identifier (String,String,String)+ chained attribute:+ uniq : Int+ synthesized attributes:+ errors : Seq Error+ output : SELF + alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + visit 0:+ local mergesIn : _+ local merged : _+ local orderDeps : _+ local orderErrs : _+ local _tup1 : _+ local errs : _+ local aroundsIn : _+ local augmentsIn : _+ local newRls : _+ local extra1 : _+ local extra2 : _+ local extra3 : _+-}+-- cata+sem_Production :: Production ->+ T_Production +sem_Production !(Production _con _children _rules _typeSigs ) =+ (sem_Production_Production _con (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) )+-- semantic domain+newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->+ (Map ConstructorIdent (Map Identifier [Expression])) ->+ Bool ->+ Attributes ->+ AttrOrderMap ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->+ (Set NontermIdent) ->+ NontermIdent ->+ Bool ->+ Attributes ->+ TypeSyns ->+ Int ->+ (Map Identifier (String,String,String)) ->+ ( (Seq Error),Production ,Int))+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),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),syn_Inh_Production :: !(Attributes),typeSyns_Inh_Production :: !(TypeSyns),uniq_Inh_Production :: !(Int),useMap_Inh_Production :: !((Map Identifier (String,String,String)))}+data Syn_Production = Syn_Production {errors_Syn_Production :: !((Seq Error)),output_Syn_Production :: !(Production ),uniq_Syn_Production :: !(Int)}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production +wrap_Production !(T_Production sem ) !(Inh_Production _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap ) =+ (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap + in (Syn_Production _lhsOerrors _lhsOoutput _lhsOuniq ))+sem_Production_Production :: ConstructorIdent ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ T_Production +sem_Production_Production !con_ !(T_Children children_ ) !(T_Rules rules_ ) !(T_TypeSigs typeSigs_ ) =+ (T_Production (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsIinh)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsInt)+ (!_lhsIo_rename)+ (!_lhsIsyn)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap) ->+ (case (({-# LINE 666 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergesIn+ {-# LINE 1643 "DefaultRules.hs" #-})) of+ { !_mergesIn ->+ (case (({-# LINE 667 "DefaultRules.ag" #-}+ Set.fromList [ c | (_,cs,_) <- Map.elems _mergesIn , c <- cs ]+ {-# LINE 1647 "DefaultRules.hs" #-})) of+ { !_merged ->+ (case (({-# LINE 662 "DefaultRules.ag" #-}+ _merged+ {-# LINE 1651 "DefaultRules.hs" #-})) of+ { !_childrenOmerged ->+ (case (({-# LINE 593 "DefaultRules.ag" #-}+ Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrOrderMap+ {-# LINE 1655 "DefaultRules.hs" #-})) of+ { !_orderDeps ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 1659 "DefaultRules.hs" #-})) of+ { !_rulesOuniq ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1663 "DefaultRules.hs" #-})) of+ { !_rulesOnt ->+ (case (({-# LINE 143 "DefaultRules.ag" #-}+ con_+ {-# LINE 1667 "DefaultRules.hs" #-})) of+ { !_rulesOcon ->+ (case (rules_ _rulesOcon _rulesOnt _rulesOuniq ) of+ { ( !_rulesIdefinedAttrs,!_rulesIerrors,!_rulesIlocals,!_rulesIoutput,!_rulesIruleNames,!_rulesIuniq) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1673 "DefaultRules.hs" #-})) of+ { !_childrenOnt ->+ (case (({-# LINE 47 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 1677 "DefaultRules.hs" #-})) of+ { !_childrenOcr ->+ (case (({-# LINE 144 "DefaultRules.ag" #-}+ con_+ {-# LINE 1681 "DefaultRules.hs" #-})) of+ { !_childrenOcon ->+ (case (children_ _childrenOcon _childrenOcr _childrenOmerged _childrenOnt ) of+ { ( !_childrenIerrors,!_childrenIfields,!_childrenIinputs,!_childrenIoutput,!_childrenIoutputs) ->+ (case (({-# LINE 595 "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 1721 "DefaultRules.hs" #-})) of+ { !_orderErrs ->+ (case (({-# LINE 332 "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.partition isSELFNonterminal _lhsIsyn+ (_,undefAttrs)+ = removeDefined _rulesIdefinedAttrs (_LHS, normalAttrs)+ (useAttrs,others)+ = splitAttrs _lhsIuseMap undefAttrs+ (rules1, errors1)+ = concatRE $ map (copyRule _lhsInt con_ _lhsIcr locals)+ (zip envs (map (removeDefined _rulesIdefinedAttrs) _childrenIinputs))+ uRules+ = map (useRule locals _childrenIoutputs) useAttrs+ selfLocRules+ = [ selfRule False attr (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+ | getName con_ == "Tuple" && _lhsInt `elem` map fst _lhsItypeSyns+ = "(" ++ concat (List.intersperse "," fs) ++ ")"+ | otherwise+ = getConName _lhsItypeSyns _lhsIo_rename _lhsInt con_ ++ " " ++ unwords fs+ childExists Nothing = True+ childExists (Just (Just _)) = True+ childExists (Just Nothing) = False+ selfRules+ = [ selfRule True attr undefined+ | attr <- Map.keys selfAttrs+ , not (Set.member (_LHS,attr) _rulesIdefinedAttrs)+ ]+ (rules5, errs5)+ = copyRule _lhsInt+ con_+ _lhsIcr+ locals+ (lhs_env, (_LHS, others))+ in (uRules++selfLocRules++selfRules++rules5++rules1, errors1><errs5)+ {-# LINE 1780 "DefaultRules.hs" #-})) of+ { !__tup1 ->+ (case (({-# LINE 332 "DefaultRules.ag" #-}+ __tup1+ {-# LINE 1784 "DefaultRules.hs" #-})) of+ { !(_,!_errs) ->+ (case (({-# LINE 330 "DefaultRules.ag" #-}+ _childrenIerrors >< _errs >< _rulesIerrors >< _orderErrs+ {-# LINE 1788 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 658 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaroundsIn+ {-# LINE 1792 "DefaultRules.hs" #-})) of+ { !_aroundsIn ->+ (case (({-# LINE 651 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaugmentsIn+ {-# LINE 1796 "DefaultRules.hs" #-})) of+ { !_augmentsIn ->+ (case (({-# LINE 332 "DefaultRules.ag" #-}+ __tup1+ {-# LINE 1800 "DefaultRules.hs" #-})) of+ { !(!_newRls,_) ->+ (case (({-# LINE 505 "DefaultRules.ag" #-}+ foldr addAugments (_rulesIoutput ++ _newRls) (Map.assocs _augmentsIn )+ {-# LINE 1804 "DefaultRules.hs" #-})) of+ { !_extra1 ->+ (case (({-# LINE 506 "DefaultRules.ag" #-}+ foldr addArounds _extra1 (Map.assocs _aroundsIn )+ {-# LINE 1808 "DefaultRules.hs" #-})) of+ { !_extra2 ->+ (case (({-# LINE 507 "DefaultRules.ag" #-}+ foldr addMerges _extra2 (Map.assocs _mergesIn )+ {-# LINE 1812 "DefaultRules.hs" #-})) of+ { !_extra3 ->+ (case (typeSigs_ ) of+ { ( !_typeSigsIoutput) ->+ (case (({-# LINE 508 "DefaultRules.ag" #-}+ Production con_ _childrenIoutput _extra3 _typeSigsIoutput+ {-# LINE 1818 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _rulesIuniq+ {-# LINE 1822 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Productions -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ aroundsIn : Map ConstructorIdent (Map Identifier [Expression])+ augmentsIn : Map ConstructorIdent (Map Identifier [Expression])+ cr : Bool+ inh : Attributes+ manualAttrOrderMap : AttrOrderMap+ mergesIn : Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))+ nonterminals : Set NontermIdent+ nt : NontermIdent+ o_rename : Bool+ syn : Attributes+ typeSyns : TypeSyns+ useMap : Map Identifier (String,String,String)+ chained attribute:+ uniq : Int+ synthesized attributes:+ errors : Seq Error+ output : SELF + alternatives:+ alternative Cons:+ child hd : Production + child tl : Productions + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+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 ((Map ConstructorIdent (Map Identifier [Expression])) ->+ (Map ConstructorIdent (Map Identifier [Expression])) ->+ Bool ->+ Attributes ->+ AttrOrderMap ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->+ (Set NontermIdent) ->+ NontermIdent ->+ Bool ->+ Attributes ->+ TypeSyns ->+ Int ->+ (Map Identifier (String,String,String)) ->+ ( (Seq Error),Productions ,Int))+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),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),syn_Inh_Productions :: !(Attributes),typeSyns_Inh_Productions :: !(TypeSyns),uniq_Inh_Productions :: !(Int),useMap_Inh_Productions :: !((Map Identifier (String,String,String)))}+data Syn_Productions = Syn_Productions {errors_Syn_Productions :: !((Seq Error)),output_Syn_Productions :: !(Productions ),uniq_Syn_Productions :: !(Int)}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions +wrap_Productions !(T_Productions sem ) !(Inh_Productions _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap ) =+ (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) = sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap + in (Syn_Productions _lhsOerrors _lhsOoutput _lhsOuniq ))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions +sem_Productions_Cons !(T_Production hd_ ) !(T_Productions tl_ ) =+ (T_Productions (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsIinh)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsInt)+ (!_lhsIo_rename)+ (!_lhsIsyn)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap) ->+ (case (({-# LINE 135 "DefaultRules.ag" #-}+ _lhsIuseMap+ {-# LINE 1903 "DefaultRules.hs" #-})) of+ { !_tlOuseMap ->+ (case (({-# LINE 55 "DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 1907 "DefaultRules.hs" #-})) of+ { !_tlOtypeSyns ->+ (case (({-# LINE 135 "DefaultRules.ag" #-}+ _lhsIsyn+ {-# LINE 1911 "DefaultRules.hs" #-})) of+ { !_tlOsyn ->+ (case (({-# LINE 43 "DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 1915 "DefaultRules.hs" #-})) of+ { !_tlOo_rename ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1919 "DefaultRules.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 661 "DefaultRules.ag" #-}+ _lhsImergesIn+ {-# LINE 1923 "DefaultRules.hs" #-})) of+ { !_tlOmergesIn ->+ (case (({-# LINE 579 "DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 1927 "DefaultRules.hs" #-})) of+ { !_tlOmanualAttrOrderMap ->+ (case (({-# LINE 135 "DefaultRules.ag" #-}+ _lhsIinh+ {-# LINE 1931 "DefaultRules.hs" #-})) of+ { !_tlOinh ->+ (case (({-# LINE 44 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 1935 "DefaultRules.hs" #-})) of+ { !_tlOcr ->+ (case (({-# LINE 135 "DefaultRules.ag" #-}+ _lhsIuseMap+ {-# LINE 1939 "DefaultRules.hs" #-})) of+ { !_hdOuseMap ->+ (case (({-# LINE 55 "DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 1943 "DefaultRules.hs" #-})) of+ { !_hdOtypeSyns ->+ (case (({-# LINE 135 "DefaultRules.ag" #-}+ _lhsIsyn+ {-# LINE 1947 "DefaultRules.hs" #-})) of+ { !_hdOsyn ->+ (case (({-# LINE 43 "DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 1951 "DefaultRules.hs" #-})) of+ { !_hdOo_rename ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 1955 "DefaultRules.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 661 "DefaultRules.ag" #-}+ _lhsImergesIn+ {-# LINE 1959 "DefaultRules.hs" #-})) of+ { !_hdOmergesIn ->+ (case (({-# LINE 579 "DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 1963 "DefaultRules.hs" #-})) of+ { !_hdOmanualAttrOrderMap ->+ (case (({-# LINE 135 "DefaultRules.ag" #-}+ _lhsIinh+ {-# LINE 1967 "DefaultRules.hs" #-})) of+ { !_hdOinh ->+ (case (({-# LINE 44 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 1971 "DefaultRules.hs" #-})) of+ { !_hdOcr ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 1975 "DefaultRules.hs" #-})) of+ { !_hdOuniq ->+ (case (({-# LINE 125 "DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 1979 "DefaultRules.hs" #-})) of+ { !_hdOnonterminals ->+ (case (({-# LINE 647 "DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 1983 "DefaultRules.hs" #-})) of+ { !_hdOaugmentsIn ->+ (case (({-# LINE 654 "DefaultRules.ag" #-}+ _lhsIaroundsIn+ {-# LINE 1987 "DefaultRules.hs" #-})) of+ { !_hdOaroundsIn ->+ (case (hd_ _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinh _hdOmanualAttrOrderMap _hdOmergesIn _hdOnonterminals _hdOnt _hdOo_rename _hdOsyn _hdOtypeSyns _hdOuniq _hdOuseMap ) of+ { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _hdIuniq+ {-# LINE 1993 "DefaultRules.hs" #-})) of+ { !_tlOuniq ->+ (case (({-# LINE 125 "DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 1997 "DefaultRules.hs" #-})) of+ { !_tlOnonterminals ->+ (case (({-# LINE 647 "DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 2001 "DefaultRules.hs" #-})) of+ { !_tlOaugmentsIn ->+ (case (({-# LINE 654 "DefaultRules.ag" #-}+ _lhsIaroundsIn+ {-# LINE 2005 "DefaultRules.hs" #-})) of+ { !_tlOaroundsIn ->+ (case (tl_ _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOinh _tlOmanualAttrOrderMap _tlOmergesIn _tlOnonterminals _tlOnt _tlOo_rename _tlOsyn _tlOtypeSyns _tlOuniq _tlOuseMap ) of+ { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2011 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2015 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 2019 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _tlIuniq+ {-# LINE 2023 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Productions_Nil :: T_Productions +sem_Productions_Nil =+ (T_Productions (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsIinh)+ (!_lhsImanualAttrOrderMap)+ (!_lhsImergesIn)+ (!_lhsInonterminals)+ (!_lhsInt)+ (!_lhsIo_rename)+ (!_lhsIsyn)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap) ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 2043 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ []+ {-# LINE 2047 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 2051 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 2055 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) )+-- Rule --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ nt : NontermIdent+ chained attribute:+ uniq : Int+ synthesized attributes:+ containsVars : Bool+ definedAttrs : Set (Identifier,Identifier)+ errors : Seq Error+ locals : Set Identifier+ output : SELF + outputs : Rules + ruleNames : Set Identifier+ alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : {Expression}+ child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ visit 0:+ local output : _+ local _tup2 : {(Rules,Int)}+-}+-- cata+sem_Rule :: Rule ->+ T_Rule +sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit ) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern ) _rhs _owrt _origin _explicit )+-- semantic domain+newtype T_Rule = T_Rule (ConstructorIdent ->+ NontermIdent ->+ Int ->+ ( Bool,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rule ,Rules ,(Set Identifier),Int))+data Inh_Rule = Inh_Rule {con_Inh_Rule :: !(ConstructorIdent),nt_Inh_Rule :: !(NontermIdent),uniq_Inh_Rule :: !(Int)}+data Syn_Rule = Syn_Rule {containsVars_Syn_Rule :: !(Bool),definedAttrs_Syn_Rule :: !((Set (Identifier,Identifier))),errors_Syn_Rule :: !((Seq Error)),locals_Syn_Rule :: !((Set Identifier)),output_Syn_Rule :: !(Rule ),outputs_Syn_Rule :: !(Rules ),ruleNames_Syn_Rule :: !((Set Identifier)),uniq_Syn_Rule :: !(Int)}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule +wrap_Rule !(T_Rule sem ) !(Inh_Rule _lhsIcon _lhsInt _lhsIuniq ) =+ (let ( !_lhsOcontainsVars,!_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput,!_lhsOoutputs,!_lhsOruleNames,!_lhsOuniq) = sem _lhsIcon _lhsInt _lhsIuniq + in (Syn_Rule _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq ))+sem_Rule_Rule :: (Maybe Identifier) ->+ T_Pattern ->+ Expression ->+ Bool ->+ String ->+ Bool ->+ T_Rule +sem_Rule_Rule !mbName_ !(T_Pattern pattern_ ) !rhs_ !owrt_ !origin_ !explicit_ =+ (T_Rule (\ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIuniq) ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2117 "DefaultRules.hs" #-})) of+ { !_patternOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 2121 "DefaultRules.hs" #-})) of+ { !_patternOcon ->+ (case (pattern_ _patternOcon _patternOnt ) of+ { ( !_patternIcontainsVars,!_patternIcopy,!_patternIdefinedAttrs,!_patternIerrors,!_patternIlocals,!_patternIoutput) ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _patternIcontainsVars+ {-# LINE 2127 "DefaultRules.hs" #-})) of+ { !_lhsOcontainsVars ->+ (case (({-# LINE 462 "DefaultRules.ag" #-}+ _patternIdefinedAttrs+ {-# LINE 2131 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _patternIerrors+ {-# LINE 2135 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 461 "DefaultRules.ag" #-}+ _patternIlocals+ {-# LINE 2139 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ Rule mbName_ _patternIoutput rhs_ owrt_ origin_ explicit_+ {-# LINE 2143 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 2147 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 515 "DefaultRules.ag" #-}+ multiRule _output _lhsIuniq+ {-# LINE 2151 "DefaultRules.hs" #-})) of+ { !__tup2 ->+ (case (({-# LINE 515 "DefaultRules.ag" #-}+ __tup2+ {-# LINE 2155 "DefaultRules.hs" #-})) of+ { !(!_lhsOoutputs,_) ->+ (case (({-# LINE 587 "DefaultRules.ag" #-}+ case mbName_ of+ Nothing -> Set.empty+ Just nm -> Set.singleton nm+ {-# LINE 2161 "DefaultRules.hs" #-})) of+ { !_lhsOruleNames ->+ (case (({-# LINE 515 "DefaultRules.ag" #-}+ __tup2+ {-# LINE 2165 "DefaultRules.hs" #-})) of+ { !(_,!_lhsOuniq) ->+ ( _lhsOcontainsVars,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOoutputs,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Rules -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ con : ConstructorIdent+ nt : NontermIdent+ chained attribute:+ uniq : Int+ synthesized attributes:+ definedAttrs : Set (Identifier,Identifier)+ errors : Seq Error+ locals : Set Identifier+ output : SELF + ruleNames : Set Identifier+ alternatives:+ alternative Cons:+ child hd : Rule + child tl : Rules + alternative Nil:+ visit 0:+ local output : _+-}+-- cata+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 (ConstructorIdent ->+ NontermIdent ->+ Int ->+ ( (Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rules ,(Set Identifier),Int))+data Inh_Rules = Inh_Rules {con_Inh_Rules :: !(ConstructorIdent),nt_Inh_Rules :: !(NontermIdent),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)}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules +wrap_Rules !(T_Rules sem ) !(Inh_Rules _lhsIcon _lhsInt _lhsIuniq ) =+ (let ( !_lhsOdefinedAttrs,!_lhsOerrors,!_lhsOlocals,!_lhsOoutput,!_lhsOruleNames,!_lhsOuniq) = sem _lhsIcon _lhsInt _lhsIuniq + in (Syn_Rules _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq ))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules +sem_Rules_Cons !(T_Rule hd_ ) !(T_Rules tl_ ) =+ (T_Rules (\ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIuniq) ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 2217 "DefaultRules.hs" #-})) of+ { !_hdOuniq ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2221 "DefaultRules.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 2225 "DefaultRules.hs" #-})) of+ { !_hdOcon ->+ (case (hd_ _hdOcon _hdOnt _hdOuniq ) of+ { ( !_hdIcontainsVars,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput,!_hdIoutputs,!_hdIruleNames,!_hdIuniq) ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _hdIuniq+ {-# LINE 2231 "DefaultRules.hs" #-})) of+ { !_tlOuniq ->+ (case (({-# LINE 34 "DefaultRules.ag" #-}+ _lhsInt+ {-# LINE 2235 "DefaultRules.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 35 "DefaultRules.ag" #-}+ _lhsIcon+ {-# LINE 2239 "DefaultRules.hs" #-})) of+ { !_tlOcon ->+ (case (tl_ _tlOcon _tlOnt _tlOuniq ) of+ { ( !_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput,!_tlIruleNames,!_tlIuniq) ->+ (case (({-# LINE 462 "DefaultRules.ag" #-}+ _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs+ {-# LINE 2245 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2249 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 461 "DefaultRules.ag" #-}+ _hdIlocals `Set.union` _tlIlocals+ {-# LINE 2253 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 511 "DefaultRules.ag" #-}+ if _hdIcontainsVars then _hdIoutputs ++ _tlIoutput else _tlIoutput+ {-# LINE 2257 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 585 "DefaultRules.ag" #-}+ _hdIruleNames `Set.union` _tlIruleNames+ {-# LINE 2261 "DefaultRules.hs" #-})) of+ { !_lhsOruleNames ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _tlIuniq+ {-# LINE 2265 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Rules_Nil :: T_Rules +sem_Rules_Nil =+ (T_Rules (\ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIuniq) ->+ (case (({-# LINE 462 "DefaultRules.ag" #-}+ Set.empty+ {-# LINE 2275 "DefaultRules.hs" #-})) of+ { !_lhsOdefinedAttrs ->+ (case (({-# LINE 115 "DefaultRules.ag" #-}+ Seq.empty+ {-# LINE 2279 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 461 "DefaultRules.ag" #-}+ Set.empty+ {-# LINE 2283 "DefaultRules.hs" #-})) of+ { !_lhsOlocals ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ []+ {-# LINE 2287 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 2291 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 585 "DefaultRules.ag" #-}+ Set.empty+ {-# LINE 2295 "DefaultRules.hs" #-})) of+ { !_lhsOruleNames ->+ (case (({-# LINE 491 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 2299 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) })) )+-- TypeSig -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ output : SELF + alternatives:+ alternative TypeSig:+ child name : {Identifier}+ child tp : {Type}+ visit 0:+ local output : _+-}+-- cata+sem_TypeSig :: TypeSig ->+ T_TypeSig +sem_TypeSig !(TypeSig _name _tp ) =+ (sem_TypeSig_TypeSig _name _tp )+-- semantic domain+newtype T_TypeSig = T_TypeSig (( TypeSig ))+data Inh_TypeSig = Inh_TypeSig {}+data Syn_TypeSig = Syn_TypeSig {output_Syn_TypeSig :: !(TypeSig )}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig +wrap_TypeSig !(T_TypeSig sem ) !(Inh_TypeSig ) =+ (let ( !_lhsOoutput) = sem + in (Syn_TypeSig _lhsOoutput ))+sem_TypeSig_TypeSig :: Identifier ->+ Type ->+ T_TypeSig +sem_TypeSig_TypeSig !name_ !tp_ =+ (T_TypeSig (case (({-# LINE 498 "DefaultRules.ag" #-}+ TypeSig name_ tp_+ {-# LINE 2335 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 2339 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }) )+-- TypeSigs ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ output : SELF + alternatives:+ alternative Cons:+ child hd : TypeSig + child tl : TypeSigs + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+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 (( TypeSigs ))+data Inh_TypeSigs = Inh_TypeSigs {}+data Syn_TypeSigs = Syn_TypeSigs {output_Syn_TypeSigs :: !(TypeSigs )}+wrap_TypeSigs :: T_TypeSigs ->+ Inh_TypeSigs ->+ Syn_TypeSigs +wrap_TypeSigs !(T_TypeSigs sem ) !(Inh_TypeSigs ) =+ (let ( !_lhsOoutput) = sem + in (Syn_TypeSigs _lhsOoutput ))+sem_TypeSigs_Cons :: T_TypeSig ->+ T_TypeSigs ->+ T_TypeSigs +sem_TypeSigs_Cons !(T_TypeSig hd_ ) !(T_TypeSigs tl_ ) =+ (T_TypeSigs (case (tl_ ) of+ { ( !_tlIoutput) ->+ (case (hd_ ) of+ { ( !_hdIoutput) ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2382 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 2386 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }) }) }) )+sem_TypeSigs_Nil :: T_TypeSigs +sem_TypeSigs_Nil =+ (T_TypeSigs (case (({-# LINE 498 "DefaultRules.ag" #-}+ []+ {-# LINE 2393 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 498 "DefaultRules.ag" #-}+ _output+ {-# LINE 2397 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOoutput) }) }) )
src-derived/Desugar.hs view
@@ -1,2544 +1,2523 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.29 (Desugar.ag)-module Desugar where-{-# LINE 13 "Desugar.ag" #-}--import qualified Data.Set as Set-import qualified Data.Map as Map-import Data.Map(Map)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq,(><))-import UU.Scanner.Position(Pos(..))-import Maybe-import Data.List(intersperse)--import AbstractSyntax-import ErrorMessages-import Options-import HsToken-import HsTokenScanner-import TokenDef-import CommonTypes-{-# LINE 24 "../src-derived/Desugar.hs" #-}--{-# LINE 2 "./AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import CommonTypes-{-# LINE 34 "../src-derived/Desugar.hs" #-}--{-# LINE 2 "./Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 41 "../src-derived/Desugar.hs" #-}--{-# LINE 2 "./Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 47 "../src-derived/Desugar.hs" #-}--{-# LINE 2 "./HsToken.ag" #-}--import CommonTypes-import UU.Scanner.Position(Pos)-{-# LINE 53 "../src-derived/Desugar.hs" #-}-{-# LINE 97 "Desugar.ag" #-}--addl :: Int -> Pos -> Pos-addl n (Pos l c f) = Pos (l+n) c f-{-# LINE 58 "../src-derived/Desugar.hs" #-}--{-# LINE 132 "Desugar.ag" #-}--maybeError :: a -> Error -> Maybe a -> (a, Seq Error)-maybeError def err mb- = maybe (def, Seq.singleton err) (\r -> (r, Seq.empty)) mb--findField :: Identifier -> Identifier -> [(Identifier,Identifier)] -> Maybe Identifier-findField fld attr list- | fld == _FIRST = f list- | fld == _LAST = f (reverse list)- | otherwise = Just fld- where- f = lookup attr-{-# LINE 73 "../src-derived/Desugar.hs" #-}--{-# LINE 203 "Desugar.ag" #-}--mergeAttributes :: AttrMap -> AttrMap -> AttrMap-mergeAttributes = Map.unionWith $ Map.unionWith $ Set.union-{-# LINE 79 "../src-derived/Desugar.hs" #-}--{-# LINE 250 "Desugar.ag" #-}--desugarExprs :: Options -> NontermIdent -> ConstructorIdent ->- [(Identifier, Identifier)] -> [(Identifier, Identifier)] ->- Seq Error -> [Expression] -> (Seq Error, [Expression])-desugarExprs options nt con childInhs childSyns- = mapAccum (desugarExpr options nt con childInhs childSyns)- where mapAccum f e = foldr (\x (e0,xs) -> let (e1,x') = f e0 x in (e1, x:xs)) (e, [])--desugarExpr :: Options -> NontermIdent -> ConstructorIdent ->- [(Identifier, Identifier)] -> [(Identifier, Identifier)] ->- Seq Error -> Expression -> (Seq Error, Expression)-desugarExpr options nt con childInhs childSyns errs expr- = (errs Seq.>< errors_Syn_Expression syn, output_Syn_Expression syn)- where- inh = Inh_Expression { childInhs_Inh_Expression = childInhs- , childSyns_Inh_Expression = childSyns- , con_Inh_Expression = con- , nt_Inh_Expression = nt- , options_Inh_Expression = options- , ruleDescr_Inh_Expression = "augment-rule"- }- sem = sem_Expression expr- syn = wrap_Expression sem inh-{-# LINE 105 "../src-derived/Desugar.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- synthesized attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- output : SELF - alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child inh : {Attributes}- child syn : {Attributes}- child virtual : {Maybe (Maybe Type)}- visit 0:- local output : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child !(Child _name _tp _inh _syn _virtual ) =- (sem_Child_Child _name _tp _inh _syn _virtual )--- semantic domain-newtype T_Child = T_Child (( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Child ))-data Inh_Child = Inh_Child {}-data Syn_Child = Syn_Child {childInhs_Syn_Child :: !(([(Identifier, Identifier)])),childSyns_Syn_Child :: !(([(Identifier, Identifier)])),output_Syn_Child :: !(Child )}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child !(T_Child sem ) !(Inh_Child ) =- (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) =- (sem )- in (Syn_Child _lhsOchildInhs _lhsOchildSyns _lhsOoutput ))-sem_Child_Child :: Identifier ->- Type ->- Attributes ->- Attributes ->- (Maybe (Maybe Type)) ->- T_Child -sem_Child_Child !name_ !tp_ !inh_ !syn_ !virtual_ =- (T_Child (case (({-# LINE 129 "Desugar.ag" #-}- [(i, name_) | i <- Map.keys inh_ ]- {-# LINE 148 "Desugar.hs" #-})) of- { !_lhsOchildInhs ->- (case (({-# LINE 130 "Desugar.ag" #-}- [(s, name_) | s <- Map.keys syn_ ]- {-# LINE 152 "Desugar.hs" #-})) of- { !_lhsOchildSyns ->- (case (({-# LINE 39 "Desugar.ag" #-}- Child name_ tp_ inh_ syn_ virtual_- {-# LINE 156 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 160 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) )--- Children -----------------------------------------------------{-- visit 0:- synthesized attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- output : SELF - alternatives:- alternative Cons:- child hd : Child - child tl : Children - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-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 (( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Children ))-data Inh_Children = Inh_Children {}-data Syn_Children = Syn_Children {childInhs_Syn_Children :: !(([(Identifier, Identifier)])),childSyns_Syn_Children :: !(([(Identifier, Identifier)])),output_Syn_Children :: !(Children )}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children !(T_Children sem ) !(Inh_Children ) =- (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) =- (sem )- in (Syn_Children _lhsOchildInhs _lhsOchildSyns _lhsOoutput ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons !(T_Child hd_ ) !(T_Children tl_ ) =- (T_Children (case ((tl_ )) of- { ( !_tlIchildInhs,!_tlIchildSyns,!_tlIoutput) ->- (case ((hd_ )) of- { ( !_hdIchildInhs,!_hdIchildSyns,!_hdIoutput) ->- (case (({-# LINE 124 "Desugar.ag" #-}- _hdIchildInhs ++ _tlIchildInhs- {-# LINE 206 "Desugar.hs" #-})) of- { !_lhsOchildInhs ->- (case (({-# LINE 124 "Desugar.ag" #-}- _hdIchildSyns ++ _tlIchildSyns- {-# LINE 210 "Desugar.hs" #-})) of- { !_lhsOchildSyns ->- (case (({-# LINE 39 "Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 214 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 218 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) }) }) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (case (({-# LINE 124 "Desugar.ag" #-}- []- {-# LINE 225 "Desugar.hs" #-})) of- { !_lhsOchildInhs ->- (case (({-# LINE 124 "Desugar.ag" #-}- []- {-# LINE 229 "Desugar.hs" #-})) of- { !_lhsOchildSyns ->- (case (({-# LINE 39 "Desugar.ag" #-}- []- {-# LINE 233 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 237 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) )--- Expression ---------------------------------------------------{-- visit 0:- inherited attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- con : ConstructorIdent- nt : NontermIdent- options : Options- ruleDescr : String- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Expression:- child pos : {Pos}- child tks : {[HsToken]}- visit 0:- local _tup1 : _- local tks' : _--}--- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression !(Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )--- semantic domain-newtype T_Expression = T_Expression (([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- NontermIdent ->- Options ->- String ->- ( (Seq Error),Expression ))-data Inh_Expression = Inh_Expression {childInhs_Inh_Expression :: !(([(Identifier, Identifier)])),childSyns_Inh_Expression :: !(([(Identifier, Identifier)])),con_Inh_Expression :: !(ConstructorIdent),nt_Inh_Expression :: !(NontermIdent),options_Inh_Expression :: !(Options),ruleDescr_Inh_Expression :: !(String)}-data Syn_Expression = Syn_Expression {errors_Syn_Expression :: !((Seq Error)),output_Syn_Expression :: !(Expression )}-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression !(T_Expression sem ) !(Inh_Expression _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIoptions _lhsIruleDescr ) =- (let ( !_lhsOerrors,!_lhsOoutput) =- (sem _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIoptions _lhsIruleDescr )- in (Syn_Expression _lhsOerrors _lhsOoutput ))-sem_Expression_Expression :: Pos ->- ([HsToken]) ->- T_Expression -sem_Expression_Expression !pos_ !tks_ =- (T_Expression (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIoptions)- (!_lhsIruleDescr) ->- (case (({-# LINE 48 "Desugar.ag" #-}- let inh = Inh_HsTokensRoot { childInhs_Inh_HsTokensRoot = _lhsIchildInhs- , childSyns_Inh_HsTokensRoot = _lhsIchildSyns- , nt_Inh_HsTokensRoot = _lhsInt- , con_Inh_HsTokensRoot = _lhsIcon- , ruleDescr_Inh_HsTokensRoot = _lhsIruleDescr- , useFieldIdent_Inh_HsTokensRoot = genUseTraces _lhsIoptions- }- sem = sem_HsTokensRoot (HsTokensRoot tks_)- syn = wrap_HsTokensRoot sem inh- in (tks_Syn_HsTokensRoot syn, errors_Syn_HsTokensRoot syn)- {-# LINE 304 "Desugar.hs" #-})) of- { !__tup1 ->- (case (({-# LINE 48 "Desugar.ag" #-}- __tup1- {-# LINE 308 "Desugar.hs" #-})) of- { !(_,!_lhsOerrors) ->- (case (({-# LINE 48 "Desugar.ag" #-}- __tup1- {-# LINE 312 "Desugar.hs" #-})) of- { !(!_tks',_) ->- (case (({-# LINE 58 "Desugar.ag" #-}- Expression pos_ _tks'- {-# LINE 316 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOerrors,_lhsOoutput) }) }) }) })) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attributes:- forcedIrrefutables : AttrMap- options : Options- synthesized attributes:- allAttributes : AttrMap- errors : Seq Error- output : SELF - alternatives:- alternative Grammar:- child typeSyns : {TypeSyns}- child useMap : {UseMap}- child derivings : {Derivings}- child wrappers : {Set NontermIdent}- child nonts : Nonterminals - child pragmas : {PragmaMap}- child manualAttrOrderMap : {AttrOrderMap}- child paramMap : {ParamMap}- child contextMap : {ContextMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}--}--- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )--- semantic domain-newtype T_Grammar = T_Grammar (AttrMap ->- Options ->- ( AttrMap,(Seq Error),Grammar ))-data Inh_Grammar = Inh_Grammar {forcedIrrefutables_Inh_Grammar :: !(AttrMap),options_Inh_Grammar :: !(Options)}-data Syn_Grammar = Syn_Grammar {allAttributes_Syn_Grammar :: !(AttrMap),errors_Syn_Grammar :: !((Seq Error)),output_Syn_Grammar :: !(Grammar )}-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar !(T_Grammar sem ) !(Inh_Grammar _lhsIforcedIrrefutables _lhsIoptions ) =- (let ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) =- (sem _lhsIforcedIrrefutables _lhsIoptions )- in (Syn_Grammar _lhsOallAttributes _lhsOerrors _lhsOoutput ))-sem_Grammar_Grammar :: TypeSyns ->- UseMap ->- Derivings ->- (Set NontermIdent) ->- T_Nonterminals ->- PragmaMap ->- AttrOrderMap ->- ParamMap ->- ContextMap ->- UniqueMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ =- (T_Grammar (\ (!_lhsIforcedIrrefutables)- (!_lhsIoptions) ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 382 "Desugar.hs" #-})) of- { !_nontsOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 386 "Desugar.hs" #-})) of- { !_nontsOforcedIrrefutables ->- (case (({-# LINE 234 "Desugar.ag" #-}- augmentsMap_- {-# LINE 390 "Desugar.hs" #-})) of- { !_nontsOaugmentsIn ->- (case ((nonts_ _nontsOaugmentsIn _nontsOforcedIrrefutables _nontsOoptions )) of- { ( !_nontsIallAttributes,!_nontsIaugmentsOut,!_nontsIerrors,!_nontsIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _nontsIallAttributes- {-# LINE 396 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 37 "Desugar.ag" #-}- _nontsIerrors- {-# LINE 400 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 290 "Desugar.ag" #-}- Grammar typeSyns_- useMap_- derivings_- wrappers_- _nontsIoutput- pragmas_- manualAttrOrderMap_- paramMap_- contextMap_- uniqueMap_- _nontsIaugmentsOut- aroundsMap_- mergeMap_- {-# LINE 416 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) })) )--- HsToken ------------------------------------------------------{-- visit 0:- inherited attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- con : ConstructorIdent- nt : NontermIdent- ruleDescr : String- useFieldIdent : Bool- chained attribute:- addLines : Int- synthesized attributes:- errors : Seq Error- tks : SELF - alternatives:- alternative AGField:- child field : {Identifier}- child attr : {Identifier}- child pos : {Pos}- child rdesc : {Maybe String}- visit 0:- local mField : _- local field' : _- local tks : _- alternative AGLocal:- child var : {Identifier}- child pos : {Pos}- child rdesc : {Maybe String}- visit 0:- local tks : _- alternative CharToken:- child value : {String}- child pos : {Pos}- visit 0:- local tks : _- alternative Err:- child mesg : {String}- child pos : {Pos}- visit 0:- local tks : _- alternative HsToken:- child value : {String}- child pos : {Pos}- visit 0:- local tks : _- alternative StrToken:- child value : {String}- child pos : {Pos}- visit 0:- local tks : _--}--- cata-sem_HsToken :: HsToken ->- T_HsToken -sem_HsToken !(AGField _field _attr _pos _rdesc ) =- (sem_HsToken_AGField _field _attr _pos _rdesc )-sem_HsToken !(AGLocal _var _pos _rdesc ) =- (sem_HsToken_AGLocal _var _pos _rdesc )-sem_HsToken !(CharToken _value _pos ) =- (sem_HsToken_CharToken _value _pos )-sem_HsToken !(Err _mesg _pos ) =- (sem_HsToken_Err _mesg _pos )-sem_HsToken !(HsToken _value _pos ) =- (sem_HsToken_HsToken _value _pos )-sem_HsToken !(StrToken _value _pos ) =- (sem_HsToken_StrToken _value _pos )--- semantic domain-newtype T_HsToken = T_HsToken (Int ->- ([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- NontermIdent ->- String ->- Bool ->- ( Int,(Seq Error),HsToken ))-data Inh_HsToken = Inh_HsToken {addLines_Inh_HsToken :: !(Int),childInhs_Inh_HsToken :: !(([(Identifier, Identifier)])),childSyns_Inh_HsToken :: !(([(Identifier, Identifier)])),con_Inh_HsToken :: !(ConstructorIdent),nt_Inh_HsToken :: !(NontermIdent),ruleDescr_Inh_HsToken :: !(String),useFieldIdent_Inh_HsToken :: !(Bool)}-data Syn_HsToken = Syn_HsToken {addLines_Syn_HsToken :: !(Int),errors_Syn_HsToken :: !((Seq Error)),tks_Syn_HsToken :: !(HsToken )}-wrap_HsToken :: T_HsToken ->- Inh_HsToken ->- Syn_HsToken -wrap_HsToken !(T_HsToken sem ) !(Inh_HsToken _lhsIaddLines _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent ) =- (let ( !_lhsOaddLines,!_lhsOerrors,!_lhsOtks) =- (sem _lhsIaddLines _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent )- in (Syn_HsToken _lhsOaddLines _lhsOerrors _lhsOtks ))-sem_HsToken_AGField :: Identifier ->- Identifier ->- Pos ->- (Maybe String) ->- T_HsToken -sem_HsToken_AGField !field_ !attr_ !pos_ !rdesc_ =- (T_HsToken (\ (!_lhsIaddLines)- (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIruleDescr)- (!_lhsIuseFieldIdent) ->- (case (({-# LINE 78 "Desugar.ag" #-}- findField field_ attr_ _lhsIchildSyns- {-# LINE 519 "Desugar.hs" #-})) of- { !_mField ->- (case (({-# LINE 80 "Desugar.ag" #-}- maybe field_ id _mField- {-# LINE 523 "Desugar.hs" #-})) of- { !_field' ->- (case (({-# LINE 83 "Desugar.ag" #-}- if _lhsIuseFieldIdent || length (getName field_) < length (getName _field' )- then _lhsIaddLines + 1- else _lhsIaddLines- {-# LINE 529 "Desugar.hs" #-})) of- { !_lhsOaddLines ->- (case (({-# LINE 81 "Desugar.ag" #-}- maybe (Seq.singleton (UndefAttr _lhsInt _lhsIcon field_ (Ident "<ANY>" (getPos field_)) False)) (const Seq.empty) _mField- {-# LINE 533 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 87 "Desugar.ag" #-}- AGField _field' attr_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)- {-# LINE 537 "Desugar.hs" #-})) of- { !_tks ->- (case (({-# LINE 69 "Desugar.ag" #-}- _tks- {-# LINE 541 "Desugar.hs" #-})) of- { !_lhsOtks ->- ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) }) }) })) )-sem_HsToken_AGLocal :: Identifier ->- Pos ->- (Maybe String) ->- T_HsToken -sem_HsToken_AGLocal !var_ !pos_ !rdesc_ =- (T_HsToken (\ (!_lhsIaddLines)- (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIruleDescr)- (!_lhsIuseFieldIdent) ->- (case (({-# LINE 73 "Desugar.ag" #-}- if _lhsIuseFieldIdent- then _lhsIaddLines + 1- else _lhsIaddLines- {-# LINE 560 "Desugar.hs" #-})) of- { !_lhsOaddLines ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 564 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 76 "Desugar.ag" #-}- AGLocal var_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)- {-# LINE 568 "Desugar.hs" #-})) of- { !_tks ->- (case (({-# LINE 69 "Desugar.ag" #-}- _tks- {-# LINE 572 "Desugar.hs" #-})) of- { !_lhsOtks ->- ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )-sem_HsToken_CharToken :: String ->- Pos ->- T_HsToken -sem_HsToken_CharToken !value_ !pos_ =- (T_HsToken (\ (!_lhsIaddLines)- (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIruleDescr)- (!_lhsIuseFieldIdent) ->- (case (({-# LINE 63 "Desugar.ag" #-}- _lhsIaddLines- {-# LINE 588 "Desugar.hs" #-})) of- { !_lhsOaddLines ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 592 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 91 "Desugar.ag" #-}- CharToken value_ (addl _lhsIaddLines pos_)- {-# LINE 596 "Desugar.hs" #-})) of- { !_tks ->- (case (({-# LINE 69 "Desugar.ag" #-}- _tks- {-# LINE 600 "Desugar.hs" #-})) of- { !_lhsOtks ->- ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )-sem_HsToken_Err :: String ->- Pos ->- T_HsToken -sem_HsToken_Err !mesg_ !pos_ =- (T_HsToken (\ (!_lhsIaddLines)- (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIruleDescr)- (!_lhsIuseFieldIdent) ->- (case (({-# LINE 63 "Desugar.ag" #-}- _lhsIaddLines- {-# LINE 616 "Desugar.hs" #-})) of- { !_lhsOaddLines ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 620 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 95 "Desugar.ag" #-}- Err mesg_ (addl _lhsIaddLines pos_)- {-# LINE 624 "Desugar.hs" #-})) of- { !_tks ->- (case (({-# LINE 69 "Desugar.ag" #-}- _tks- {-# LINE 628 "Desugar.hs" #-})) of- { !_lhsOtks ->- ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )-sem_HsToken_HsToken :: String ->- Pos ->- T_HsToken -sem_HsToken_HsToken !value_ !pos_ =- (T_HsToken (\ (!_lhsIaddLines)- (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIruleDescr)- (!_lhsIuseFieldIdent) ->- (case (({-# LINE 63 "Desugar.ag" #-}- _lhsIaddLines- {-# LINE 644 "Desugar.hs" #-})) of- { !_lhsOaddLines ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 648 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 89 "Desugar.ag" #-}- HsToken value_ (addl _lhsIaddLines pos_)- {-# LINE 652 "Desugar.hs" #-})) of- { !_tks ->- (case (({-# LINE 69 "Desugar.ag" #-}- _tks- {-# LINE 656 "Desugar.hs" #-})) of- { !_lhsOtks ->- ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )-sem_HsToken_StrToken :: String ->- Pos ->- T_HsToken -sem_HsToken_StrToken !value_ !pos_ =- (T_HsToken (\ (!_lhsIaddLines)- (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIruleDescr)- (!_lhsIuseFieldIdent) ->- (case (({-# LINE 63 "Desugar.ag" #-}- _lhsIaddLines- {-# LINE 672 "Desugar.hs" #-})) of- { !_lhsOaddLines ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 676 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 93 "Desugar.ag" #-}- StrToken value_ (addl _lhsIaddLines pos_)- {-# LINE 680 "Desugar.hs" #-})) of- { !_tks ->- (case (({-# LINE 69 "Desugar.ag" #-}- _tks- {-# LINE 684 "Desugar.hs" #-})) of- { !_lhsOtks ->- ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )--- HsTokens -----------------------------------------------------{-- visit 0:- inherited attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- con : ConstructorIdent- nt : NontermIdent- ruleDescr : String- useFieldIdent : Bool- chained attribute:- addLines : Int- synthesized attributes:- errors : Seq Error- tks : SELF - alternatives:- alternative Cons:- child hd : HsToken - child tl : HsTokens - visit 0:- local tks : _- alternative Nil:- visit 0:- local tks : _--}--- cata-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 (Int ->- ([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- NontermIdent ->- String ->- Bool ->- ( Int,(Seq Error),HsTokens ))-data Inh_HsTokens = Inh_HsTokens {addLines_Inh_HsTokens :: !(Int),childInhs_Inh_HsTokens :: !(([(Identifier, Identifier)])),childSyns_Inh_HsTokens :: !(([(Identifier, Identifier)])),con_Inh_HsTokens :: !(ConstructorIdent),nt_Inh_HsTokens :: !(NontermIdent),ruleDescr_Inh_HsTokens :: !(String),useFieldIdent_Inh_HsTokens :: !(Bool)}-data Syn_HsTokens = Syn_HsTokens {addLines_Syn_HsTokens :: !(Int),errors_Syn_HsTokens :: !((Seq Error)),tks_Syn_HsTokens :: !(HsTokens )}-wrap_HsTokens :: T_HsTokens ->- Inh_HsTokens ->- Syn_HsTokens -wrap_HsTokens !(T_HsTokens sem ) !(Inh_HsTokens _lhsIaddLines _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent ) =- (let ( !_lhsOaddLines,!_lhsOerrors,!_lhsOtks) =- (sem _lhsIaddLines _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent )- in (Syn_HsTokens _lhsOaddLines _lhsOerrors _lhsOtks ))-sem_HsTokens_Cons :: T_HsToken ->- T_HsTokens ->- T_HsTokens -sem_HsTokens_Cons !(T_HsToken hd_ ) !(T_HsTokens tl_ ) =- (T_HsTokens (\ (!_lhsIaddLines)- (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIruleDescr)- (!_lhsIuseFieldIdent) ->- (case (({-# LINE 61 "Desugar.ag" #-}- _lhsIuseFieldIdent- {-# LINE 748 "Desugar.hs" #-})) of- { !_tlOuseFieldIdent ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 752 "Desugar.hs" #-})) of- { !_tlOchildSyns ->- (case (({-# LINE 61 "Desugar.ag" #-}- _lhsIuseFieldIdent- {-# LINE 756 "Desugar.hs" #-})) of- { !_hdOuseFieldIdent ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 760 "Desugar.hs" #-})) of- { !_hdOchildSyns ->- (case (({-# LINE 63 "Desugar.ag" #-}- _lhsIaddLines- {-# LINE 764 "Desugar.hs" #-})) of- { !_hdOaddLines ->- (case (({-# LINE 167 "Desugar.ag" #-}- _lhsIruleDescr- {-# LINE 768 "Desugar.hs" #-})) of- { !_hdOruleDescr ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 772 "Desugar.hs" #-})) of- { !_hdOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 776 "Desugar.hs" #-})) of- { !_hdOcon ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 780 "Desugar.hs" #-})) of- { !_hdOchildInhs ->- (case ((hd_ _hdOaddLines _hdOchildInhs _hdOchildSyns _hdOcon _hdOnt _hdOruleDescr _hdOuseFieldIdent )) of- { ( !_hdIaddLines,!_hdIerrors,!_hdItks) ->- (case (({-# LINE 63 "Desugar.ag" #-}- _hdIaddLines- {-# LINE 786 "Desugar.hs" #-})) of- { !_tlOaddLines ->- (case (({-# LINE 167 "Desugar.ag" #-}- _lhsIruleDescr- {-# LINE 790 "Desugar.hs" #-})) of- { !_tlOruleDescr ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 794 "Desugar.hs" #-})) of- { !_tlOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 798 "Desugar.hs" #-})) of- { !_tlOcon ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 802 "Desugar.hs" #-})) of- { !_tlOchildInhs ->- (case ((tl_ _tlOaddLines _tlOchildInhs _tlOchildSyns _tlOcon _tlOnt _tlOruleDescr _tlOuseFieldIdent )) of- { ( !_tlIaddLines,!_tlIerrors,!_tlItks) ->- (case (({-# LINE 63 "Desugar.ag" #-}- _tlIaddLines- {-# LINE 808 "Desugar.hs" #-})) of- { !_lhsOaddLines ->- (case (({-# LINE 37 "Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 812 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 69 "Desugar.ag" #-}- (:) _hdItks _tlItks- {-# LINE 816 "Desugar.hs" #-})) of- { !_tks ->- (case (({-# LINE 69 "Desugar.ag" #-}- _tks- {-# LINE 820 "Desugar.hs" #-})) of- { !_lhsOtks ->- ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_HsTokens_Nil :: T_HsTokens -sem_HsTokens_Nil =- (T_HsTokens (\ (!_lhsIaddLines)- (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIruleDescr)- (!_lhsIuseFieldIdent) ->- (case (({-# LINE 63 "Desugar.ag" #-}- _lhsIaddLines- {-# LINE 834 "Desugar.hs" #-})) of- { !_lhsOaddLines ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 838 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 69 "Desugar.ag" #-}- []- {-# LINE 842 "Desugar.hs" #-})) of- { !_tks ->- (case (({-# LINE 69 "Desugar.ag" #-}- _tks- {-# LINE 846 "Desugar.hs" #-})) of- { !_lhsOtks ->- ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )--- HsTokensRoot -------------------------------------------------{-- visit 0:- inherited attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- con : ConstructorIdent- nt : NontermIdent- ruleDescr : String- useFieldIdent : Bool- synthesized attributes:- errors : Seq Error- tks : [HsToken]- alternatives:- alternative HsTokensRoot:- child tokens : HsTokens --}--- cata-sem_HsTokensRoot :: HsTokensRoot ->- T_HsTokensRoot -sem_HsTokensRoot !(HsTokensRoot _tokens ) =- (sem_HsTokensRoot_HsTokensRoot (sem_HsTokens _tokens ) )--- semantic domain-newtype T_HsTokensRoot = T_HsTokensRoot (([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- NontermIdent ->- String ->- Bool ->- ( (Seq Error),([HsToken])))-data Inh_HsTokensRoot = Inh_HsTokensRoot {childInhs_Inh_HsTokensRoot :: !(([(Identifier, Identifier)])),childSyns_Inh_HsTokensRoot :: !(([(Identifier, Identifier)])),con_Inh_HsTokensRoot :: !(ConstructorIdent),nt_Inh_HsTokensRoot :: !(NontermIdent),ruleDescr_Inh_HsTokensRoot :: !(String),useFieldIdent_Inh_HsTokensRoot :: !(Bool)}-data Syn_HsTokensRoot = Syn_HsTokensRoot {errors_Syn_HsTokensRoot :: !((Seq Error)),tks_Syn_HsTokensRoot :: !(([HsToken]))}-wrap_HsTokensRoot :: T_HsTokensRoot ->- Inh_HsTokensRoot ->- Syn_HsTokensRoot -wrap_HsTokensRoot !(T_HsTokensRoot sem ) !(Inh_HsTokensRoot _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent ) =- (let ( !_lhsOerrors,!_lhsOtks) =- (sem _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent )- in (Syn_HsTokensRoot _lhsOerrors _lhsOtks ))-sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->- T_HsTokensRoot -sem_HsTokensRoot_HsTokensRoot !(T_HsTokens tokens_ ) =- (T_HsTokensRoot (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIruleDescr)- (!_lhsIuseFieldIdent) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 899 "Desugar.hs" #-})) of- { !_tokensOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 903 "Desugar.hs" #-})) of- { !_tokensOcon ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 907 "Desugar.hs" #-})) of- { !_tokensOchildSyns ->- (case (({-# LINE 61 "Desugar.ag" #-}- _lhsIuseFieldIdent- {-# LINE 911 "Desugar.hs" #-})) of- { !_tokensOuseFieldIdent ->- (case (({-# LINE 167 "Desugar.ag" #-}- _lhsIruleDescr- {-# LINE 915 "Desugar.hs" #-})) of- { !_tokensOruleDescr ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 919 "Desugar.hs" #-})) of- { !_tokensOchildInhs ->- (case (({-# LINE 66 "Desugar.ag" #-}- 0- {-# LINE 923 "Desugar.hs" #-})) of- { !_tokensOaddLines ->- (case ((tokens_ _tokensOaddLines _tokensOchildInhs _tokensOchildSyns _tokensOcon _tokensOnt _tokensOruleDescr _tokensOuseFieldIdent )) of- { ( !_tokensIaddLines,!_tokensIerrors,!_tokensItks) ->- (case (({-# LINE 37 "Desugar.ag" #-}- _tokensIerrors- {-# LINE 929 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 68 "Desugar.ag" #-}- _tokensItks- {-# LINE 933 "Desugar.hs" #-})) of- { !_lhsOtks ->- ( _lhsOerrors,_lhsOtks) }) }) }) }) }) }) }) }) }) })) )--- Nonterminal --------------------------------------------------{-- visit 0:- inherited attributes:- augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- forcedIrrefutables : AttrMap- options : Options- synthesized attributes:- allAttributes : AttrMap- augmentsOut : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- errors : Seq Error- output : SELF - alternatives:- alternative Nonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : Productions - visit 0:- local augmentsIn : _- local augmentsOut : _- local output : _--}--- cata-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 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- AttrMap ->- Options ->- ( AttrMap,(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),(Seq Error),Nonterminal ))-data Inh_Nonterminal = Inh_Nonterminal {augmentsIn_Inh_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),forcedIrrefutables_Inh_Nonterminal :: !(AttrMap),options_Inh_Nonterminal :: !(Options)}-data Syn_Nonterminal = Syn_Nonterminal {allAttributes_Syn_Nonterminal :: !(AttrMap),augmentsOut_Syn_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),errors_Syn_Nonterminal :: !((Seq Error)),output_Syn_Nonterminal :: !(Nonterminal )}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal !(T_Nonterminal sem ) !(Inh_Nonterminal _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIoptions ) =- (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) =- (sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIoptions )- in (Syn_Nonterminal _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))-sem_Nonterminal_Nonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal !nt_ !params_ !inh_ !syn_ !(T_Productions prods_ ) =- (T_Nonterminal (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsIoptions) ->- (case (({-# LINE 156 "Desugar.ag" #-}- nt_- {-# LINE 991 "Desugar.hs" #-})) of- { !_prodsOnt ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 995 "Desugar.hs" #-})) of- { !_prodsOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 999 "Desugar.hs" #-})) of- { !_prodsOforcedIrrefutables ->- (case (({-# LINE 238 "Desugar.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn- {-# LINE 1003 "Desugar.hs" #-})) of- { !_augmentsIn ->- (case (({-# LINE 229 "Desugar.ag" #-}- _augmentsIn- {-# LINE 1007 "Desugar.hs" #-})) of- { !_prodsOaugmentsIn ->- (case ((prods_ _prodsOaugmentsIn _prodsOforcedIrrefutables _prodsOnt _prodsOoptions )) of- { ( !_prodsIallAttributes,!_prodsIaugmentsOut,!_prodsIerrors,!_prodsIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _prodsIallAttributes- {-# LINE 1013 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 239 "Desugar.ag" #-}- Map.singleton nt_ _prodsIaugmentsOut- {-# LINE 1017 "Desugar.hs" #-})) of- { !_augmentsOut ->- (case (({-# LINE 228 "Desugar.ag" #-}- _augmentsOut- {-# LINE 1021 "Desugar.hs" #-})) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 37 "Desugar.ag" #-}- _prodsIerrors- {-# LINE 1025 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- Nonterminal nt_ params_ inh_ syn_ _prodsIoutput- {-# LINE 1029 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1033 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) })) )--- Nonterminals -------------------------------------------------{-- visit 0:- inherited attributes:- augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- forcedIrrefutables : AttrMap- options : Options- synthesized attributes:- allAttributes : AttrMap- augmentsOut : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- errors : Seq Error- output : SELF - alternatives:- alternative Cons:- child hd : Nonterminal - child tl : Nonterminals - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-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 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- AttrMap ->- Options ->- ( AttrMap,(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),(Seq Error),Nonterminals ))-data Inh_Nonterminals = Inh_Nonterminals {augmentsIn_Inh_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),forcedIrrefutables_Inh_Nonterminals :: !(AttrMap),options_Inh_Nonterminals :: !(Options)}-data Syn_Nonterminals = Syn_Nonterminals {allAttributes_Syn_Nonterminals :: !(AttrMap),augmentsOut_Syn_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),errors_Syn_Nonterminals :: !((Seq Error)),output_Syn_Nonterminals :: !(Nonterminals )}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals !(T_Nonterminals sem ) !(Inh_Nonterminals _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIoptions ) =- (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) =- (sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIoptions )- in (Syn_Nonterminals _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons !(T_Nonterminal hd_ ) !(T_Nonterminals tl_ ) =- (T_Nonterminals (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsIoptions) ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 1086 "Desugar.hs" #-})) of- { !_tlOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1090 "Desugar.hs" #-})) of- { !_tlOforcedIrrefutables ->- (case (({-# LINE 227 "Desugar.ag" #-}- _lhsIaugmentsIn- {-# LINE 1094 "Desugar.hs" #-})) of- { !_tlOaugmentsIn ->- (case ((tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOoptions )) of- { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 1100 "Desugar.hs" #-})) of- { !_hdOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1104 "Desugar.hs" #-})) of- { !_hdOforcedIrrefutables ->- (case (({-# LINE 227 "Desugar.ag" #-}- _lhsIaugmentsIn- {-# LINE 1108 "Desugar.hs" #-})) of- { !_hdOaugmentsIn ->- (case ((hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOoptions )) of- { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _hdIallAttributes `mergeAttributes` _tlIallAttributes- {-# LINE 1114 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 228 "Desugar.ag" #-}- _hdIaugmentsOut `Map.union` _tlIaugmentsOut- {-# LINE 1118 "Desugar.hs" #-})) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 37 "Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 1122 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 1126 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1130 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =- (T_Nonterminals (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsIoptions) ->- (case (({-# LINE 195 "Desugar.ag" #-}- Map.empty- {-# LINE 1140 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 228 "Desugar.ag" #-}- Map.empty- {-# LINE 1144 "Desugar.hs" #-})) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 1148 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- []- {-# LINE 1152 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1156 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) })) )--- Pattern ------------------------------------------------------{-- visit 0:- synthesized attribute:- defsCollect : Set (Identifier, Identifier)- visit 1:- inherited attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- con : ConstructorIdent- defs : Set (Identifier, Identifier)- forcedIrrefutables : AttrMap- nt : NontermIdent- synthesized attributes:- allAttributes : AttrMap- copy : SELF - errors : Seq Error- output : SELF - alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - child parts : Patterns - visit 0:- local def : _- visit 1:- local copy : _- local _tup2 : _- local field' : _- local err2 : _- local err1 : _- local output : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 1:- local copy : _- local output : _- alternative Irrefutable:- child pat : Pattern - visit 1:- local copy : _- local output : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 1:- local copy : _- local output : _- alternative Underscore:- child pos : {Pos}- visit 1:- local copy : _- local output : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern !(Alias _field _attr _pat _parts ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )-sem_Pattern !(Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern !(Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern !(Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern !(Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (( (Set (Identifier, Identifier)),T_Pattern_1 ))-newtype T_Pattern_1 = T_Pattern_1 (([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- (Set (Identifier, Identifier)) ->- AttrMap ->- NontermIdent ->- ( AttrMap,Pattern ,(Seq Error),Pattern ))-data Inh_Pattern = Inh_Pattern {childInhs_Inh_Pattern :: !(([(Identifier, Identifier)])),childSyns_Inh_Pattern :: !(([(Identifier, Identifier)])),con_Inh_Pattern :: !(ConstructorIdent),defs_Inh_Pattern :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Pattern :: !(AttrMap),nt_Inh_Pattern :: !(NontermIdent)}-data Syn_Pattern = Syn_Pattern {allAttributes_Syn_Pattern :: !(AttrMap),copy_Syn_Pattern :: !(Pattern ),defsCollect_Syn_Pattern :: !((Set (Identifier, Identifier))),errors_Syn_Pattern :: !((Seq Error)),output_Syn_Pattern :: !(Pattern )}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt ) =- (let ( !_lhsOdefsCollect,!T_Pattern_1 sem_1) =- (sem )- ( !_lhsOallAttributes,!_lhsOcopy,!_lhsOerrors,!_lhsOoutput) =- (sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt )- in (Syn_Pattern _lhsOallAttributes _lhsOcopy _lhsOdefsCollect _lhsOerrors _lhsOoutput ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Patterns ->- T_Pattern -sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) !(T_Patterns parts_ ) =- (T_Pattern (case (({-# LINE 181 "Desugar.ag" #-}- Set.singleton (field_, attr_)- {-# LINE 1256 "Desugar.hs" #-})) of- { !_def ->- (case ((parts_ )) of- { ( !_partsIdefsCollect,!T_Patterns_1 parts_1) ->- (case ((pat_ )) of- { ( !_patIdefsCollect,!T_Pattern_1 pat_1) ->- (case (({-# LINE 182 "Desugar.ag" #-}- _def `Set.union` _patIdefsCollect `Set.union` _partsIdefsCollect- {-# LINE 1264 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Pattern_Alias_1 :: T_Pattern_1 - sem_Pattern_Alias_1 =- (T_Pattern_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 1276 "Desugar.hs" #-})) of- { !_patOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 1280 "Desugar.hs" #-})) of- { !_patOcon ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1284 "Desugar.hs" #-})) of- { !_patOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 1288 "Desugar.hs" #-})) of- { !_patOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1292 "Desugar.hs" #-})) of- { !_patOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1296 "Desugar.hs" #-})) of- { !_patOchildInhs ->- (case ((pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt )) of- { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->- (case (({-# LINE 199 "Desugar.ag" #-}- (Map.singleton _lhsInt $ Map.singleton _lhsIcon $ Set.singleton (field_, attr_)) `mergeAttributes` _patIallAttributes- {-# LINE 1302 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 1306 "Desugar.hs" #-})) of- { !_partsOnt ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1310 "Desugar.hs" #-})) of- { !_partsOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 1314 "Desugar.hs" #-})) of- { !_partsOdefs ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 1318 "Desugar.hs" #-})) of- { !_partsOcon ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1322 "Desugar.hs" #-})) of- { !_partsOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1326 "Desugar.hs" #-})) of- { !_partsOchildInhs ->- (case ((parts_1 _partsOchildInhs _partsOchildSyns _partsOcon _partsOdefs _partsOforcedIrrefutables _partsOnt )) of- { ( !_partsIallAttributes,!_partsIcopy,!_partsIerrors,!_partsIoutput) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 1332 "Desugar.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1336 "Desugar.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 109 "Desugar.ag" #-}- maybeError field_ (UndefAttr _lhsInt _lhsIcon (Ident "<ANY>" (getPos field_)) attr_ True) $- findField field_ attr_ _lhsIchildInhs- {-# LINE 1341 "Desugar.hs" #-})) of- { !__tup2 ->- (case (({-# LINE 109 "Desugar.ag" #-}- __tup2- {-# LINE 1345 "Desugar.hs" #-})) of- { !(!_field',_) ->- (case (({-# LINE 111 "Desugar.ag" #-}- if _field' == field_- then Seq.empty- else if (_field' , attr_) `Set.member` _lhsIdefs- then Seq.singleton $ DupRule _lhsInt _lhsIcon field_ attr_ _field'- else Seq.empty- {-# LINE 1353 "Desugar.hs" #-})) of- { !_err2 ->- (case (({-# LINE 109 "Desugar.ag" #-}- __tup2- {-# LINE 1357 "Desugar.hs" #-})) of- { !(_,!_err1) ->- (case (({-# LINE 116 "Desugar.ag" #-}- _err1 Seq.>< _err2 Seq.>< _patIerrors Seq.>< _partsIerrors- {-# LINE 1361 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 117 "Desugar.ag" #-}- Alias _field' attr_ _patIoutput _partsIoutput- {-# LINE 1365 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 218 "Desugar.ag" #-}- if Set.member (field_, attr_) $ Map.findWithDefault Set.empty _lhsIcon $ Map.findWithDefault Map.empty _lhsInt $ _lhsIforcedIrrefutables- then Irrefutable _output- else _output- {-# LINE 1371 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Pattern_Alias_1)) of- { ( !sem_Pattern_1) ->- ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) }) }) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =- (T_Pattern (case ((pats_ )) of- { ( !_patsIdefsCollect,!T_Patterns_1 pats_1) ->- (case (({-# LINE 178 "Desugar.ag" #-}- _patsIdefsCollect- {-# LINE 1385 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Pattern_Constr_1 :: T_Pattern_1 - sem_Pattern_Constr_1 =- (T_Pattern_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 1397 "Desugar.hs" #-})) of- { !_patsOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 1401 "Desugar.hs" #-})) of- { !_patsOcon ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1405 "Desugar.hs" #-})) of- { !_patsOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 1409 "Desugar.hs" #-})) of- { !_patsOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1413 "Desugar.hs" #-})) of- { !_patsOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1417 "Desugar.hs" #-})) of- { !_patsOchildInhs ->- (case ((pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt )) of- { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _patsIallAttributes- {-# LINE 1423 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 1427 "Desugar.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1431 "Desugar.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 37 "Desugar.ag" #-}- _patsIerrors- {-# LINE 1435 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- Constr name_ _patsIoutput- {-# LINE 1439 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1443 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Pattern_Constr_1)) of- { ( !sem_Pattern_1) ->- ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable !(T_Pattern pat_ ) =- (T_Pattern (case ((pat_ )) of- { ( !_patIdefsCollect,!T_Pattern_1 pat_1) ->- (case (({-# LINE 178 "Desugar.ag" #-}- _patIdefsCollect- {-# LINE 1456 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Pattern_Irrefutable_1 :: T_Pattern_1 - sem_Pattern_Irrefutable_1 =- (T_Pattern_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt) ->- (case (({-# LINE 201 "Desugar.ag" #-}- Map.empty- {-# LINE 1468 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 1472 "Desugar.hs" #-})) of- { !_patOnt ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1476 "Desugar.hs" #-})) of- { !_patOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 1480 "Desugar.hs" #-})) of- { !_patOdefs ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 1484 "Desugar.hs" #-})) of- { !_patOcon ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1488 "Desugar.hs" #-})) of- { !_patOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1492 "Desugar.hs" #-})) of- { !_patOchildInhs ->- (case ((pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt )) of- { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 1498 "Desugar.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1502 "Desugar.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 37 "Desugar.ag" #-}- _patIerrors- {-# LINE 1506 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- Irrefutable _patIoutput- {-# LINE 1510 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1514 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Pattern_Irrefutable_1)) of- { ( !sem_Pattern_1) ->- ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =- (T_Pattern (case ((pats_ )) of- { ( !_patsIdefsCollect,!T_Patterns_1 pats_1) ->- (case (({-# LINE 178 "Desugar.ag" #-}- _patsIdefsCollect- {-# LINE 1528 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Pattern_Product_1 :: T_Pattern_1 - sem_Pattern_Product_1 =- (T_Pattern_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 1540 "Desugar.hs" #-})) of- { !_patsOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 1544 "Desugar.hs" #-})) of- { !_patsOcon ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1548 "Desugar.hs" #-})) of- { !_patsOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 1552 "Desugar.hs" #-})) of- { !_patsOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1556 "Desugar.hs" #-})) of- { !_patsOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1560 "Desugar.hs" #-})) of- { !_patsOchildInhs ->- (case ((pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt )) of- { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _patsIallAttributes- {-# LINE 1566 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 1570 "Desugar.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1574 "Desugar.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 37 "Desugar.ag" #-}- _patsIerrors- {-# LINE 1578 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- Product pos_ _patsIoutput- {-# LINE 1582 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1586 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Pattern_Product_1)) of- { ( !sem_Pattern_1) ->- ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore !pos_ =- (T_Pattern (case (({-# LINE 178 "Desugar.ag" #-}- Set.empty- {-# LINE 1597 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Pattern_Underscore_1 :: T_Pattern_1 - sem_Pattern_Underscore_1 =- (T_Pattern_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt) ->- (case (({-# LINE 195 "Desugar.ag" #-}- Map.empty- {-# LINE 1609 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Underscore pos_- {-# LINE 1613 "Desugar.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1617 "Desugar.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 1621 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- Underscore pos_- {-# LINE 1625 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1629 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )- in sem_Pattern_Underscore_1)) of- { ( !sem_Pattern_1) ->- ( _lhsOdefsCollect,sem_Pattern_1) }) }) )--- Patterns -----------------------------------------------------{-- visit 0:- synthesized attribute:- defsCollect : Set (Identifier, Identifier)- visit 1:- inherited attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- con : ConstructorIdent- defs : Set (Identifier, Identifier)- forcedIrrefutables : AttrMap- nt : NontermIdent- synthesized attributes:- allAttributes : AttrMap- copy : SELF - errors : Seq Error- output : SELF - alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 1:- local copy : _- local output : _- alternative Nil:- visit 1:- local copy : _- local output : _--}--- cata-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 (( (Set (Identifier, Identifier)),T_Patterns_1 ))-newtype T_Patterns_1 = T_Patterns_1 (([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- (Set (Identifier, Identifier)) ->- AttrMap ->- NontermIdent ->- ( AttrMap,Patterns ,(Seq Error),Patterns ))-data Inh_Patterns = Inh_Patterns {childInhs_Inh_Patterns :: !(([(Identifier, Identifier)])),childSyns_Inh_Patterns :: !(([(Identifier, Identifier)])),con_Inh_Patterns :: !(ConstructorIdent),defs_Inh_Patterns :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Patterns :: !(AttrMap),nt_Inh_Patterns :: !(NontermIdent)}-data Syn_Patterns = Syn_Patterns {allAttributes_Syn_Patterns :: !(AttrMap),copy_Syn_Patterns :: !(Patterns ),defsCollect_Syn_Patterns :: !((Set (Identifier, Identifier))),errors_Syn_Patterns :: !((Seq Error)),output_Syn_Patterns :: !(Patterns )}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt ) =- (let ( !_lhsOdefsCollect,!T_Patterns_1 sem_1) =- (sem )- ( !_lhsOallAttributes,!_lhsOcopy,!_lhsOerrors,!_lhsOoutput) =- (sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt )- in (Syn_Patterns _lhsOallAttributes _lhsOcopy _lhsOdefsCollect _lhsOerrors _lhsOoutput ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =- (T_Patterns (case ((tl_ )) of- { ( !_tlIdefsCollect,!T_Patterns_1 tl_1) ->- (case ((hd_ )) of- { ( !_hdIdefsCollect,!T_Pattern_1 hd_1) ->- (case (({-# LINE 178 "Desugar.ag" #-}- _hdIdefsCollect `Set.union` _tlIdefsCollect- {-# LINE 1700 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Patterns_Cons_1 :: T_Patterns_1 - sem_Patterns_Cons_1 =- (T_Patterns_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 1712 "Desugar.hs" #-})) of- { !_tlOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 1716 "Desugar.hs" #-})) of- { !_tlOcon ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 1720 "Desugar.hs" #-})) of- { !_hdOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 1724 "Desugar.hs" #-})) of- { !_hdOcon ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1728 "Desugar.hs" #-})) of- { !_tlOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 1732 "Desugar.hs" #-})) of- { !_tlOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1736 "Desugar.hs" #-})) of- { !_tlOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1740 "Desugar.hs" #-})) of- { !_tlOchildInhs ->- (case ((tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt )) of- { ( !_tlIallAttributes,!_tlIcopy,!_tlIerrors,!_tlIoutput) ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1746 "Desugar.hs" #-})) of- { !_hdOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 1750 "Desugar.hs" #-})) of- { !_hdOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 1754 "Desugar.hs" #-})) of- { !_hdOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 1758 "Desugar.hs" #-})) of- { !_hdOchildInhs ->- (case ((hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt )) of- { ( !_hdIallAttributes,!_hdIcopy,!_hdIerrors,!_hdIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _hdIallAttributes `mergeAttributes` _tlIallAttributes- {-# LINE 1764 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 23 "./Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 1768 "Desugar.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1772 "Desugar.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 37 "Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 1776 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 1780 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1784 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Patterns_Cons_1)) of- { ( !sem_Patterns_1) ->- ( _lhsOdefsCollect,sem_Patterns_1) }) }) }) }) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (case (({-# LINE 178 "Desugar.ag" #-}- Set.empty- {-# LINE 1794 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Patterns_Nil_1 :: T_Patterns_1 - sem_Patterns_Nil_1 =- (T_Patterns_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt) ->- (case (({-# LINE 195 "Desugar.ag" #-}- Map.empty- {-# LINE 1806 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 23 "./Patterns.ag" #-}- []- {-# LINE 1810 "Desugar.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1814 "Desugar.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 1818 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- []- {-# LINE 1822 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1826 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )- in sem_Patterns_Nil_1)) of- { ( !sem_Patterns_1) ->- ( _lhsOdefsCollect,sem_Patterns_1) }) }) )--- Production ---------------------------------------------------{-- visit 0:- inherited attributes:- augmentsIn : Map ConstructorIdent (Map Identifier [Expression])- forcedIrrefutables : AttrMap- nt : NontermIdent- options : Options- synthesized attributes:- allAttributes : AttrMap- augmentsOut : Map ConstructorIdent (Map Identifier [Expression])- errors : Seq Error- output : SELF - alternatives:- alternative Production:- child con : {ConstructorIdent}- child children : Children - child rules : Rules - child typeSigs : TypeSigs - visit 0:- local augmentsIn : _- local _tup3 : _- local augmentsOut1 : _- local augmentsOut : _- local augmentErrs : _- local output : _--}--- cata-sem_Production :: Production ->- T_Production -sem_Production !(Production _con _children _rules _typeSigs ) =- (sem_Production_Production _con (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) )--- semantic domain-newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->- AttrMap ->- NontermIdent ->- Options ->- ( AttrMap,(Map ConstructorIdent (Map Identifier [Expression])),(Seq Error),Production ))-data Inh_Production = Inh_Production {augmentsIn_Inh_Production :: !((Map ConstructorIdent (Map Identifier [Expression]))),forcedIrrefutables_Inh_Production :: !(AttrMap),nt_Inh_Production :: !(NontermIdent),options_Inh_Production :: !(Options)}-data Syn_Production = Syn_Production {allAttributes_Syn_Production :: !(AttrMap),augmentsOut_Syn_Production :: !((Map ConstructorIdent (Map Identifier [Expression]))),errors_Syn_Production :: !((Seq Error)),output_Syn_Production :: !(Production )}-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production !(T_Production sem ) !(Inh_Production _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =- (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) =- (sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions )- in (Syn_Production _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))-sem_Production_Production :: ConstructorIdent ->- T_Children ->- T_Rules ->- T_TypeSigs ->- T_Production -sem_Production_Production !con_ !(T_Children children_ ) !(T_Rules rules_ ) !(T_TypeSigs typeSigs_ ) =- (T_Production (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsInt)- (!_lhsIoptions) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 1891 "Desugar.hs" #-})) of- { !_rulesOnt ->- (case (({-# LINE 160 "Desugar.ag" #-}- con_- {-# LINE 1895 "Desugar.hs" #-})) of- { !_rulesOcon ->- (case ((rules_ )) of- { ( !_rulesIdefsCollect,!T_Rules_1 rules_1) ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 1901 "Desugar.hs" #-})) of- { !_rulesOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 1905 "Desugar.hs" #-})) of- { !_rulesOforcedIrrefutables ->- (case ((children_ )) of- { ( !_childrenIchildInhs,!_childrenIchildSyns,!_childrenIoutput) ->- (case (({-# LINE 125 "Desugar.ag" #-}- _childrenIchildSyns- {-# LINE 1911 "Desugar.hs" #-})) of- { !_rulesOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _childrenIchildInhs- {-# LINE 1915 "Desugar.hs" #-})) of- { !_rulesOchildInhs ->- (case (({-# LINE 187 "Desugar.ag" #-}- _rulesIdefsCollect- {-# LINE 1919 "Desugar.hs" #-})) of- { !_rulesOdefs ->- (case ((rules_1 _rulesOchildInhs _rulesOchildSyns _rulesOcon _rulesOdefs _rulesOforcedIrrefutables _rulesOnt _rulesOoptions )) of- { ( !_rulesIallAttributes,!_rulesIerrors,!_rulesIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _rulesIallAttributes- {-# LINE 1925 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 243 "Desugar.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaugmentsIn- {-# LINE 1929 "Desugar.hs" #-})) of- { !_augmentsIn ->- (case (({-# LINE 246 "Desugar.ag" #-}- Map.mapAccum (desugarExprs _lhsIoptions _lhsInt con_ _childrenIchildInhs _childrenIchildSyns) Seq.empty _augmentsIn- {-# LINE 1933 "Desugar.hs" #-})) of- { !__tup3 ->- (case (({-# LINE 246 "Desugar.ag" #-}- __tup3- {-# LINE 1937 "Desugar.hs" #-})) of- { !(_,!_augmentsOut1) ->- (case (({-# LINE 244 "Desugar.ag" #-}- Map.singleton con_ _augmentsOut1- {-# LINE 1941 "Desugar.hs" #-})) of- { !_augmentsOut ->- (case (({-# LINE 230 "Desugar.ag" #-}- _augmentsOut- {-# LINE 1945 "Desugar.hs" #-})) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 246 "Desugar.ag" #-}- __tup3- {-# LINE 1949 "Desugar.hs" #-})) of- { !(!_augmentErrs,_) ->- (case (({-# LINE 282 "Desugar.ag" #-}- _rulesIerrors Seq.>< _augmentErrs- {-# LINE 1953 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case ((typeSigs_ )) of- { ( !_typeSigsIoutput) ->- (case (({-# LINE 39 "Desugar.ag" #-}- Production con_ _childrenIoutput _rulesIoutput _typeSigsIoutput- {-# LINE 1959 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 1963 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Productions --------------------------------------------------{-- visit 0:- inherited attributes:- augmentsIn : Map ConstructorIdent (Map Identifier [Expression])- forcedIrrefutables : AttrMap- nt : NontermIdent- options : Options- synthesized attributes:- allAttributes : AttrMap- augmentsOut : Map ConstructorIdent (Map Identifier [Expression])- errors : Seq Error- output : SELF - alternatives:- alternative Cons:- child hd : Production - child tl : Productions - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-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 ((Map ConstructorIdent (Map Identifier [Expression])) ->- AttrMap ->- NontermIdent ->- Options ->- ( AttrMap,(Map ConstructorIdent (Map Identifier [Expression])),(Seq Error),Productions ))-data Inh_Productions = Inh_Productions {augmentsIn_Inh_Productions :: !((Map ConstructorIdent (Map Identifier [Expression]))),forcedIrrefutables_Inh_Productions :: !(AttrMap),nt_Inh_Productions :: !(NontermIdent),options_Inh_Productions :: !(Options)}-data Syn_Productions = Syn_Productions {allAttributes_Syn_Productions :: !(AttrMap),augmentsOut_Syn_Productions :: !((Map ConstructorIdent (Map Identifier [Expression]))),errors_Syn_Productions :: !((Seq Error)),output_Syn_Productions :: !(Productions )}-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions !(T_Productions sem ) !(Inh_Productions _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =- (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) =- (sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions )- in (Syn_Productions _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons !(T_Production hd_ ) !(T_Productions tl_ ) =- (T_Productions (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsInt)- (!_lhsIoptions) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 2019 "Desugar.hs" #-})) of- { !_tlOnt ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 2023 "Desugar.hs" #-})) of- { !_hdOnt ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 2027 "Desugar.hs" #-})) of- { !_tlOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2031 "Desugar.hs" #-})) of- { !_tlOforcedIrrefutables ->- (case (({-# LINE 229 "Desugar.ag" #-}- _lhsIaugmentsIn- {-# LINE 2035 "Desugar.hs" #-})) of- { !_tlOaugmentsIn ->- (case ((tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOnt _tlOoptions )) of- { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 2041 "Desugar.hs" #-})) of- { !_hdOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2045 "Desugar.hs" #-})) of- { !_hdOforcedIrrefutables ->- (case (({-# LINE 229 "Desugar.ag" #-}- _lhsIaugmentsIn- {-# LINE 2049 "Desugar.hs" #-})) of- { !_hdOaugmentsIn ->- (case ((hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOnt _hdOoptions )) of- { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _hdIallAttributes `mergeAttributes` _tlIallAttributes- {-# LINE 2055 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 230 "Desugar.ag" #-}- _hdIaugmentsOut `Map.union` _tlIaugmentsOut- {-# LINE 2059 "Desugar.hs" #-})) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 37 "Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2063 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2067 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2071 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =- (T_Productions (\ (!_lhsIaugmentsIn)- (!_lhsIforcedIrrefutables)- (!_lhsInt)- (!_lhsIoptions) ->- (case (({-# LINE 195 "Desugar.ag" #-}- Map.empty- {-# LINE 2082 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 230 "Desugar.ag" #-}- Map.empty- {-# LINE 2086 "Desugar.hs" #-})) of- { !_lhsOaugmentsOut ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 2090 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- []- {-# LINE 2094 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2098 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) })) )--- Rule ---------------------------------------------------------{-- visit 0:- synthesized attribute:- defsCollect : Set (Identifier, Identifier)- visit 1:- inherited attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- con : ConstructorIdent- defs : Set (Identifier, Identifier)- forcedIrrefutables : AttrMap- nt : NontermIdent- options : Options- synthesized attributes:- allAttributes : AttrMap- errors : Seq Error- output : SELF - alternatives:- alternative Rule:- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : Expression - child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- visit 1:- local ruleDescr : _- local output : _--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit )--- semantic domain-newtype T_Rule = T_Rule (( (Set (Identifier, Identifier)),T_Rule_1 ))-newtype T_Rule_1 = T_Rule_1 (([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- (Set (Identifier, Identifier)) ->- AttrMap ->- NontermIdent ->- Options ->- ( AttrMap,(Seq Error),Rule ))-data Inh_Rule = Inh_Rule {childInhs_Inh_Rule :: !(([(Identifier, Identifier)])),childSyns_Inh_Rule :: !(([(Identifier, Identifier)])),con_Inh_Rule :: !(ConstructorIdent),defs_Inh_Rule :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Rule :: !(AttrMap),nt_Inh_Rule :: !(NontermIdent),options_Inh_Rule :: !(Options)}-data Syn_Rule = Syn_Rule {allAttributes_Syn_Rule :: !(AttrMap),defsCollect_Syn_Rule :: !((Set (Identifier, Identifier))),errors_Syn_Rule :: !((Seq Error)),output_Syn_Rule :: !(Rule )}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule !(T_Rule sem ) !(Inh_Rule _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =- (let ( !_lhsOdefsCollect,!T_Rule_1 sem_1) =- (sem )- ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) =- (sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions )- in (Syn_Rule _lhsOallAttributes _lhsOdefsCollect _lhsOerrors _lhsOoutput ))-sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- T_Expression ->- Bool ->- String ->- Bool ->- T_Rule -sem_Rule_Rule !mbName_ !(T_Pattern pattern_ ) !(T_Expression rhs_ ) !owrt_ !origin_ !explicit_ =- (T_Rule (case ((pattern_ )) of- { ( !_patternIdefsCollect,!T_Pattern_1 pattern_1) ->- (case (({-# LINE 178 "Desugar.ag" #-}- _patternIdefsCollect- {-# LINE 2169 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Rule_Rule_1 :: T_Rule_1 - sem_Rule_Rule_1 =- (T_Rule_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt)- (!_lhsIoptions) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 2182 "Desugar.hs" #-})) of- { !_patternOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 2186 "Desugar.hs" #-})) of- { !_patternOcon ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2190 "Desugar.hs" #-})) of- { !_patternOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 2194 "Desugar.hs" #-})) of- { !_patternOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2198 "Desugar.hs" #-})) of- { !_patternOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2202 "Desugar.hs" #-})) of- { !_patternOchildInhs ->- (case ((pattern_1 _patternOchildInhs _patternOchildSyns _patternOcon _patternOdefs _patternOforcedIrrefutables _patternOnt )) of- { ( !_patternIallAttributes,!_patternIcopy,!_patternIerrors,!_patternIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _patternIallAttributes- {-# LINE 2208 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 171 "Desugar.ag" #-}- show _lhsInt ++ " :: " ++ show _lhsIcon ++ " :: " ++ (concat $ intersperse "," $ map (\(f,a) -> show f ++ "." ++ show a) $ Set.toList _patternIdefsCollect)- {-# LINE 2212 "Desugar.hs" #-})) of- { !_ruleDescr ->- (case (({-# LINE 167 "Desugar.ag" #-}- _ruleDescr- {-# LINE 2216 "Desugar.hs" #-})) of- { !_rhsOruleDescr ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 2220 "Desugar.hs" #-})) of- { !_rhsOoptions ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 2224 "Desugar.hs" #-})) of- { !_rhsOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 2228 "Desugar.hs" #-})) of- { !_rhsOcon ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2232 "Desugar.hs" #-})) of- { !_rhsOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2236 "Desugar.hs" #-})) of- { !_rhsOchildInhs ->- (case ((rhs_ _rhsOchildInhs _rhsOchildSyns _rhsOcon _rhsOnt _rhsOoptions _rhsOruleDescr )) of- { ( !_rhsIerrors,!_rhsIoutput) ->- (case (({-# LINE 37 "Desugar.ag" #-}- _patternIerrors Seq.>< _rhsIerrors- {-# LINE 2242 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- Rule mbName_ _patternIoutput _rhsIoutput owrt_ origin_ explicit_- {-# LINE 2246 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2250 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Rule_Rule_1)) of- { ( !sem_Rule_1) ->- ( _lhsOdefsCollect,sem_Rule_1) }) }) }) )--- Rules --------------------------------------------------------{-- visit 0:- synthesized attribute:- defsCollect : Set (Identifier, Identifier)- visit 1:- inherited attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- con : ConstructorIdent- defs : Set (Identifier, Identifier)- forcedIrrefutables : AttrMap- nt : NontermIdent- options : Options- synthesized attributes:- allAttributes : AttrMap- errors : Seq Error- output : SELF - alternatives:- alternative Cons:- child hd : Rule - child tl : Rules - visit 1:- local output : _- alternative Nil:- visit 1:- local output : _--}--- cata-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 (( (Set (Identifier, Identifier)),T_Rules_1 ))-newtype T_Rules_1 = T_Rules_1 (([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- (Set (Identifier, Identifier)) ->- AttrMap ->- NontermIdent ->- Options ->- ( AttrMap,(Seq Error),Rules ))-data Inh_Rules = Inh_Rules {childInhs_Inh_Rules :: !(([(Identifier, Identifier)])),childSyns_Inh_Rules :: !(([(Identifier, Identifier)])),con_Inh_Rules :: !(ConstructorIdent),defs_Inh_Rules :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Rules :: !(AttrMap),nt_Inh_Rules :: !(NontermIdent),options_Inh_Rules :: !(Options)}-data Syn_Rules = Syn_Rules {allAttributes_Syn_Rules :: !(AttrMap),defsCollect_Syn_Rules :: !((Set (Identifier, Identifier))),errors_Syn_Rules :: !((Seq Error)),output_Syn_Rules :: !(Rules )}-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules !(T_Rules sem ) !(Inh_Rules _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =- (let ( !_lhsOdefsCollect,!T_Rules_1 sem_1) =- (sem )- ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) =- (sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions )- in (Syn_Rules _lhsOallAttributes _lhsOdefsCollect _lhsOerrors _lhsOoutput ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons !(T_Rule hd_ ) !(T_Rules tl_ ) =- (T_Rules (case ((tl_ )) of- { ( !_tlIdefsCollect,!T_Rules_1 tl_1) ->- (case ((hd_ )) of- { ( !_hdIdefsCollect,!T_Rule_1 hd_1) ->- (case (({-# LINE 178 "Desugar.ag" #-}- _hdIdefsCollect `Set.union` _tlIdefsCollect- {-# LINE 2320 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Rules_Cons_1 :: T_Rules_1 - sem_Rules_Cons_1 =- (T_Rules_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt)- (!_lhsIoptions) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 2333 "Desugar.hs" #-})) of- { !_tlOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 2337 "Desugar.hs" #-})) of- { !_tlOcon ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 2341 "Desugar.hs" #-})) of- { !_hdOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 2345 "Desugar.hs" #-})) of- { !_hdOcon ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 2349 "Desugar.hs" #-})) of- { !_tlOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2353 "Desugar.hs" #-})) of- { !_tlOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 2357 "Desugar.hs" #-})) of- { !_tlOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2361 "Desugar.hs" #-})) of- { !_tlOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2365 "Desugar.hs" #-})) of- { !_tlOchildInhs ->- (case ((tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt _tlOoptions )) of- { ( !_tlIallAttributes,!_tlIerrors,!_tlIoutput) ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 2371 "Desugar.hs" #-})) of- { !_hdOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2375 "Desugar.hs" #-})) of- { !_hdOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 2379 "Desugar.hs" #-})) of- { !_hdOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2383 "Desugar.hs" #-})) of- { !_hdOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2387 "Desugar.hs" #-})) of- { !_hdOchildInhs ->- (case ((hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt _hdOoptions )) of- { ( !_hdIallAttributes,!_hdIerrors,!_hdIoutput) ->- (case (({-# LINE 195 "Desugar.ag" #-}- _hdIallAttributes `mergeAttributes` _tlIallAttributes- {-# LINE 2393 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 37 "Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2397 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2401 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2405 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Rules_Cons_1)) of- { ( !sem_Rules_1) ->- ( _lhsOdefsCollect,sem_Rules_1) }) }) }) }) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =- (T_Rules (case (({-# LINE 178 "Desugar.ag" #-}- Set.empty- {-# LINE 2415 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((let sem_Rules_Nil_1 :: T_Rules_1 - sem_Rules_Nil_1 =- (T_Rules_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt)- (!_lhsIoptions) ->- (case (({-# LINE 195 "Desugar.ag" #-}- Map.empty- {-# LINE 2428 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 2432 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- []- {-# LINE 2436 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2440 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) })) )- in sem_Rules_Nil_1)) of- { ( !sem_Rules_1) ->- ( _lhsOdefsCollect,sem_Rules_1) }) }) )--- TypeSig ------------------------------------------------------{-- visit 0:- synthesized attribute:- output : SELF - alternatives:- alternative TypeSig:- child name : {Identifier}- child tp : {Type}- visit 0:- local output : _--}--- cata-sem_TypeSig :: TypeSig ->- T_TypeSig -sem_TypeSig !(TypeSig _name _tp ) =- (sem_TypeSig_TypeSig _name _tp )--- semantic domain-newtype T_TypeSig = T_TypeSig (( TypeSig ))-data Inh_TypeSig = Inh_TypeSig {}-data Syn_TypeSig = Syn_TypeSig {output_Syn_TypeSig :: !(TypeSig )}-wrap_TypeSig :: T_TypeSig ->- Inh_TypeSig ->- Syn_TypeSig -wrap_TypeSig !(T_TypeSig sem ) !(Inh_TypeSig ) =- (let ( !_lhsOoutput) =- (sem )- in (Syn_TypeSig _lhsOoutput ))-sem_TypeSig_TypeSig :: Identifier ->- Type ->- T_TypeSig -sem_TypeSig_TypeSig !name_ !tp_ =- (T_TypeSig (case (({-# LINE 39 "Desugar.ag" #-}- TypeSig name_ tp_- {-# LINE 2480 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2484 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) )--- TypeSigs -----------------------------------------------------{-- visit 0:- synthesized attribute:- output : SELF - alternatives:- alternative Cons:- child hd : TypeSig - child tl : TypeSigs - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-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 (( TypeSigs ))-data Inh_TypeSigs = Inh_TypeSigs {}-data Syn_TypeSigs = Syn_TypeSigs {output_Syn_TypeSigs :: !(TypeSigs )}-wrap_TypeSigs :: T_TypeSigs ->- Inh_TypeSigs ->- Syn_TypeSigs -wrap_TypeSigs !(T_TypeSigs sem ) !(Inh_TypeSigs ) =- (let ( !_lhsOoutput) =- (sem )- in (Syn_TypeSigs _lhsOoutput ))-sem_TypeSigs_Cons :: T_TypeSig ->- T_TypeSigs ->- T_TypeSigs -sem_TypeSigs_Cons !(T_TypeSig hd_ ) !(T_TypeSigs tl_ ) =- (T_TypeSigs (case ((tl_ )) of- { ( !_tlIoutput) ->- (case ((hd_ )) of- { ( !_hdIoutput) ->- (case (({-# LINE 39 "Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2528 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2532 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) }) }) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (case (({-# LINE 39 "Desugar.ag" #-}- []- {-# LINE 2539 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2543 "Desugar.hs" #-})) of+-- UUAGC 0.9.30 (Desugar.ag)+module Desugar where+{-# LINE 13 "Desugar.ag" #-}++import qualified Data.Set as Set+import qualified Data.Map as Map+import Data.Map(Map)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq,(><))+import UU.Scanner.Position(Pos(..))+import Maybe+import Data.List(intersperse)++import AbstractSyntax+import ErrorMessages+import Options+import HsToken+import HsTokenScanner+import TokenDef+import CommonTypes+{-# LINE 24 "../src-derived/Desugar.hs" #-}++{-# LINE 2 "./AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import CommonTypes+{-# LINE 34 "../src-derived/Desugar.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 41 "../src-derived/Desugar.hs" #-}++{-# LINE 2 "./Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 47 "../src-derived/Desugar.hs" #-}++{-# LINE 2 "./HsToken.ag" #-}++import CommonTypes+import UU.Scanner.Position(Pos)+{-# LINE 53 "../src-derived/Desugar.hs" #-}+{-# LINE 97 "Desugar.ag" #-}++addl :: Int -> Pos -> Pos+addl n (Pos l c f) = Pos (l+n) c f+{-# LINE 58 "../src-derived/Desugar.hs" #-}++{-# LINE 132 "Desugar.ag" #-}++maybeError :: a -> Error -> Maybe a -> (a, Seq Error)+maybeError def err mb+ = maybe (def, Seq.singleton err) (\r -> (r, Seq.empty)) mb++findField :: Identifier -> Identifier -> [(Identifier,Identifier)] -> Maybe Identifier+findField fld attr list+ | fld == _FIRST = f list+ | fld == _LAST = f (reverse list)+ | otherwise = Just fld+ where+ f = lookup attr+{-# LINE 73 "../src-derived/Desugar.hs" #-}++{-# LINE 203 "Desugar.ag" #-}++mergeAttributes :: AttrMap -> AttrMap -> AttrMap+mergeAttributes = Map.unionWith $ Map.unionWith $ Set.union+{-# LINE 79 "../src-derived/Desugar.hs" #-}++{-# LINE 250 "Desugar.ag" #-}++desugarExprs :: Options -> NontermIdent -> ConstructorIdent ->+ [(Identifier, Identifier)] -> [(Identifier, Identifier)] ->+ Seq Error -> [Expression] -> (Seq Error, [Expression])+desugarExprs options nt con childInhs childSyns+ = mapAccum (desugarExpr options nt con childInhs childSyns)+ where mapAccum f e = foldr (\x (e0,xs) -> let (e1,x') = f e0 x in (e1, x:xs)) (e, [])++desugarExpr :: Options -> NontermIdent -> ConstructorIdent ->+ [(Identifier, Identifier)] -> [(Identifier, Identifier)] ->+ Seq Error -> Expression -> (Seq Error, Expression)+desugarExpr options nt con childInhs childSyns errs expr+ = (errs Seq.>< errors_Syn_Expression syn, output_Syn_Expression syn)+ where+ inh = Inh_Expression { childInhs_Inh_Expression = childInhs+ , childSyns_Inh_Expression = childSyns+ , con_Inh_Expression = con+ , nt_Inh_Expression = nt+ , options_Inh_Expression = options+ , ruleDescr_Inh_Expression = "augment-rule"+ }+ sem = sem_Expression expr+ syn = wrap_Expression sem inh+{-# LINE 105 "../src-derived/Desugar.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ output : SELF + alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child inh : {Attributes}+ child syn : {Attributes}+ child virtual : {Maybe (Maybe Type)}+ visit 0:+ local output : _+-}+-- cata+sem_Child :: Child ->+ T_Child +sem_Child !(Child _name _tp _inh _syn _virtual ) =+ (sem_Child_Child _name _tp _inh _syn _virtual )+-- semantic domain+newtype T_Child = T_Child (( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Child ))+data Inh_Child = Inh_Child {}+data Syn_Child = Syn_Child {childInhs_Syn_Child :: !(([(Identifier, Identifier)])),childSyns_Syn_Child :: !(([(Identifier, Identifier)])),output_Syn_Child :: !(Child )}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child +wrap_Child !(T_Child sem ) !(Inh_Child ) =+ (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) = sem + in (Syn_Child _lhsOchildInhs _lhsOchildSyns _lhsOoutput ))+sem_Child_Child :: Identifier ->+ Type ->+ Attributes ->+ Attributes ->+ (Maybe (Maybe Type)) ->+ T_Child +sem_Child_Child !name_ !tp_ !inh_ !syn_ !virtual_ =+ (T_Child (case (({-# LINE 129 "Desugar.ag" #-}+ [(i, name_) | i <- Map.keys inh_ ]+ {-# LINE 147 "Desugar.hs" #-})) of+ { !_lhsOchildInhs ->+ (case (({-# LINE 130 "Desugar.ag" #-}+ [(s, name_) | s <- Map.keys syn_ ]+ {-# LINE 151 "Desugar.hs" #-})) of+ { !_lhsOchildSyns ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Child name_ tp_ inh_ syn_ virtual_+ {-# LINE 155 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 159 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) )+-- Children ----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ output : SELF + alternatives:+ alternative Cons:+ child hd : Child + child tl : Children + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+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 (( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Children ))+data Inh_Children = Inh_Children {}+data Syn_Children = Syn_Children {childInhs_Syn_Children :: !(([(Identifier, Identifier)])),childSyns_Syn_Children :: !(([(Identifier, Identifier)])),output_Syn_Children :: !(Children )}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children +wrap_Children !(T_Children sem ) !(Inh_Children ) =+ (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) = sem + in (Syn_Children _lhsOchildInhs _lhsOchildSyns _lhsOoutput ))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children +sem_Children_Cons !(T_Child hd_ ) !(T_Children tl_ ) =+ (T_Children (case (tl_ ) of+ { ( !_tlIchildInhs,!_tlIchildSyns,!_tlIoutput) ->+ (case (hd_ ) of+ { ( !_hdIchildInhs,!_hdIchildSyns,!_hdIoutput) ->+ (case (({-# LINE 124 "Desugar.ag" #-}+ _hdIchildInhs ++ _tlIchildInhs+ {-# LINE 204 "Desugar.hs" #-})) of+ { !_lhsOchildInhs ->+ (case (({-# LINE 124 "Desugar.ag" #-}+ _hdIchildSyns ++ _tlIchildSyns+ {-# LINE 208 "Desugar.hs" #-})) of+ { !_lhsOchildSyns ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 212 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 216 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) }) }) )+sem_Children_Nil :: T_Children +sem_Children_Nil =+ (T_Children (case (({-# LINE 124 "Desugar.ag" #-}+ []+ {-# LINE 223 "Desugar.hs" #-})) of+ { !_lhsOchildInhs ->+ (case (({-# LINE 124 "Desugar.ag" #-}+ []+ {-# LINE 227 "Desugar.hs" #-})) of+ { !_lhsOchildSyns ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 231 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 235 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) )+-- Expression --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ nt : NontermIdent+ options : Options+ ruleDescr : String+ synthesized attributes:+ errors : Seq Error+ output : SELF + alternatives:+ alternative Expression:+ child pos : {Pos}+ child tks : {[HsToken]}+ visit 0:+ local _tup1 : _+ local tks' : _+-}+-- cata+sem_Expression :: Expression ->+ T_Expression +sem_Expression !(Expression _pos _tks ) =+ (sem_Expression_Expression _pos _tks )+-- semantic domain+newtype T_Expression = T_Expression (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ NontermIdent ->+ Options ->+ String ->+ ( (Seq Error),Expression ))+data Inh_Expression = Inh_Expression {childInhs_Inh_Expression :: !(([(Identifier, Identifier)])),childSyns_Inh_Expression :: !(([(Identifier, Identifier)])),con_Inh_Expression :: !(ConstructorIdent),nt_Inh_Expression :: !(NontermIdent),options_Inh_Expression :: !(Options),ruleDescr_Inh_Expression :: !(String)}+data Syn_Expression = Syn_Expression {errors_Syn_Expression :: !((Seq Error)),output_Syn_Expression :: !(Expression )}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression +wrap_Expression !(T_Expression sem ) !(Inh_Expression _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIoptions _lhsIruleDescr ) =+ (let ( !_lhsOerrors,!_lhsOoutput) = sem _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIoptions _lhsIruleDescr + in (Syn_Expression _lhsOerrors _lhsOoutput ))+sem_Expression_Expression :: Pos ->+ ([HsToken]) ->+ T_Expression +sem_Expression_Expression !pos_ !tks_ =+ (T_Expression (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIoptions)+ (!_lhsIruleDescr) ->+ (case (({-# LINE 48 "Desugar.ag" #-}+ let inh = Inh_HsTokensRoot { childInhs_Inh_HsTokensRoot = _lhsIchildInhs+ , childSyns_Inh_HsTokensRoot = _lhsIchildSyns+ , nt_Inh_HsTokensRoot = _lhsInt+ , con_Inh_HsTokensRoot = _lhsIcon+ , ruleDescr_Inh_HsTokensRoot = _lhsIruleDescr+ , useFieldIdent_Inh_HsTokensRoot = genUseTraces _lhsIoptions+ }+ sem = sem_HsTokensRoot (HsTokensRoot tks_)+ syn = wrap_HsTokensRoot sem inh+ in (tks_Syn_HsTokensRoot syn, errors_Syn_HsTokensRoot syn)+ {-# LINE 301 "Desugar.hs" #-})) of+ { !__tup1 ->+ (case (({-# LINE 48 "Desugar.ag" #-}+ __tup1+ {-# LINE 305 "Desugar.hs" #-})) of+ { !(_,!_lhsOerrors) ->+ (case (({-# LINE 48 "Desugar.ag" #-}+ __tup1+ {-# LINE 309 "Desugar.hs" #-})) of+ { !(!_tks',_) ->+ (case (({-# LINE 58 "Desugar.ag" #-}+ Expression pos_ _tks'+ {-# LINE 313 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOerrors,_lhsOoutput) }) }) }) })) )+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ forcedIrrefutables : AttrMap+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ errors : Seq Error+ output : SELF + alternatives:+ alternative Grammar:+ child typeSyns : {TypeSyns}+ child useMap : {UseMap}+ child derivings : {Derivings}+ child wrappers : {Set NontermIdent}+ child nonts : Nonterminals + child pragmas : {PragmaMap}+ child manualAttrOrderMap : {AttrOrderMap}+ child paramMap : {ParamMap}+ child contextMap : {ContextMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}+-}+-- cata+sem_Grammar :: Grammar ->+ T_Grammar +sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )+-- semantic domain+newtype T_Grammar = T_Grammar (AttrMap ->+ Options ->+ ( AttrMap,(Seq Error),Grammar ))+data Inh_Grammar = Inh_Grammar {forcedIrrefutables_Inh_Grammar :: !(AttrMap),options_Inh_Grammar :: !(Options)}+data Syn_Grammar = Syn_Grammar {allAttributes_Syn_Grammar :: !(AttrMap),errors_Syn_Grammar :: !((Seq Error)),output_Syn_Grammar :: !(Grammar )}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar +wrap_Grammar !(T_Grammar sem ) !(Inh_Grammar _lhsIforcedIrrefutables _lhsIoptions ) =+ (let ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) = sem _lhsIforcedIrrefutables _lhsIoptions + in (Syn_Grammar _lhsOallAttributes _lhsOerrors _lhsOoutput ))+sem_Grammar_Grammar :: TypeSyns ->+ UseMap ->+ Derivings ->+ (Set NontermIdent) ->+ T_Nonterminals ->+ PragmaMap ->+ AttrOrderMap ->+ ParamMap ->+ ContextMap ->+ UniqueMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ T_Grammar +sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ =+ (T_Grammar (\ (!_lhsIforcedIrrefutables)+ (!_lhsIoptions) ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 378 "Desugar.hs" #-})) of+ { !_nontsOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 382 "Desugar.hs" #-})) of+ { !_nontsOforcedIrrefutables ->+ (case (({-# LINE 234 "Desugar.ag" #-}+ augmentsMap_+ {-# LINE 386 "Desugar.hs" #-})) of+ { !_nontsOaugmentsIn ->+ (case (nonts_ _nontsOaugmentsIn _nontsOforcedIrrefutables _nontsOoptions ) of+ { ( !_nontsIallAttributes,!_nontsIaugmentsOut,!_nontsIerrors,!_nontsIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _nontsIallAttributes+ {-# LINE 392 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _nontsIerrors+ {-# LINE 396 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 290 "Desugar.ag" #-}+ Grammar typeSyns_+ useMap_+ derivings_+ wrappers_+ _nontsIoutput+ pragmas_+ manualAttrOrderMap_+ paramMap_+ contextMap_+ uniqueMap_+ _nontsIaugmentsOut+ aroundsMap_+ mergeMap_+ {-# LINE 412 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) })) )+-- HsToken -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ nt : NontermIdent+ ruleDescr : String+ useFieldIdent : Bool+ chained attribute:+ addLines : Int+ synthesized attributes:+ errors : Seq Error+ tks : SELF + alternatives:+ alternative AGField:+ child field : {Identifier}+ child attr : {Identifier}+ child pos : {Pos}+ child rdesc : {Maybe String}+ visit 0:+ local mField : _+ local field' : _+ local tks : _+ alternative AGLocal:+ child var : {Identifier}+ child pos : {Pos}+ child rdesc : {Maybe String}+ visit 0:+ local tks : _+ alternative CharToken:+ child value : {String}+ child pos : {Pos}+ visit 0:+ local tks : _+ alternative Err:+ child mesg : {String}+ child pos : {Pos}+ visit 0:+ local tks : _+ alternative HsToken:+ child value : {String}+ child pos : {Pos}+ visit 0:+ local tks : _+ alternative StrToken:+ child value : {String}+ child pos : {Pos}+ visit 0:+ local tks : _+-}+-- cata+sem_HsToken :: HsToken ->+ T_HsToken +sem_HsToken !(AGField _field _attr _pos _rdesc ) =+ (sem_HsToken_AGField _field _attr _pos _rdesc )+sem_HsToken !(AGLocal _var _pos _rdesc ) =+ (sem_HsToken_AGLocal _var _pos _rdesc )+sem_HsToken !(CharToken _value _pos ) =+ (sem_HsToken_CharToken _value _pos )+sem_HsToken !(Err _mesg _pos ) =+ (sem_HsToken_Err _mesg _pos )+sem_HsToken !(HsToken _value _pos ) =+ (sem_HsToken_HsToken _value _pos )+sem_HsToken !(StrToken _value _pos ) =+ (sem_HsToken_StrToken _value _pos )+-- semantic domain+newtype T_HsToken = T_HsToken (Int ->+ ([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ NontermIdent ->+ String ->+ Bool ->+ ( Int,(Seq Error),HsToken ))+data Inh_HsToken = Inh_HsToken {addLines_Inh_HsToken :: !(Int),childInhs_Inh_HsToken :: !(([(Identifier, Identifier)])),childSyns_Inh_HsToken :: !(([(Identifier, Identifier)])),con_Inh_HsToken :: !(ConstructorIdent),nt_Inh_HsToken :: !(NontermIdent),ruleDescr_Inh_HsToken :: !(String),useFieldIdent_Inh_HsToken :: !(Bool)}+data Syn_HsToken = Syn_HsToken {addLines_Syn_HsToken :: !(Int),errors_Syn_HsToken :: !((Seq Error)),tks_Syn_HsToken :: !(HsToken )}+wrap_HsToken :: T_HsToken ->+ Inh_HsToken ->+ Syn_HsToken +wrap_HsToken !(T_HsToken sem ) !(Inh_HsToken _lhsIaddLines _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent ) =+ (let ( !_lhsOaddLines,!_lhsOerrors,!_lhsOtks) = sem _lhsIaddLines _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent + in (Syn_HsToken _lhsOaddLines _lhsOerrors _lhsOtks ))+sem_HsToken_AGField :: Identifier ->+ Identifier ->+ Pos ->+ (Maybe String) ->+ T_HsToken +sem_HsToken_AGField !field_ !attr_ !pos_ !rdesc_ =+ (T_HsToken (\ (!_lhsIaddLines)+ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 78 "Desugar.ag" #-}+ findField field_ attr_ _lhsIchildSyns+ {-# LINE 514 "Desugar.hs" #-})) of+ { !_mField ->+ (case (({-# LINE 80 "Desugar.ag" #-}+ maybe field_ id _mField+ {-# LINE 518 "Desugar.hs" #-})) of+ { !_field' ->+ (case (({-# LINE 83 "Desugar.ag" #-}+ if _lhsIuseFieldIdent || length (getName field_) < length (getName _field' )+ then _lhsIaddLines + 1+ else _lhsIaddLines+ {-# LINE 524 "Desugar.hs" #-})) of+ { !_lhsOaddLines ->+ (case (({-# LINE 81 "Desugar.ag" #-}+ maybe (Seq.singleton (UndefAttr _lhsInt _lhsIcon field_ (Ident "<ANY>" (getPos field_)) False)) (const Seq.empty) _mField+ {-# LINE 528 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 87 "Desugar.ag" #-}+ AGField _field' attr_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)+ {-# LINE 532 "Desugar.hs" #-})) of+ { !_tks ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ _tks+ {-# LINE 536 "Desugar.hs" #-})) of+ { !_lhsOtks ->+ ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) }) }) })) )+sem_HsToken_AGLocal :: Identifier ->+ Pos ->+ (Maybe String) ->+ T_HsToken +sem_HsToken_AGLocal !var_ !pos_ !rdesc_ =+ (T_HsToken (\ (!_lhsIaddLines)+ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 73 "Desugar.ag" #-}+ if _lhsIuseFieldIdent+ then _lhsIaddLines + 1+ else _lhsIaddLines+ {-# LINE 555 "Desugar.hs" #-})) of+ { !_lhsOaddLines ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 559 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 76 "Desugar.ag" #-}+ AGLocal var_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)+ {-# LINE 563 "Desugar.hs" #-})) of+ { !_tks ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ _tks+ {-# LINE 567 "Desugar.hs" #-})) of+ { !_lhsOtks ->+ ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )+sem_HsToken_CharToken :: String ->+ Pos ->+ T_HsToken +sem_HsToken_CharToken !value_ !pos_ =+ (T_HsToken (\ (!_lhsIaddLines)+ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 63 "Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 583 "Desugar.hs" #-})) of+ { !_lhsOaddLines ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 587 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 91 "Desugar.ag" #-}+ CharToken value_ (addl _lhsIaddLines pos_)+ {-# LINE 591 "Desugar.hs" #-})) of+ { !_tks ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ _tks+ {-# LINE 595 "Desugar.hs" #-})) of+ { !_lhsOtks ->+ ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )+sem_HsToken_Err :: String ->+ Pos ->+ T_HsToken +sem_HsToken_Err !mesg_ !pos_ =+ (T_HsToken (\ (!_lhsIaddLines)+ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 63 "Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 611 "Desugar.hs" #-})) of+ { !_lhsOaddLines ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 615 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 95 "Desugar.ag" #-}+ Err mesg_ (addl _lhsIaddLines pos_)+ {-# LINE 619 "Desugar.hs" #-})) of+ { !_tks ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ _tks+ {-# LINE 623 "Desugar.hs" #-})) of+ { !_lhsOtks ->+ ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )+sem_HsToken_HsToken :: String ->+ Pos ->+ T_HsToken +sem_HsToken_HsToken !value_ !pos_ =+ (T_HsToken (\ (!_lhsIaddLines)+ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 63 "Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 639 "Desugar.hs" #-})) of+ { !_lhsOaddLines ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 643 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 89 "Desugar.ag" #-}+ HsToken value_ (addl _lhsIaddLines pos_)+ {-# LINE 647 "Desugar.hs" #-})) of+ { !_tks ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ _tks+ {-# LINE 651 "Desugar.hs" #-})) of+ { !_lhsOtks ->+ ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )+sem_HsToken_StrToken :: String ->+ Pos ->+ T_HsToken +sem_HsToken_StrToken !value_ !pos_ =+ (T_HsToken (\ (!_lhsIaddLines)+ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 63 "Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 667 "Desugar.hs" #-})) of+ { !_lhsOaddLines ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 671 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 93 "Desugar.ag" #-}+ StrToken value_ (addl _lhsIaddLines pos_)+ {-# LINE 675 "Desugar.hs" #-})) of+ { !_tks ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ _tks+ {-# LINE 679 "Desugar.hs" #-})) of+ { !_lhsOtks ->+ ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )+-- HsTokens ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ nt : NontermIdent+ ruleDescr : String+ useFieldIdent : Bool+ chained attribute:+ addLines : Int+ synthesized attributes:+ errors : Seq Error+ tks : SELF + alternatives:+ alternative Cons:+ child hd : HsToken + child tl : HsTokens + visit 0:+ local tks : _+ alternative Nil:+ visit 0:+ local tks : _+-}+-- cata+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 (Int ->+ ([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ NontermIdent ->+ String ->+ Bool ->+ ( Int,(Seq Error),HsTokens ))+data Inh_HsTokens = Inh_HsTokens {addLines_Inh_HsTokens :: !(Int),childInhs_Inh_HsTokens :: !(([(Identifier, Identifier)])),childSyns_Inh_HsTokens :: !(([(Identifier, Identifier)])),con_Inh_HsTokens :: !(ConstructorIdent),nt_Inh_HsTokens :: !(NontermIdent),ruleDescr_Inh_HsTokens :: !(String),useFieldIdent_Inh_HsTokens :: !(Bool)}+data Syn_HsTokens = Syn_HsTokens {addLines_Syn_HsTokens :: !(Int),errors_Syn_HsTokens :: !((Seq Error)),tks_Syn_HsTokens :: !(HsTokens )}+wrap_HsTokens :: T_HsTokens ->+ Inh_HsTokens ->+ Syn_HsTokens +wrap_HsTokens !(T_HsTokens sem ) !(Inh_HsTokens _lhsIaddLines _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent ) =+ (let ( !_lhsOaddLines,!_lhsOerrors,!_lhsOtks) = sem _lhsIaddLines _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent + in (Syn_HsTokens _lhsOaddLines _lhsOerrors _lhsOtks ))+sem_HsTokens_Cons :: T_HsToken ->+ T_HsTokens ->+ T_HsTokens +sem_HsTokens_Cons !(T_HsToken hd_ ) !(T_HsTokens tl_ ) =+ (T_HsTokens (\ (!_lhsIaddLines)+ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 61 "Desugar.ag" #-}+ _lhsIuseFieldIdent+ {-# LINE 742 "Desugar.hs" #-})) of+ { !_tlOuseFieldIdent ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 746 "Desugar.hs" #-})) of+ { !_tlOchildSyns ->+ (case (({-# LINE 61 "Desugar.ag" #-}+ _lhsIuseFieldIdent+ {-# LINE 750 "Desugar.hs" #-})) of+ { !_hdOuseFieldIdent ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 754 "Desugar.hs" #-})) of+ { !_hdOchildSyns ->+ (case (({-# LINE 63 "Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 758 "Desugar.hs" #-})) of+ { !_hdOaddLines ->+ (case (({-# LINE 167 "Desugar.ag" #-}+ _lhsIruleDescr+ {-# LINE 762 "Desugar.hs" #-})) of+ { !_hdOruleDescr ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 766 "Desugar.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 770 "Desugar.hs" #-})) of+ { !_hdOcon ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 774 "Desugar.hs" #-})) of+ { !_hdOchildInhs ->+ (case (hd_ _hdOaddLines _hdOchildInhs _hdOchildSyns _hdOcon _hdOnt _hdOruleDescr _hdOuseFieldIdent ) of+ { ( !_hdIaddLines,!_hdIerrors,!_hdItks) ->+ (case (({-# LINE 63 "Desugar.ag" #-}+ _hdIaddLines+ {-# LINE 780 "Desugar.hs" #-})) of+ { !_tlOaddLines ->+ (case (({-# LINE 167 "Desugar.ag" #-}+ _lhsIruleDescr+ {-# LINE 784 "Desugar.hs" #-})) of+ { !_tlOruleDescr ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 788 "Desugar.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 792 "Desugar.hs" #-})) of+ { !_tlOcon ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 796 "Desugar.hs" #-})) of+ { !_tlOchildInhs ->+ (case (tl_ _tlOaddLines _tlOchildInhs _tlOchildSyns _tlOcon _tlOnt _tlOruleDescr _tlOuseFieldIdent ) of+ { ( !_tlIaddLines,!_tlIerrors,!_tlItks) ->+ (case (({-# LINE 63 "Desugar.ag" #-}+ _tlIaddLines+ {-# LINE 802 "Desugar.hs" #-})) of+ { !_lhsOaddLines ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 806 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ (:) _hdItks _tlItks+ {-# LINE 810 "Desugar.hs" #-})) of+ { !_tks ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ _tks+ {-# LINE 814 "Desugar.hs" #-})) of+ { !_lhsOtks ->+ ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_HsTokens_Nil :: T_HsTokens +sem_HsTokens_Nil =+ (T_HsTokens (\ (!_lhsIaddLines)+ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 63 "Desugar.ag" #-}+ _lhsIaddLines+ {-# LINE 828 "Desugar.hs" #-})) of+ { !_lhsOaddLines ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 832 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ []+ {-# LINE 836 "Desugar.hs" #-})) of+ { !_tks ->+ (case (({-# LINE 69 "Desugar.ag" #-}+ _tks+ {-# LINE 840 "Desugar.hs" #-})) of+ { !_lhsOtks ->+ ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) })) )+-- HsTokensRoot ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ nt : NontermIdent+ ruleDescr : String+ useFieldIdent : Bool+ synthesized attributes:+ errors : Seq Error+ tks : [HsToken]+ alternatives:+ alternative HsTokensRoot:+ child tokens : HsTokens +-}+-- cata+sem_HsTokensRoot :: HsTokensRoot ->+ T_HsTokensRoot +sem_HsTokensRoot !(HsTokensRoot _tokens ) =+ (sem_HsTokensRoot_HsTokensRoot (sem_HsTokens _tokens ) )+-- semantic domain+newtype T_HsTokensRoot = T_HsTokensRoot (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ NontermIdent ->+ String ->+ Bool ->+ ( (Seq Error),([HsToken])))+data Inh_HsTokensRoot = Inh_HsTokensRoot {childInhs_Inh_HsTokensRoot :: !(([(Identifier, Identifier)])),childSyns_Inh_HsTokensRoot :: !(([(Identifier, Identifier)])),con_Inh_HsTokensRoot :: !(ConstructorIdent),nt_Inh_HsTokensRoot :: !(NontermIdent),ruleDescr_Inh_HsTokensRoot :: !(String),useFieldIdent_Inh_HsTokensRoot :: !(Bool)}+data Syn_HsTokensRoot = Syn_HsTokensRoot {errors_Syn_HsTokensRoot :: !((Seq Error)),tks_Syn_HsTokensRoot :: !(([HsToken]))}+wrap_HsTokensRoot :: T_HsTokensRoot ->+ Inh_HsTokensRoot ->+ Syn_HsTokensRoot +wrap_HsTokensRoot !(T_HsTokensRoot sem ) !(Inh_HsTokensRoot _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent ) =+ (let ( !_lhsOerrors,!_lhsOtks) = sem _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIruleDescr _lhsIuseFieldIdent + in (Syn_HsTokensRoot _lhsOerrors _lhsOtks ))+sem_HsTokensRoot_HsTokensRoot :: T_HsTokens ->+ T_HsTokensRoot +sem_HsTokensRoot_HsTokensRoot !(T_HsTokens tokens_ ) =+ (T_HsTokensRoot (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIruleDescr)+ (!_lhsIuseFieldIdent) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 892 "Desugar.hs" #-})) of+ { !_tokensOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 896 "Desugar.hs" #-})) of+ { !_tokensOcon ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 900 "Desugar.hs" #-})) of+ { !_tokensOchildSyns ->+ (case (({-# LINE 61 "Desugar.ag" #-}+ _lhsIuseFieldIdent+ {-# LINE 904 "Desugar.hs" #-})) of+ { !_tokensOuseFieldIdent ->+ (case (({-# LINE 167 "Desugar.ag" #-}+ _lhsIruleDescr+ {-# LINE 908 "Desugar.hs" #-})) of+ { !_tokensOruleDescr ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 912 "Desugar.hs" #-})) of+ { !_tokensOchildInhs ->+ (case (({-# LINE 66 "Desugar.ag" #-}+ 0+ {-# LINE 916 "Desugar.hs" #-})) of+ { !_tokensOaddLines ->+ (case (tokens_ _tokensOaddLines _tokensOchildInhs _tokensOchildSyns _tokensOcon _tokensOnt _tokensOruleDescr _tokensOuseFieldIdent ) of+ { ( !_tokensIaddLines,!_tokensIerrors,!_tokensItks) ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _tokensIerrors+ {-# LINE 922 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 68 "Desugar.ag" #-}+ _tokensItks+ {-# LINE 926 "Desugar.hs" #-})) of+ { !_lhsOtks ->+ ( _lhsOerrors,_lhsOtks) }) }) }) }) }) }) }) }) }) })) )+-- Nonterminal -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ forcedIrrefutables : AttrMap+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ augmentsOut : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ errors : Seq Error+ output : SELF + alternatives:+ alternative Nonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : Productions + visit 0:+ local augmentsIn : _+ local augmentsOut : _+ local output : _+-}+-- cata+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 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ AttrMap ->+ Options ->+ ( AttrMap,(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),(Seq Error),Nonterminal ))+data Inh_Nonterminal = Inh_Nonterminal {augmentsIn_Inh_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),forcedIrrefutables_Inh_Nonterminal :: !(AttrMap),options_Inh_Nonterminal :: !(Options)}+data Syn_Nonterminal = Syn_Nonterminal {allAttributes_Syn_Nonterminal :: !(AttrMap),augmentsOut_Syn_Nonterminal :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),errors_Syn_Nonterminal :: !((Seq Error)),output_Syn_Nonterminal :: !(Nonterminal )}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal +wrap_Nonterminal !(T_Nonterminal sem ) !(Inh_Nonterminal _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIoptions ) =+ (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIoptions + in (Syn_Nonterminal _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))+sem_Nonterminal_Nonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_Productions ->+ T_Nonterminal +sem_Nonterminal_Nonterminal !nt_ !params_ !inh_ !syn_ !(T_Productions prods_ ) =+ (T_Nonterminal (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsIoptions) ->+ (case (({-# LINE 156 "Desugar.ag" #-}+ nt_+ {-# LINE 983 "Desugar.hs" #-})) of+ { !_prodsOnt ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 987 "Desugar.hs" #-})) of+ { !_prodsOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 991 "Desugar.hs" #-})) of+ { !_prodsOforcedIrrefutables ->+ (case (({-# LINE 238 "Desugar.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn+ {-# LINE 995 "Desugar.hs" #-})) of+ { !_augmentsIn ->+ (case (({-# LINE 229 "Desugar.ag" #-}+ _augmentsIn+ {-# LINE 999 "Desugar.hs" #-})) of+ { !_prodsOaugmentsIn ->+ (case (prods_ _prodsOaugmentsIn _prodsOforcedIrrefutables _prodsOnt _prodsOoptions ) of+ { ( !_prodsIallAttributes,!_prodsIaugmentsOut,!_prodsIerrors,!_prodsIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _prodsIallAttributes+ {-# LINE 1005 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 239 "Desugar.ag" #-}+ Map.singleton nt_ _prodsIaugmentsOut+ {-# LINE 1009 "Desugar.hs" #-})) of+ { !_augmentsOut ->+ (case (({-# LINE 228 "Desugar.ag" #-}+ _augmentsOut+ {-# LINE 1013 "Desugar.hs" #-})) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _prodsIerrors+ {-# LINE 1017 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Nonterminal nt_ params_ inh_ syn_ _prodsIoutput+ {-# LINE 1021 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1025 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Nonterminals ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ augmentsIn : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ forcedIrrefutables : AttrMap+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ augmentsOut : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ errors : Seq Error+ output : SELF + alternatives:+ alternative Cons:+ child hd : Nonterminal + child tl : Nonterminals + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+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 ((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ AttrMap ->+ Options ->+ ( AttrMap,(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),(Seq Error),Nonterminals ))+data Inh_Nonterminals = Inh_Nonterminals {augmentsIn_Inh_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),forcedIrrefutables_Inh_Nonterminals :: !(AttrMap),options_Inh_Nonterminals :: !(Options)}+data Syn_Nonterminals = Syn_Nonterminals {allAttributes_Syn_Nonterminals :: !(AttrMap),augmentsOut_Syn_Nonterminals :: !((Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))),errors_Syn_Nonterminals :: !((Seq Error)),output_Syn_Nonterminals :: !(Nonterminals )}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals +wrap_Nonterminals !(T_Nonterminals sem ) !(Inh_Nonterminals _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIoptions ) =+ (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsIoptions + in (Syn_Nonterminals _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals +sem_Nonterminals_Cons !(T_Nonterminal hd_ ) !(T_Nonterminals tl_ ) =+ (T_Nonterminals (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsIoptions) ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 1077 "Desugar.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1081 "Desugar.hs" #-})) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 227 "Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 1085 "Desugar.hs" #-})) of+ { !_tlOaugmentsIn ->+ (case (tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOoptions ) of+ { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 1091 "Desugar.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1095 "Desugar.hs" #-})) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 227 "Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 1099 "Desugar.hs" #-})) of+ { !_hdOaugmentsIn ->+ (case (hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOoptions ) of+ { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _hdIallAttributes `mergeAttributes` _tlIallAttributes+ {-# LINE 1105 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 228 "Desugar.ag" #-}+ _hdIaugmentsOut `Map.union` _tlIaugmentsOut+ {-# LINE 1109 "Desugar.hs" #-})) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1113 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1117 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1121 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Nonterminals_Nil :: T_Nonterminals +sem_Nonterminals_Nil =+ (T_Nonterminals (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsIoptions) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ Map.empty+ {-# LINE 1131 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 228 "Desugar.ag" #-}+ Map.empty+ {-# LINE 1135 "Desugar.hs" #-})) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 1139 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 1143 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1147 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) })) )+-- Pattern -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ defsCollect : Set (Identifier, Identifier)+ visit 1:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ defs : Set (Identifier, Identifier)+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ synthesized attributes:+ allAttributes : AttrMap+ copy : SELF + errors : Seq Error+ output : SELF + alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + child parts : Patterns + visit 0:+ local def : _+ visit 1:+ local copy : _+ local _tup2 : _+ local field' : _+ local err2 : _+ local err1 : _+ local output : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 1:+ local copy : _+ local output : _+ alternative Irrefutable:+ child pat : Pattern + visit 1:+ local copy : _+ local output : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 1:+ local copy : _+ local output : _+ alternative Underscore:+ child pos : {Pos}+ visit 1:+ local copy : _+ local output : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern +sem_Pattern !(Alias _field _attr _pat _parts ) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )+sem_Pattern !(Constr _name _pats ) =+ (sem_Pattern_Constr _name (sem_Patterns _pats ) )+sem_Pattern !(Irrefutable _pat ) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat ) )+sem_Pattern !(Product _pos _pats ) =+ (sem_Pattern_Product _pos (sem_Patterns _pats ) )+sem_Pattern !(Underscore _pos ) =+ (sem_Pattern_Underscore _pos )+-- semantic domain+newtype T_Pattern = T_Pattern (( (Set (Identifier, Identifier)),T_Pattern_1 ))+newtype T_Pattern_1 = T_Pattern_1 (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ (Set (Identifier, Identifier)) ->+ AttrMap ->+ NontermIdent ->+ ( AttrMap,Pattern ,(Seq Error),Pattern ))+data Inh_Pattern = Inh_Pattern {childInhs_Inh_Pattern :: !(([(Identifier, Identifier)])),childSyns_Inh_Pattern :: !(([(Identifier, Identifier)])),con_Inh_Pattern :: !(ConstructorIdent),defs_Inh_Pattern :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Pattern :: !(AttrMap),nt_Inh_Pattern :: !(NontermIdent)}+data Syn_Pattern = Syn_Pattern {allAttributes_Syn_Pattern :: !(AttrMap),copy_Syn_Pattern :: !(Pattern ),defsCollect_Syn_Pattern :: !((Set (Identifier, Identifier))),errors_Syn_Pattern :: !((Seq Error)),output_Syn_Pattern :: !(Pattern )}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern +wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt ) =+ (let ( !_lhsOdefsCollect,!T_Pattern_1 sem_1) = sem + ( !_lhsOallAttributes,!_lhsOcopy,!_lhsOerrors,!_lhsOoutput) = sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt + in (Syn_Pattern _lhsOallAttributes _lhsOcopy _lhsOdefsCollect _lhsOerrors _lhsOoutput ))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) !(T_Patterns parts_ ) =+ (T_Pattern (case (({-# LINE 181 "Desugar.ag" #-}+ Set.singleton (field_, attr_)+ {-# LINE 1245 "Desugar.hs" #-})) of+ { !_def ->+ (case (parts_ ) of+ { ( !_partsIdefsCollect,!T_Patterns_1 parts_1) ->+ (case (pat_ ) of+ { ( !_patIdefsCollect,!T_Pattern_1 pat_1) ->+ (case (({-# LINE 182 "Desugar.ag" #-}+ _def `Set.union` _patIdefsCollect `Set.union` _partsIdefsCollect+ {-# LINE 1253 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Pattern_Alias_1 :: T_Pattern_1 + sem_Pattern_Alias_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1265 "Desugar.hs" #-})) of+ { !_patOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1269 "Desugar.hs" #-})) of+ { !_patOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1273 "Desugar.hs" #-})) of+ { !_patOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1277 "Desugar.hs" #-})) of+ { !_patOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1281 "Desugar.hs" #-})) of+ { !_patOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1285 "Desugar.hs" #-})) of+ { !_patOchildInhs ->+ (case (pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt ) of+ { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->+ (case (({-# LINE 199 "Desugar.ag" #-}+ (Map.singleton _lhsInt $ Map.singleton _lhsIcon $ Set.singleton (field_, attr_)) `mergeAttributes` _patIallAttributes+ {-# LINE 1291 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1295 "Desugar.hs" #-})) of+ { !_partsOnt ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1299 "Desugar.hs" #-})) of+ { !_partsOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1303 "Desugar.hs" #-})) of+ { !_partsOdefs ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1307 "Desugar.hs" #-})) of+ { !_partsOcon ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1311 "Desugar.hs" #-})) of+ { !_partsOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1315 "Desugar.hs" #-})) of+ { !_partsOchildInhs ->+ (case (parts_1 _partsOchildInhs _partsOchildSyns _partsOcon _partsOdefs _partsOforcedIrrefutables _partsOnt ) of+ { ( !_partsIallAttributes,!_partsIcopy,!_partsIerrors,!_partsIoutput) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Alias field_ attr_ _patIcopy _partsIcopy+ {-# LINE 1321 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1325 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 109 "Desugar.ag" #-}+ maybeError field_ (UndefAttr _lhsInt _lhsIcon (Ident "<ANY>" (getPos field_)) attr_ True) $+ findField field_ attr_ _lhsIchildInhs+ {-# LINE 1330 "Desugar.hs" #-})) of+ { !__tup2 ->+ (case (({-# LINE 109 "Desugar.ag" #-}+ __tup2+ {-# LINE 1334 "Desugar.hs" #-})) of+ { !(!_field',_) ->+ (case (({-# LINE 111 "Desugar.ag" #-}+ if _field' == field_+ then Seq.empty+ else if (_field' , attr_) `Set.member` _lhsIdefs+ then Seq.singleton $ DupRule _lhsInt _lhsIcon field_ attr_ _field'+ else Seq.empty+ {-# LINE 1342 "Desugar.hs" #-})) of+ { !_err2 ->+ (case (({-# LINE 109 "Desugar.ag" #-}+ __tup2+ {-# LINE 1346 "Desugar.hs" #-})) of+ { !(_,!_err1) ->+ (case (({-# LINE 116 "Desugar.ag" #-}+ _err1 Seq.>< _err2 Seq.>< _patIerrors Seq.>< _partsIerrors+ {-# LINE 1350 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 117 "Desugar.ag" #-}+ Alias _field' attr_ _patIoutput _partsIoutput+ {-# LINE 1354 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 218 "Desugar.ag" #-}+ if Set.member (field_, attr_) $ Map.findWithDefault Set.empty _lhsIcon $ Map.findWithDefault Map.empty _lhsInt $ _lhsIforcedIrrefutables+ then Irrefutable _output+ else _output+ {-# LINE 1360 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Pattern_Alias_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) }) }) )+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =+ (T_Pattern (case (pats_ ) of+ { ( !_patsIdefsCollect,!T_Patterns_1 pats_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _patsIdefsCollect+ {-# LINE 1374 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Pattern_Constr_1 :: T_Pattern_1 + sem_Pattern_Constr_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1386 "Desugar.hs" #-})) of+ { !_patsOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1390 "Desugar.hs" #-})) of+ { !_patsOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1394 "Desugar.hs" #-})) of+ { !_patsOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1398 "Desugar.hs" #-})) of+ { !_patsOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1402 "Desugar.hs" #-})) of+ { !_patsOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1406 "Desugar.hs" #-})) of+ { !_patsOchildInhs ->+ (case (pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt ) of+ { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _patsIallAttributes+ {-# LINE 1412 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 1416 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1420 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _patsIerrors+ {-# LINE 1424 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Constr name_ _patsIoutput+ {-# LINE 1428 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1432 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Pattern_Constr_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern +sem_Pattern_Irrefutable !(T_Pattern pat_ ) =+ (T_Pattern (case (pat_ ) of+ { ( !_patIdefsCollect,!T_Pattern_1 pat_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _patIdefsCollect+ {-# LINE 1445 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Pattern_Irrefutable_1 :: T_Pattern_1 + sem_Pattern_Irrefutable_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 201 "Desugar.ag" #-}+ Map.empty+ {-# LINE 1457 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1461 "Desugar.hs" #-})) of+ { !_patOnt ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1465 "Desugar.hs" #-})) of+ { !_patOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1469 "Desugar.hs" #-})) of+ { !_patOdefs ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1473 "Desugar.hs" #-})) of+ { !_patOcon ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1477 "Desugar.hs" #-})) of+ { !_patOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1481 "Desugar.hs" #-})) of+ { !_patOchildInhs ->+ (case (pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt ) of+ { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 1487 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1491 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _patIerrors+ {-# LINE 1495 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Irrefutable _patIoutput+ {-# LINE 1499 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1503 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Pattern_Irrefutable_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =+ (T_Pattern (case (pats_ ) of+ { ( !_patsIdefsCollect,!T_Patterns_1 pats_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _patsIdefsCollect+ {-# LINE 1517 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Pattern_Product_1 :: T_Pattern_1 + sem_Pattern_Product_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1529 "Desugar.hs" #-})) of+ { !_patsOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1533 "Desugar.hs" #-})) of+ { !_patsOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1537 "Desugar.hs" #-})) of+ { !_patsOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1541 "Desugar.hs" #-})) of+ { !_patsOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1545 "Desugar.hs" #-})) of+ { !_patsOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1549 "Desugar.hs" #-})) of+ { !_patsOchildInhs ->+ (case (pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt ) of+ { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _patsIallAttributes+ {-# LINE 1555 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 1559 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1563 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _patsIerrors+ {-# LINE 1567 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Product pos_ _patsIoutput+ {-# LINE 1571 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1575 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Pattern_Product_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )+sem_Pattern_Underscore :: Pos ->+ T_Pattern +sem_Pattern_Underscore !pos_ =+ (T_Pattern (case (({-# LINE 178 "Desugar.ag" #-}+ Set.empty+ {-# LINE 1586 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Pattern_Underscore_1 :: T_Pattern_1 + sem_Pattern_Underscore_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ Map.empty+ {-# LINE 1598 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Underscore pos_+ {-# LINE 1602 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1606 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 1610 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Underscore pos_+ {-# LINE 1614 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1618 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )+ in sem_Pattern_Underscore_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) )+-- Patterns ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ defsCollect : Set (Identifier, Identifier)+ visit 1:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ defs : Set (Identifier, Identifier)+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ synthesized attributes:+ allAttributes : AttrMap+ copy : SELF + errors : Seq Error+ output : SELF + alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 1:+ local copy : _+ local output : _+ alternative Nil:+ visit 1:+ local copy : _+ local output : _+-}+-- cata+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 (( (Set (Identifier, Identifier)),T_Patterns_1 ))+newtype T_Patterns_1 = T_Patterns_1 (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ (Set (Identifier, Identifier)) ->+ AttrMap ->+ NontermIdent ->+ ( AttrMap,Patterns ,(Seq Error),Patterns ))+data Inh_Patterns = Inh_Patterns {childInhs_Inh_Patterns :: !(([(Identifier, Identifier)])),childSyns_Inh_Patterns :: !(([(Identifier, Identifier)])),con_Inh_Patterns :: !(ConstructorIdent),defs_Inh_Patterns :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Patterns :: !(AttrMap),nt_Inh_Patterns :: !(NontermIdent)}+data Syn_Patterns = Syn_Patterns {allAttributes_Syn_Patterns :: !(AttrMap),copy_Syn_Patterns :: !(Patterns ),defsCollect_Syn_Patterns :: !((Set (Identifier, Identifier))),errors_Syn_Patterns :: !((Seq Error)),output_Syn_Patterns :: !(Patterns )}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns +wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt ) =+ (let ( !_lhsOdefsCollect,!T_Patterns_1 sem_1) = sem + ( !_lhsOallAttributes,!_lhsOcopy,!_lhsOerrors,!_lhsOoutput) = sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt + in (Syn_Patterns _lhsOallAttributes _lhsOcopy _lhsOdefsCollect _lhsOerrors _lhsOoutput ))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns +sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =+ (T_Patterns (case (tl_ ) of+ { ( !_tlIdefsCollect,!T_Patterns_1 tl_1) ->+ (case (hd_ ) of+ { ( !_hdIdefsCollect,!T_Pattern_1 hd_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _hdIdefsCollect `Set.union` _tlIdefsCollect+ {-# LINE 1687 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Patterns_Cons_1 :: T_Patterns_1 + sem_Patterns_Cons_1 =+ (T_Patterns_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1699 "Desugar.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1703 "Desugar.hs" #-})) of+ { !_tlOcon ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1707 "Desugar.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1711 "Desugar.hs" #-})) of+ { !_hdOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1715 "Desugar.hs" #-})) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1719 "Desugar.hs" #-})) of+ { !_tlOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1723 "Desugar.hs" #-})) of+ { !_tlOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1727 "Desugar.hs" #-})) of+ { !_tlOchildInhs ->+ (case (tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt ) of+ { ( !_tlIallAttributes,!_tlIcopy,!_tlIerrors,!_tlIoutput) ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1733 "Desugar.hs" #-})) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1737 "Desugar.hs" #-})) of+ { !_hdOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1741 "Desugar.hs" #-})) of+ { !_hdOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1745 "Desugar.hs" #-})) of+ { !_hdOchildInhs ->+ (case (hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt ) of+ { ( !_hdIallAttributes,!_hdIcopy,!_hdIerrors,!_hdIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _hdIallAttributes `mergeAttributes` _tlIallAttributes+ {-# LINE 1751 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 1755 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1759 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1763 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1767 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1771 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Patterns_Cons_1)) of+ { ( !sem_Patterns_1) ->+ ( _lhsOdefsCollect,sem_Patterns_1) }) }) }) }) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil =+ (T_Patterns (case (({-# LINE 178 "Desugar.ag" #-}+ Set.empty+ {-# LINE 1781 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Patterns_Nil_1 :: T_Patterns_1 + sem_Patterns_Nil_1 =+ (T_Patterns_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ Map.empty+ {-# LINE 1793 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ []+ {-# LINE 1797 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1801 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 1805 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 1809 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1813 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )+ in sem_Patterns_Nil_1)) of+ { ( !sem_Patterns_1) ->+ ( _lhsOdefsCollect,sem_Patterns_1) }) }) )+-- Production --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ augmentsIn : Map ConstructorIdent (Map Identifier [Expression])+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ augmentsOut : Map ConstructorIdent (Map Identifier [Expression])+ errors : Seq Error+ output : SELF + alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + visit 0:+ local augmentsIn : _+ local _tup3 : _+ local augmentsOut1 : _+ local augmentsOut : _+ local augmentErrs : _+ local output : _+-}+-- cata+sem_Production :: Production ->+ T_Production +sem_Production !(Production _con _children _rules _typeSigs ) =+ (sem_Production_Production _con (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) )+-- semantic domain+newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->+ AttrMap ->+ NontermIdent ->+ Options ->+ ( AttrMap,(Map ConstructorIdent (Map Identifier [Expression])),(Seq Error),Production ))+data Inh_Production = Inh_Production {augmentsIn_Inh_Production :: !((Map ConstructorIdent (Map Identifier [Expression]))),forcedIrrefutables_Inh_Production :: !(AttrMap),nt_Inh_Production :: !(NontermIdent),options_Inh_Production :: !(Options)}+data Syn_Production = Syn_Production {allAttributes_Syn_Production :: !(AttrMap),augmentsOut_Syn_Production :: !((Map ConstructorIdent (Map Identifier [Expression]))),errors_Syn_Production :: !((Seq Error)),output_Syn_Production :: !(Production )}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production +wrap_Production !(T_Production sem ) !(Inh_Production _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =+ (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions + in (Syn_Production _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))+sem_Production_Production :: ConstructorIdent ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ T_Production +sem_Production_Production !con_ !(T_Children children_ ) !(T_Rules rules_ ) !(T_TypeSigs typeSigs_ ) =+ (T_Production (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1877 "Desugar.hs" #-})) of+ { !_rulesOnt ->+ (case (({-# LINE 160 "Desugar.ag" #-}+ con_+ {-# LINE 1881 "Desugar.hs" #-})) of+ { !_rulesOcon ->+ (case (rules_ ) of+ { ( !_rulesIdefsCollect,!T_Rules_1 rules_1) ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 1887 "Desugar.hs" #-})) of+ { !_rulesOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1891 "Desugar.hs" #-})) of+ { !_rulesOforcedIrrefutables ->+ (case (children_ ) of+ { ( !_childrenIchildInhs,!_childrenIchildSyns,!_childrenIoutput) ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _childrenIchildSyns+ {-# LINE 1897 "Desugar.hs" #-})) of+ { !_rulesOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _childrenIchildInhs+ {-# LINE 1901 "Desugar.hs" #-})) of+ { !_rulesOchildInhs ->+ (case (({-# LINE 187 "Desugar.ag" #-}+ _rulesIdefsCollect+ {-# LINE 1905 "Desugar.hs" #-})) of+ { !_rulesOdefs ->+ (case (rules_1 _rulesOchildInhs _rulesOchildSyns _rulesOcon _rulesOdefs _rulesOforcedIrrefutables _rulesOnt _rulesOoptions ) of+ { ( !_rulesIallAttributes,!_rulesIerrors,!_rulesIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _rulesIallAttributes+ {-# LINE 1911 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 243 "Desugar.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaugmentsIn+ {-# LINE 1915 "Desugar.hs" #-})) of+ { !_augmentsIn ->+ (case (({-# LINE 246 "Desugar.ag" #-}+ Map.mapAccum (desugarExprs _lhsIoptions _lhsInt con_ _childrenIchildInhs _childrenIchildSyns) Seq.empty _augmentsIn+ {-# LINE 1919 "Desugar.hs" #-})) of+ { !__tup3 ->+ (case (({-# LINE 246 "Desugar.ag" #-}+ __tup3+ {-# LINE 1923 "Desugar.hs" #-})) of+ { !(_,!_augmentsOut1) ->+ (case (({-# LINE 244 "Desugar.ag" #-}+ Map.singleton con_ _augmentsOut1+ {-# LINE 1927 "Desugar.hs" #-})) of+ { !_augmentsOut ->+ (case (({-# LINE 230 "Desugar.ag" #-}+ _augmentsOut+ {-# LINE 1931 "Desugar.hs" #-})) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 246 "Desugar.ag" #-}+ __tup3+ {-# LINE 1935 "Desugar.hs" #-})) of+ { !(!_augmentErrs,_) ->+ (case (({-# LINE 282 "Desugar.ag" #-}+ _rulesIerrors Seq.>< _augmentErrs+ {-# LINE 1939 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (typeSigs_ ) of+ { ( !_typeSigsIoutput) ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Production con_ _childrenIoutput _rulesIoutput _typeSigsIoutput+ {-# LINE 1945 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1949 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Productions -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ augmentsIn : Map ConstructorIdent (Map Identifier [Expression])+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ augmentsOut : Map ConstructorIdent (Map Identifier [Expression])+ errors : Seq Error+ output : SELF + alternatives:+ alternative Cons:+ child hd : Production + child tl : Productions + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+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 ((Map ConstructorIdent (Map Identifier [Expression])) ->+ AttrMap ->+ NontermIdent ->+ Options ->+ ( AttrMap,(Map ConstructorIdent (Map Identifier [Expression])),(Seq Error),Productions ))+data Inh_Productions = Inh_Productions {augmentsIn_Inh_Productions :: !((Map ConstructorIdent (Map Identifier [Expression]))),forcedIrrefutables_Inh_Productions :: !(AttrMap),nt_Inh_Productions :: !(NontermIdent),options_Inh_Productions :: !(Options)}+data Syn_Productions = Syn_Productions {allAttributes_Syn_Productions :: !(AttrMap),augmentsOut_Syn_Productions :: !((Map ConstructorIdent (Map Identifier [Expression]))),errors_Syn_Productions :: !((Seq Error)),output_Syn_Productions :: !(Productions )}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions +wrap_Productions !(T_Productions sem ) !(Inh_Productions _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =+ (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) = sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions + in (Syn_Productions _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions +sem_Productions_Cons !(T_Production hd_ ) !(T_Productions tl_ ) =+ (T_Productions (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2004 "Desugar.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2008 "Desugar.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2012 "Desugar.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2016 "Desugar.hs" #-})) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 229 "Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 2020 "Desugar.hs" #-})) of+ { !_tlOaugmentsIn ->+ (case (tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOnt _tlOoptions ) of+ { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2026 "Desugar.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2030 "Desugar.hs" #-})) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 229 "Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 2034 "Desugar.hs" #-})) of+ { !_hdOaugmentsIn ->+ (case (hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOnt _hdOoptions ) of+ { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _hdIallAttributes `mergeAttributes` _tlIallAttributes+ {-# LINE 2040 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 230 "Desugar.ag" #-}+ _hdIaugmentsOut `Map.union` _tlIaugmentsOut+ {-# LINE 2044 "Desugar.hs" #-})) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2048 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2052 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2056 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Productions_Nil :: T_Productions +sem_Productions_Nil =+ (T_Productions (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ Map.empty+ {-# LINE 2067 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 230 "Desugar.ag" #-}+ Map.empty+ {-# LINE 2071 "Desugar.hs" #-})) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 2075 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 2079 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2083 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) })) )+-- Rule --------------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ defsCollect : Set (Identifier, Identifier)+ visit 1:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ defs : Set (Identifier, Identifier)+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ errors : Seq Error+ output : SELF + alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : Expression + child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ visit 1:+ local ruleDescr : _+ local output : _+-}+-- cata+sem_Rule :: Rule ->+ T_Rule +sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit ) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit )+-- semantic domain+newtype T_Rule = T_Rule (( (Set (Identifier, Identifier)),T_Rule_1 ))+newtype T_Rule_1 = T_Rule_1 (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ (Set (Identifier, Identifier)) ->+ AttrMap ->+ NontermIdent ->+ Options ->+ ( AttrMap,(Seq Error),Rule ))+data Inh_Rule = Inh_Rule {childInhs_Inh_Rule :: !(([(Identifier, Identifier)])),childSyns_Inh_Rule :: !(([(Identifier, Identifier)])),con_Inh_Rule :: !(ConstructorIdent),defs_Inh_Rule :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Rule :: !(AttrMap),nt_Inh_Rule :: !(NontermIdent),options_Inh_Rule :: !(Options)}+data Syn_Rule = Syn_Rule {allAttributes_Syn_Rule :: !(AttrMap),defsCollect_Syn_Rule :: !((Set (Identifier, Identifier))),errors_Syn_Rule :: !((Seq Error)),output_Syn_Rule :: !(Rule )}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule +wrap_Rule !(T_Rule sem ) !(Inh_Rule _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =+ (let ( !_lhsOdefsCollect,!T_Rule_1 sem_1) = sem + ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) = sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions + in (Syn_Rule _lhsOallAttributes _lhsOdefsCollect _lhsOerrors _lhsOoutput ))+sem_Rule_Rule :: (Maybe Identifier) ->+ T_Pattern ->+ T_Expression ->+ Bool ->+ String ->+ Bool ->+ T_Rule +sem_Rule_Rule !mbName_ !(T_Pattern pattern_ ) !(T_Expression rhs_ ) !owrt_ !origin_ !explicit_ =+ (T_Rule (case (pattern_ ) of+ { ( !_patternIdefsCollect,!T_Pattern_1 pattern_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _patternIdefsCollect+ {-# LINE 2152 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Rule_Rule_1 :: T_Rule_1 + sem_Rule_Rule_1 =+ (T_Rule_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2165 "Desugar.hs" #-})) of+ { !_patternOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2169 "Desugar.hs" #-})) of+ { !_patternOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2173 "Desugar.hs" #-})) of+ { !_patternOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2177 "Desugar.hs" #-})) of+ { !_patternOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2181 "Desugar.hs" #-})) of+ { !_patternOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2185 "Desugar.hs" #-})) of+ { !_patternOchildInhs ->+ (case (pattern_1 _patternOchildInhs _patternOchildSyns _patternOcon _patternOdefs _patternOforcedIrrefutables _patternOnt ) of+ { ( !_patternIallAttributes,!_patternIcopy,!_patternIerrors,!_patternIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _patternIallAttributes+ {-# LINE 2191 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 171 "Desugar.ag" #-}+ show _lhsInt ++ " :: " ++ show _lhsIcon ++ " :: " ++ (concat $ intersperse "," $ map (\(f,a) -> show f ++ "." ++ show a) $ Set.toList _patternIdefsCollect)+ {-# LINE 2195 "Desugar.hs" #-})) of+ { !_ruleDescr ->+ (case (({-# LINE 167 "Desugar.ag" #-}+ _ruleDescr+ {-# LINE 2199 "Desugar.hs" #-})) of+ { !_rhsOruleDescr ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2203 "Desugar.hs" #-})) of+ { !_rhsOoptions ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2207 "Desugar.hs" #-})) of+ { !_rhsOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2211 "Desugar.hs" #-})) of+ { !_rhsOcon ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2215 "Desugar.hs" #-})) of+ { !_rhsOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2219 "Desugar.hs" #-})) of+ { !_rhsOchildInhs ->+ (case (rhs_ _rhsOchildInhs _rhsOchildSyns _rhsOcon _rhsOnt _rhsOoptions _rhsOruleDescr ) of+ { ( !_rhsIerrors,!_rhsIoutput) ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _patternIerrors Seq.>< _rhsIerrors+ {-# LINE 2225 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Rule mbName_ _patternIoutput _rhsIoutput owrt_ origin_ explicit_+ {-# LINE 2229 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2233 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Rule_Rule_1)) of+ { ( !sem_Rule_1) ->+ ( _lhsOdefsCollect,sem_Rule_1) }) }) }) )+-- Rules -------------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ defsCollect : Set (Identifier, Identifier)+ visit 1:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ defs : Set (Identifier, Identifier)+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ errors : Seq Error+ output : SELF + alternatives:+ alternative Cons:+ child hd : Rule + child tl : Rules + visit 1:+ local output : _+ alternative Nil:+ visit 1:+ local output : _+-}+-- cata+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 (( (Set (Identifier, Identifier)),T_Rules_1 ))+newtype T_Rules_1 = T_Rules_1 (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ (Set (Identifier, Identifier)) ->+ AttrMap ->+ NontermIdent ->+ Options ->+ ( AttrMap,(Seq Error),Rules ))+data Inh_Rules = Inh_Rules {childInhs_Inh_Rules :: !(([(Identifier, Identifier)])),childSyns_Inh_Rules :: !(([(Identifier, Identifier)])),con_Inh_Rules :: !(ConstructorIdent),defs_Inh_Rules :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Rules :: !(AttrMap),nt_Inh_Rules :: !(NontermIdent),options_Inh_Rules :: !(Options)}+data Syn_Rules = Syn_Rules {allAttributes_Syn_Rules :: !(AttrMap),defsCollect_Syn_Rules :: !((Set (Identifier, Identifier))),errors_Syn_Rules :: !((Seq Error)),output_Syn_Rules :: !(Rules )}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules +wrap_Rules !(T_Rules sem ) !(Inh_Rules _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =+ (let ( !_lhsOdefsCollect,!T_Rules_1 sem_1) = sem + ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) = sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions + in (Syn_Rules _lhsOallAttributes _lhsOdefsCollect _lhsOerrors _lhsOoutput ))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules +sem_Rules_Cons !(T_Rule hd_ ) !(T_Rules tl_ ) =+ (T_Rules (case (tl_ ) of+ { ( !_tlIdefsCollect,!T_Rules_1 tl_1) ->+ (case (hd_ ) of+ { ( !_hdIdefsCollect,!T_Rule_1 hd_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _hdIdefsCollect `Set.union` _tlIdefsCollect+ {-# LINE 2301 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Rules_Cons_1 :: T_Rules_1 + sem_Rules_Cons_1 =+ (T_Rules_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2314 "Desugar.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2318 "Desugar.hs" #-})) of+ { !_tlOcon ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2322 "Desugar.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2326 "Desugar.hs" #-})) of+ { !_hdOcon ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2330 "Desugar.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2334 "Desugar.hs" #-})) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2338 "Desugar.hs" #-})) of+ { !_tlOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2342 "Desugar.hs" #-})) of+ { !_tlOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2346 "Desugar.hs" #-})) of+ { !_tlOchildInhs ->+ (case (tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt _tlOoptions ) of+ { ( !_tlIallAttributes,!_tlIerrors,!_tlIoutput) ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2352 "Desugar.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2356 "Desugar.hs" #-})) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2360 "Desugar.hs" #-})) of+ { !_hdOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2364 "Desugar.hs" #-})) of+ { !_hdOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2368 "Desugar.hs" #-})) of+ { !_hdOchildInhs ->+ (case (hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt _hdOoptions ) of+ { ( !_hdIallAttributes,!_hdIerrors,!_hdIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _hdIallAttributes `mergeAttributes` _tlIallAttributes+ {-# LINE 2374 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2378 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2382 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2386 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Rules_Cons_1)) of+ { ( !sem_Rules_1) ->+ ( _lhsOdefsCollect,sem_Rules_1) }) }) }) }) )+sem_Rules_Nil :: T_Rules +sem_Rules_Nil =+ (T_Rules (case (({-# LINE 178 "Desugar.ag" #-}+ Set.empty+ {-# LINE 2396 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Rules_Nil_1 :: T_Rules_1 + sem_Rules_Nil_1 =+ (T_Rules_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ Map.empty+ {-# LINE 2409 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 2413 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 2417 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2421 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) })) )+ in sem_Rules_Nil_1)) of+ { ( !sem_Rules_1) ->+ ( _lhsOdefsCollect,sem_Rules_1) }) }) )+-- TypeSig -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ output : SELF + alternatives:+ alternative TypeSig:+ child name : {Identifier}+ child tp : {Type}+ visit 0:+ local output : _+-}+-- cata+sem_TypeSig :: TypeSig ->+ T_TypeSig +sem_TypeSig !(TypeSig _name _tp ) =+ (sem_TypeSig_TypeSig _name _tp )+-- semantic domain+newtype T_TypeSig = T_TypeSig (( TypeSig ))+data Inh_TypeSig = Inh_TypeSig {}+data Syn_TypeSig = Syn_TypeSig {output_Syn_TypeSig :: !(TypeSig )}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig +wrap_TypeSig !(T_TypeSig sem ) !(Inh_TypeSig ) =+ (let ( !_lhsOoutput) = sem + in (Syn_TypeSig _lhsOoutput ))+sem_TypeSig_TypeSig :: Identifier ->+ Type ->+ T_TypeSig +sem_TypeSig_TypeSig !name_ !tp_ =+ (T_TypeSig (case (({-# LINE 39 "Desugar.ag" #-}+ TypeSig name_ tp_+ {-# LINE 2460 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2464 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }) )+-- TypeSigs ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ output : SELF + alternatives:+ alternative Cons:+ child hd : TypeSig + child tl : TypeSigs + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+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 (( TypeSigs ))+data Inh_TypeSigs = Inh_TypeSigs {}+data Syn_TypeSigs = Syn_TypeSigs {output_Syn_TypeSigs :: !(TypeSigs )}+wrap_TypeSigs :: T_TypeSigs ->+ Inh_TypeSigs ->+ Syn_TypeSigs +wrap_TypeSigs !(T_TypeSigs sem ) !(Inh_TypeSigs ) =+ (let ( !_lhsOoutput) = sem + in (Syn_TypeSigs _lhsOoutput ))+sem_TypeSigs_Cons :: T_TypeSig ->+ T_TypeSigs ->+ T_TypeSigs +sem_TypeSigs_Cons !(T_TypeSig hd_ ) !(T_TypeSigs tl_ ) =+ (T_TypeSigs (case (tl_ ) of+ { ( !_tlIoutput) ->+ (case (hd_ ) of+ { ( !_hdIoutput) ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2507 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2511 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }) }) }) )+sem_TypeSigs_Nil :: T_TypeSigs +sem_TypeSigs_Nil =+ (T_TypeSigs (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 2518 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2522 "Desugar.hs" #-})) of { !_lhsOoutput -> ( _lhsOoutput) }) }) )
src-derived/ErrorMessages.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (ErrorMessages.ag)+-- UUAGC 0.9.30 (ErrorMessages.ag) module ErrorMessages where {-# LINE 2 "ErrorMessages.ag" #-}
src-derived/Expression.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (Expression.ag)+-- UUAGC 0.9.30 (Expression.ag) module Expression where {-# LINE 2 "Expression.ag" #-}
src-derived/GenerateCode.hs view
@@ -1,7210 +1,7194 @@ --- UUAGC 0.9.29 (GenerateCode.ag)-module GenerateCode where-{-# LINE 9 "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,intersect,(\\))-import Maybe(fromJust,isJust)--import Debug.Trace-{-# LINE 33 "../src-derived/GenerateCode.hs" #-}--{-# LINE 2 "./CodeSyntax.ag" #-}--import Patterns-import CommonTypes-import Data.Map(Map)-import Data.Set(Set)-{-# LINE 41 "../src-derived/GenerateCode.hs" #-}--{-# LINE 2 "./Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 48 "../src-derived/GenerateCode.hs" #-}--{-# LINE 2 "./DeclBlocks.ag" #-}--import Code (Decl,Expr)-{-# LINE 53 "../src-derived/GenerateCode.hs" #-}-{-# LINE 107 "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'-{-# LINE 61 "../src-derived/GenerateCode.hs" #-}--{-# LINE 121 "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-{-# LINE 68 "../src-derived/GenerateCode.hs" #-}--{-# LINE 240 "GenerateCode.ag" #-}--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 81 "../src-derived/GenerateCode.hs" #-}--{-# LINE 406 "GenerateCode.ag" #-}--substSelf nt tp = case tp of- NT t tps | t == _SELF -> Haskell (getName nt ++ " " ++ unwords tps)- _ -> tp-{-# LINE 88 "../src-derived/GenerateCode.hs" #-}--{-# LINE 529 "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 nm params = TypeApp (SimpleType nm) (map SimpleType params)--isHigherOrder :: Maybe (Maybe Type) -> Bool-isHigherOrder (Just Nothing) = True-isHigherOrder _ = False--pickOrigType :: (Identifier, Type, Maybe (Maybe Type)) -> (Identifier, Type, Maybe (Maybe Type))-pickOrigType (nm, tp, virt@(Just (Just x))) = (nm, x, virt)-pickOrigType x = x-{-# LINE 112 "../src-derived/GenerateCode.hs" #-}--{-# LINE 625 "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 126 "../src-derived/GenerateCode.hs" #-}--{-# LINE 675 "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 149 "../src-derived/GenerateCode.hs" #-}--{-# LINE 753 "GenerateCode.ag" #-}--typeToCodeType :: Maybe NontermIdent -> [String] -> Type -> Code.Type-typeToCodeType mbNt params tp- = case tp of- NT nt tps | nt == _SELF -> NontermType (maybe "Unknown" getName mbNt) params- | otherwise -> NontermType (getName nt) tps- Haskell t -> SimpleType t--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 188 "../src-derived/GenerateCode.hs" #-}--{-# LINE 878 "GenerateCode.ag" #-}---- for a virtual child that already existed as a child, returns -isFirstOrder :: Maybe (Maybe Type) -> Type -> Maybe Type-isFirstOrder Nothing tp = Just tp-isFirstOrder (Just x) _ = x-{-# LINE 196 "../src-derived/GenerateCode.hs" #-}--{-# LINE 898 "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++"}") tp- in ( what ++ " " ++ x ++ replicate ((width - length x) `max` 0) ' ' ++ " : " ++ y )--{-# LINE 205 "../src-derived/GenerateCode.hs" #-}--{-# LINE 929 "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 _ _) exp = Case rhs [CaseAlt left exp]-oneCase (Resume _ nt left rhs) exp = ResumeExpr nt rhs left exp-oneCase _ exp = exp---- Gives the name of the visit function-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 251 "../src-derived/GenerateCode.hs" #-}--- CGrammar -----------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- errors : Seq Error- output : Program- alternatives:- alternative CGrammar:- child typeSyns : {TypeSyns}- child derivings : {Derivings}- child wrappers : {Set NontermIdent}- child nonts : CNonterminals - child pragmas : {PragmaMap}- child paramMap : {ParamMap}- child contextMap : {ContextMap}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Set Identifier))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))}- child multivisit : {Bool}- visit 0:- local options : _- local aroundMap : _- local mergeMap : _- local unfoldSemDom : _--}--- cata-sem_CGrammar :: CGrammar ->- T_CGrammar -sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _aroundsMap _mergeMap _multivisit ) =- (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts ) _pragmas _paramMap _contextMap _aroundsMap _mergeMap _multivisit )--- semantic domain-newtype T_CGrammar = T_CGrammar (Options ->- ( (Seq Error),Program))-data Inh_CGrammar = Inh_CGrammar {options_Inh_CGrammar :: !(Options)}-data Syn_CGrammar = Syn_CGrammar {errors_Syn_CGrammar :: !((Seq Error)),output_Syn_CGrammar :: !(Program)}-wrap_CGrammar :: T_CGrammar ->- Inh_CGrammar ->- Syn_CGrammar -wrap_CGrammar (T_CGrammar sem ) (Inh_CGrammar _lhsIoptions ) =- (let ( _lhsOerrors,_lhsOoutput) =- (sem _lhsIoptions )- in (Syn_CGrammar _lhsOerrors _lhsOoutput ))-sem_CGrammar_CGrammar :: TypeSyns ->- Derivings ->- (Set NontermIdent) ->- T_CNonterminals ->- PragmaMap ->- ParamMap ->- ContextMap ->- (Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- Bool ->- T_CGrammar -sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_ aroundsMap_ mergeMap_ multivisit_ =- (T_CGrammar (\ _lhsIoptions ->- (let _nontsOo_sig :: Bool- _nontsOo_cata :: Bool- _nontsOo_sem :: Bool- _nontsOo_newtypes :: Bool- _nontsOo_unbox :: Bool- _nontsOo_case :: Bool- _nontsOo_pretty :: Bool- _nontsOo_rename :: Bool- _nontsOo_strictwrap :: Bool- _nontsOo_splitsems :: Bool- _nontsOo_data :: (Maybe Bool)- _nontsOprefix :: String- _nontsOo_traces :: Bool- _nontsOo_costcentre :: Bool- _nontsOo_linePragmas :: Bool- _nontsOo_monadic :: Bool- _nontsOallPragmas :: PragmaMap- _nontsOparamMap :: ParamMap- _nontsOcontextMap :: ContextMap- _nontsOallNts :: (Set NontermIdent)- _nontsOwith_sig :: Bool- _lhsOerrors :: (Seq Error)- _lhsOoutput :: Program- _nontsOtypeSyns :: TypeSyns- _nontsOderivings :: Derivings- _nontsOwrappers :: (Set NontermIdent)- _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))- _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))- _nontsOoptions :: Options- _nontsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _nontsIchunks :: Chunks- _nontsIgathNts :: (Set NontermIdent)- _nontsIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_sig =- ({-# LINE 53 "GenerateCode.ag" #-}- typeSigs _lhsIoptions- {-# LINE 345 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_cata =- ({-# LINE 54 "GenerateCode.ag" #-}- folds _lhsIoptions- {-# LINE 350 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_sem =- ({-# LINE 55 "GenerateCode.ag" #-}- semfuns _lhsIoptions- {-# LINE 355 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_newtypes =- ({-# LINE 56 "GenerateCode.ag" #-}- newtypes _lhsIoptions- {-# LINE 360 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_unbox =- ({-# LINE 57 "GenerateCode.ag" #-}- unbox _lhsIoptions- {-# LINE 365 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_case =- ({-# LINE 58 "GenerateCode.ag" #-}- cases _lhsIoptions- {-# LINE 370 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_pretty =- ({-# LINE 59 "GenerateCode.ag" #-}- attrInfo _lhsIoptions- {-# LINE 375 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_rename =- ({-# LINE 60 "GenerateCode.ag" #-}- rename _lhsIoptions- {-# LINE 380 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_strictwrap =- ({-# LINE 61 "GenerateCode.ag" #-}- strictWrap _lhsIoptions- {-# LINE 385 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_splitsems =- ({-# LINE 62 "GenerateCode.ag" #-}- splitSems _lhsIoptions- {-# LINE 390 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_data =- ({-# LINE 63 "GenerateCode.ag" #-}- if dataTypes _lhsIoptions then Just (strictData _lhsIoptions) else Nothing- {-# LINE 395 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOprefix =- ({-# LINE 64 "GenerateCode.ag" #-}- prefix _lhsIoptions- {-# LINE 400 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_traces =- ({-# LINE 65 "GenerateCode.ag" #-}- genTraces _lhsIoptions- {-# LINE 405 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_costcentre =- ({-# LINE 66 "GenerateCode.ag" #-}- genCostCentres _lhsIoptions- {-# LINE 410 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_linePragmas =- ({-# LINE 67 "GenerateCode.ag" #-}- genLinePragmas _lhsIoptions- {-# LINE 415 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 53, column 17)- _nontsOo_monadic =- ({-# LINE 68 "GenerateCode.ag" #-}- monadic _lhsIoptions- {-# LINE 420 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 71, column 3)- _options =- ({-# LINE 71 "GenerateCode.ag" #-}- _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && multivisit_ }- {-# LINE 425 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 76, column 15)- _nontsOallPragmas =- ({-# LINE 76 "GenerateCode.ag" #-}- pragmas_- {-# LINE 430 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 98, column 14)- _nontsOparamMap =- ({-# LINE 98 "GenerateCode.ag" #-}- paramMap_- {-# LINE 435 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 119, column 7)- _nontsOcontextMap =- ({-# LINE 119 "GenerateCode.ag" #-}- contextMap_- {-# LINE 440 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 131, column 7)- _nontsOallNts =- ({-# LINE 131 "GenerateCode.ag" #-}- _nontsIgathNts- {-# LINE 445 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 574, column 34)- _aroundMap =- ({-# LINE 574 "GenerateCode.ag" #-}- aroundsMap_- {-# LINE 450 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 590, column 34)- _mergeMap =- ({-# LINE 590 "GenerateCode.ag" #-}- mergeMap_- {-# LINE 455 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 746, column 7)- _unfoldSemDom =- ({-# LINE 746 "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 464 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 847, column 14)- _nontsOwith_sig =- ({-# LINE 847 "GenerateCode.ag" #-}- typeSigs _lhsIoptions- {-# LINE 469 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 850, column 15)- _lhsOerrors =- ({-# LINE 850 "GenerateCode.ag" #-}- Seq.empty- {-# LINE 474 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 915, column 17)- _lhsOoutput =- ({-# LINE 915 "GenerateCode.ag" #-}- Program _nontsIchunks multivisit_- {-# LINE 479 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 980, column 14)- _nontsOtypeSyns =- ({-# LINE 980 "GenerateCode.ag" #-}- typeSyns_- {-# LINE 484 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 980, column 14)- _nontsOderivings =- ({-# LINE 981 "GenerateCode.ag" #-}- derivings_- {-# LINE 489 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 980, column 14)- _nontsOwrappers =- ({-# LINE 982 "GenerateCode.ag" #-}- wrappers_- {-# LINE 494 "GenerateCode.hs" #-})- -- copy rule (from local)- _nontsOaroundMap =- ({-# LINE 567 "GenerateCode.ag" #-}- _aroundMap- {-# LINE 499 "GenerateCode.hs" #-})- -- copy rule (from local)- _nontsOmergeMap =- ({-# LINE 583 "GenerateCode.ag" #-}- _mergeMap- {-# LINE 504 "GenerateCode.hs" #-})- -- copy rule (from local)- _nontsOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _options- {-# LINE 509 "GenerateCode.hs" #-})- -- copy rule (from local)- _nontsOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _unfoldSemDom- {-# LINE 514 "GenerateCode.hs" #-})- ( _nontsIchunks,_nontsIgathNts,_nontsIsemDomUnfoldGath) =- (nonts_ _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 _nontsOtypeSyns _nontsOunfoldSemDom _nontsOwith_sig _nontsOwrappers )- in ( _lhsOerrors,_lhsOoutput))) )--- CInterface ---------------------------------------------------{-- visit 0:- inherited attributes:- inh : Attributes- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- syn : Attributes- synthesized attributes:- comments : [String]- semDom : [Decl]- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- wrapDecls : Decls- alternatives:- alternative CInterface:- child seg : CSegments --}--- cata-sem_CInterface :: CInterface ->- T_CInterface -sem_CInterface (CInterface _seg ) =- (sem_CInterface_CInterface (sem_CSegments _seg ) )--- semantic domain-newtype T_CInterface = T_CInterface (Attributes ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- Attributes ->- ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))-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)}-wrap_CInterface :: T_CInterface ->- Inh_CInterface ->- Syn_CInterface -wrap_CInterface (T_CInterface sem ) (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 ) =- (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) =- (sem _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 )- in (Syn_CInterface _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls ))-sem_CInterface_CInterface :: T_CSegments ->- T_CInterface -sem_CInterface_CInterface (T_CSegments seg_ ) =- (T_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 ->- (let _segOnr :: Int- _lhsOsemDom :: ([Decl])- _lhsOcomments :: ([String])- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _lhsOwrapDecls :: Decls- _segOinh :: Attributes- _segOnt :: NontermIdent- _segOo_case :: Bool- _segOo_cata :: Bool- _segOo_costcentre :: Bool- _segOo_data :: (Maybe Bool)- _segOo_linePragmas :: Bool- _segOo_monadic :: Bool- _segOo_newtypes :: Bool- _segOo_pretty :: Bool- _segOo_rename :: Bool- _segOo_sem :: Bool- _segOo_sig :: Bool- _segOo_splitsems :: Bool- _segOo_strictwrap :: Bool- _segOo_traces :: Bool- _segOo_unbox :: Bool- _segOoptions :: Options- _segOparamMap :: ParamMap- _segOprefix :: String- _segOsyn :: Attributes- _segIcomments :: ([String])- _segIisNil :: Bool- _segIsemDom :: ([Decl])- _segIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _segIwrapDecls :: Decls- -- "GenerateCode.ag"(line 277, column 17)- _segOnr =- ({-# LINE 277 "GenerateCode.ag" #-}- 0- {-# LINE 648 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 704, column 18)- _lhsOsemDom =- ({-# LINE 704 "GenerateCode.ag" #-}- Comment "semantic domain" : _segIsemDom- {-# LINE 653 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- _segIcomments- {-# LINE 658 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 736, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 736 "GenerateCode.ag" #-}- _segIsemDomUnfoldGath- {-# LINE 663 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 822, column 52)- _lhsOwrapDecls =- ({-# LINE 822 "GenerateCode.ag" #-}- _segIwrapDecls- {-# LINE 668 "GenerateCode.hs" #-})- -- copy rule (down)- _segOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 673 "GenerateCode.hs" #-})- -- copy rule (down)- _segOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 678 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 683 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 688 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 693 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 698 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 703 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 708 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 713 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 718 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 723 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 728 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 733 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 738 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 743 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 748 "GenerateCode.hs" #-})- -- copy rule (down)- _segOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 753 "GenerateCode.hs" #-})- -- copy rule (down)- _segOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 758 "GenerateCode.hs" #-})- -- copy rule (down)- _segOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 763 "GenerateCode.hs" #-})- -- copy rule (down)- _segOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 768 "GenerateCode.hs" #-})- -- copy rule (down)- _segOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 773 "GenerateCode.hs" #-})- ( _segIcomments,_segIisNil,_segIsemDom,_segIsemDomUnfoldGath,_segIwrapDecls) =- (seg_ _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 )- in ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )--- CNonterminal -------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Map NontermIdent (Map ConstructorIdent (Set Identifier))- contextMap : ContextMap- derivings : Derivings- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- typeSyns : TypeSyns- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- wrappers : Set NontermIdent- synthesized attributes:- chunks : Chunks- gathNts : Set NontermIdent- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- alternatives:- alternative CNonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : CProductions - child inter : CInterface - visit 0:- local _tup1 : {(Attributes,Attributes,NontermIdent)}- local _tup2 : {(Attributes,Attributes,NontermIdent)}- local aroundMap : _- local mergeMap : _- local semWrapper : _- local comment : _- local dataDef : _- local cataFun : _--}--- cata-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 ((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 ->- TypeSyns ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- Bool ->- (Set NontermIdent) ->- ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))-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),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)))}-wrap_CNonterminal :: T_CNonterminal ->- Inh_CNonterminal ->- Syn_CNonterminal -wrap_CNonterminal (T_CNonterminal sem ) (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 _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers ) =- (let ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath) =- (sem _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 _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )- in (Syn_CNonterminal _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath ))-sem_CNonterminal_CNonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_CProductions ->- T_CInterface ->- T_CNonterminal -sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ (T_CProductions prods_ ) (T_CInterface inter_ ) =- (T_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- _lhsItypeSyns- _lhsIunfoldSemDom- _lhsIwith_sig- _lhsIwrappers ->- (let __tup1 :: ((Attributes,Attributes,NontermIdent))- _interOinh :: Attributes- _interOsyn :: Attributes- _interOnt :: NontermIdent- __tup2 :: ((Attributes,Attributes,NontermIdent))- _prodsOinh :: Attributes- _prodsOsyn :: Attributes- _prodsOnt :: NontermIdent- _lhsOgathNts :: (Set NontermIdent)- _lhsOchunks :: Chunks- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _prodsOallNts :: (Set NontermIdent)- _prodsOallPragmas :: PragmaMap- _prodsOaroundMap :: (Map ConstructorIdent (Set Identifier))- _prodsOcontextMap :: ContextMap- _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- _prodsOo_case :: Bool- _prodsOo_cata :: Bool- _prodsOo_costcentre :: Bool- _prodsOo_data :: (Maybe Bool)- _prodsOo_linePragmas :: Bool- _prodsOo_monadic :: Bool- _prodsOo_newtypes :: Bool- _prodsOo_pretty :: Bool- _prodsOo_rename :: Bool- _prodsOo_sem :: Bool- _prodsOo_sig :: Bool- _prodsOo_splitsems :: Bool- _prodsOo_strictwrap :: Bool- _prodsOo_traces :: Bool- _prodsOo_unbox :: Bool- _prodsOoptions :: Options- _prodsOparamMap :: ParamMap- _prodsOprefix :: String- _prodsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _prodsOwith_sig :: Bool- _interOo_case :: Bool- _interOo_cata :: Bool- _interOo_costcentre :: Bool- _interOo_data :: (Maybe Bool)- _interOo_linePragmas :: Bool- _interOo_monadic :: Bool- _interOo_newtypes :: Bool- _interOo_pretty :: Bool- _interOo_rename :: Bool- _interOo_sem :: Bool- _interOo_sig :: Bool- _interOo_splitsems :: Bool- _interOo_strictwrap :: Bool- _interOo_traces :: Bool- _interOo_unbox :: Bool- _interOoptions :: Options- _interOparamMap :: ParamMap- _interOprefix :: String- _prodsIcataAlts :: Decls- _prodsIcomments :: ([String])- _prodsIdataAlts :: DataAlts- _prodsIdecls :: Decls- _prodsIsemNames :: ([String])- _interIcomments :: ([String])- _interIsemDom :: ([Decl])- _interIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _interIwrapDecls :: Decls- -- "GenerateCode.ag"(line 86, column 26)- __tup1 =- ({-# LINE 86 "GenerateCode.ag" #-}- (inh_,syn_,nt_)- {-# LINE 978 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 86, column 26)- (_interOinh,_,_) =- ({-# LINE 86 "GenerateCode.ag" #-}- __tup1- {-# LINE 983 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 86, column 26)- (_,_interOsyn,_) =- ({-# LINE 86 "GenerateCode.ag" #-}- __tup1- {-# LINE 988 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 86, column 26)- (_,_,_interOnt) =- ({-# LINE 86 "GenerateCode.ag" #-}- __tup1- {-# LINE 993 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 87, column 25)- __tup2 =- ({-# LINE 87 "GenerateCode.ag" #-}- (inh_,syn_,nt_)- {-# LINE 998 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 87, column 25)- (_prodsOinh,_,_) =- ({-# LINE 87 "GenerateCode.ag" #-}- __tup2- {-# LINE 1003 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 87, column 25)- (_,_prodsOsyn,_) =- ({-# LINE 87 "GenerateCode.ag" #-}- __tup2- {-# LINE 1008 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 87, column 25)- (_,_,_prodsOnt) =- ({-# LINE 87 "GenerateCode.ag" #-}- __tup2- {-# LINE 1013 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 137, column 7)- _lhsOgathNts =- ({-# LINE 137 "GenerateCode.ag" #-}- Set.singleton nt_- {-# LINE 1018 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 575, column 34)- _aroundMap =- ({-# LINE 575 "GenerateCode.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundMap- {-# LINE 1023 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 591, column 34)- _mergeMap =- ({-# LINE 591 "GenerateCode.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergeMap- {-# LINE 1028 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 796, column 18)- _semWrapper =- ({-# LINE 796 "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 1056 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 857, column 18)- _comment =- ({-# LINE 857 "GenerateCode.ag" #-}- Comment . unlines . map ind $ ( _interIcomments ++ ("alternatives:" : map ind _prodsIcomments) )- {-# LINE 1061 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 918, column 19)- _lhsOchunks =- ({-# LINE 918 "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 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 1075 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 985, column 18)- _dataDef =- ({-# LINE 985 "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- ]- 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 1094 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 1017, column 18)- _cataFun =- ({-# LINE 1017 "GenerateCode.ag" #-}- let appParams nm = TypeApp (SimpleType nm) (map SimpleType (map getName params_))- evalTp | null params_ = id- | otherwise = idEvalType- tSig = TSig (cataname _lhsIprefix 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 "Map.map" [SimpleExpr $ cataname _lhsIprefix t', arg]- _ -> arg- lhs = Fun (cataname _lhsIprefix nt_) [arg]- rhs = App "Map.foldWithKey" [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 "IntMap.map" [SimpleExpr $ cataname _lhsIprefix t', arg]- _ -> arg- lhs = Fun (cataname _lhsIprefix nt_) [arg]- rhs = App "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]- in Comment "cata" :- (if _lhsIo_sig then [tSig] else []) ++- maybe _prodsIcataAlts special (lookup nt_ _lhsItypeSyns)- {-# LINE 1179 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 736, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 736 "GenerateCode.ag" #-}- _interIsemDomUnfoldGath- {-# LINE 1184 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 1189 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOallPragmas =- ({-# LINE 73 "GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 1194 "GenerateCode.hs" #-})- -- copy rule (from local)- _prodsOaroundMap =- ({-# LINE 570 "GenerateCode.ag" #-}- _aroundMap- {-# LINE 1199 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOcontextMap =- ({-# LINE 115 "GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 1204 "GenerateCode.hs" #-})- -- copy rule (from local)- _prodsOmergeMap =- ({-# LINE 586 "GenerateCode.ag" #-}- _mergeMap- {-# LINE 1209 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 1214 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 1219 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 1224 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 1229 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 1234 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 1239 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 1244 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 1249 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 1254 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 1259 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 1264 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 1269 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 1274 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 1279 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 1284 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 1289 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 1294 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 1299 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 1304 "GenerateCode.hs" #-})- -- copy rule (down)- _prodsOwith_sig =- ({-# LINE 844 "GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 1309 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 1314 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 1319 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 1324 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 1329 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 1334 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 1339 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 1344 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 1349 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 1354 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 1359 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 1364 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 1369 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 1374 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 1379 "GenerateCode.hs" #-})- -- copy rule (down)- _interOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 1384 "GenerateCode.hs" #-})- -- copy rule (down)- _interOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 1389 "GenerateCode.hs" #-})- -- copy rule (down)- _interOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 1394 "GenerateCode.hs" #-})- -- copy rule (down)- _interOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 1399 "GenerateCode.hs" #-})- ( _prodsIcataAlts,_prodsIcomments,_prodsIdataAlts,_prodsIdecls,_prodsIsemNames) =- (prods_ _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 _prodsOsyn _prodsOunfoldSemDom _prodsOwith_sig )- ( _interIcomments,_interIsemDom,_interIsemDomUnfoldGath,_interIwrapDecls) =- (inter_ _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 )- in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )--- CNonterminals ------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Map NontermIdent (Map ConstructorIdent (Set Identifier))- contextMap : ContextMap- derivings : Derivings- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- typeSyns : TypeSyns- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- wrappers : Set NontermIdent- synthesized attributes:- chunks : Chunks- gathNts : Set NontermIdent- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- alternatives:- alternative Cons:- child hd : CNonterminal - child tl : CNonterminals - alternative Nil:--}--- cata-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 ((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 ->- TypeSyns ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- Bool ->- (Set NontermIdent) ->- ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))-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),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)))}-wrap_CNonterminals :: T_CNonterminals ->- Inh_CNonterminals ->- Syn_CNonterminals -wrap_CNonterminals (T_CNonterminals sem ) (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 _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers ) =- (let ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath) =- (sem _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 _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )- in (Syn_CNonterminals _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath ))-sem_CNonterminals_Cons :: T_CNonterminal ->- T_CNonterminals ->- T_CNonterminals -sem_CNonterminals_Cons (T_CNonterminal hd_ ) (T_CNonterminals tl_ ) =- (T_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- _lhsItypeSyns- _lhsIunfoldSemDom- _lhsIwith_sig- _lhsIwrappers ->- (let _lhsOchunks :: Chunks- _lhsOgathNts :: (Set NontermIdent)- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _hdOallNts :: (Set NontermIdent)- _hdOallPragmas :: PragmaMap- _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))- _hdOcontextMap :: ContextMap- _hdOderivings :: Derivings- _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOtypeSyns :: TypeSyns- _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _hdOwith_sig :: Bool- _hdOwrappers :: (Set NontermIdent)- _tlOallNts :: (Set NontermIdent)- _tlOallPragmas :: PragmaMap- _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))- _tlOcontextMap :: ContextMap- _tlOderivings :: Derivings- _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOtypeSyns :: TypeSyns- _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _tlOwith_sig :: Bool- _tlOwrappers :: (Set NontermIdent)- _hdIchunks :: Chunks- _hdIgathNts :: (Set NontermIdent)- _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _tlIchunks :: Chunks- _tlIgathNts :: (Set NontermIdent)- _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- -- use rule "GenerateCode.ag"(line 910, column 49)- _lhsOchunks =- ({-# LINE 910 "GenerateCode.ag" #-}- _hdIchunks ++ _tlIchunks- {-# LINE 1592 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 133, column 47)- _lhsOgathNts =- ({-# LINE 133 "GenerateCode.ag" #-}- _hdIgathNts `Set.union` _tlIgathNts- {-# LINE 1597 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 736, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 736 "GenerateCode.ag" #-}- _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath- {-# LINE 1602 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 1607 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOallPragmas =- ({-# LINE 73 "GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 1612 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 567 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 1617 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOcontextMap =- ({-# LINE 115 "GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 1622 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOderivings =- ({-# LINE 978 "GenerateCode.ag" #-}- _lhsIderivings- {-# LINE 1627 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 583 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 1632 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 1637 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 1642 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 1647 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 1652 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 1657 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 1662 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 1667 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 1672 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 1677 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 1682 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 1687 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 1692 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 1697 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 1702 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 1707 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 1712 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 1717 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 1722 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOtypeSyns =- ({-# LINE 978 "GenerateCode.ag" #-}- _lhsItypeSyns- {-# LINE 1727 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 1732 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOwith_sig =- ({-# LINE 844 "GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 1737 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOwrappers =- ({-# LINE 978 "GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 1742 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 1747 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOallPragmas =- ({-# LINE 73 "GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 1752 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 567 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 1757 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOcontextMap =- ({-# LINE 115 "GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 1762 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOderivings =- ({-# LINE 978 "GenerateCode.ag" #-}- _lhsIderivings- {-# LINE 1767 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 583 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 1772 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 1777 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 1782 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 1787 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 1792 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 1797 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 1802 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 1807 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 1812 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 1817 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 1822 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 1827 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 1832 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 1837 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 1842 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 1847 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 1852 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 1857 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 1862 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOtypeSyns =- ({-# LINE 978 "GenerateCode.ag" #-}- _lhsItypeSyns- {-# LINE 1867 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 1872 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOwith_sig =- ({-# LINE 844 "GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 1877 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOwrappers =- ({-# LINE 978 "GenerateCode.ag" #-}- _lhsIwrappers- {-# LINE 1882 "GenerateCode.hs" #-})- ( _hdIchunks,_hdIgathNts,_hdIsemDomUnfoldGath) =- (hd_ _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 _hdOtypeSyns _hdOunfoldSemDom _hdOwith_sig _hdOwrappers )- ( _tlIchunks,_tlIgathNts,_tlIsemDomUnfoldGath) =- (tl_ _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 _tlOtypeSyns _tlOunfoldSemDom _tlOwith_sig _tlOwrappers )- in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )-sem_CNonterminals_Nil :: T_CNonterminals -sem_CNonterminals_Nil =- (T_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- _lhsItypeSyns- _lhsIunfoldSemDom- _lhsIwith_sig- _lhsIwrappers ->- (let _lhsOchunks :: Chunks- _lhsOgathNts :: (Set NontermIdent)- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- -- use rule "GenerateCode.ag"(line 910, column 49)- _lhsOchunks =- ({-# LINE 910 "GenerateCode.ag" #-}- []- {-# LINE 1925 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 133, column 47)- _lhsOgathNts =- ({-# LINE 133 "GenerateCode.ag" #-}- Set.empty- {-# LINE 1930 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 736, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 736 "GenerateCode.ag" #-}- Map.empty- {-# LINE 1935 "GenerateCode.hs" #-})- in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )--- CProduction --------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Map ConstructorIdent (Set Identifier)- contextMap : ContextMap- inh : Attributes- mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- syn : Attributes- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- synthesized attributes:- cataAlt : Decl- comments : [String]- dataAlt : DataAlt- decls : Decls- semNames : [String]- alternatives:- alternative CProduction:- child con : {ConstructorIdent}- child visits : CVisits - child children : {[(Identifier,Type,Maybe (Maybe Type))]}- child terminals : {[Identifier]}- visit 0:- local paramInstMap : _- local aroundMap : _- local mergeMap : _- local firstOrderChildren : _- local params : _--}--- cata-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 ((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 ->- Attributes ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- Bool ->- ( Decl,([String]),DataAlt,Decls,([String])))-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),syn_Inh_CProduction :: !(Attributes),unfoldSemDom_Inh_CProduction :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProduction :: !(Bool)}-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]))}-wrap_CProduction :: T_CProduction ->- Inh_CProduction ->- Syn_CProduction -wrap_CProduction (T_CProduction sem ) (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 _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig ) =- (let ( _lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOsemNames) =- (sem _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 _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )- in (Syn_CProduction _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames ))-sem_CProduction_CProduction :: ConstructorIdent ->- T_CVisits ->- ([(Identifier,Type,Maybe (Maybe Type))]) ->- ([Identifier]) ->- T_CProduction -sem_CProduction_CProduction con_ (T_CVisits visits_ ) children_ terminals_ =- (T_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- _lhsIsyn- _lhsIunfoldSemDom- _lhsIwith_sig ->- (let _visitsOcon :: ConstructorIdent- _visitsOterminals :: ([Identifier])- _visitsOvisitedSet :: (Set Identifier)- _visitsOnr :: Int- _visitsOchildren :: ([(Identifier,Type, Maybe (Maybe Type))])- _visitsOinstVisitNrs :: (Map Identifier Int)- _lhsOcomments :: ([String])- _lhsOdataAlt :: DataAlt- _lhsOcataAlt :: Decl- _lhsOdecls :: Decls- _lhsOsemNames :: ([String])- _visitsOallNts :: (Set NontermIdent)- _visitsOallPragmas :: PragmaMap- _visitsOaroundMap :: (Set Identifier)- _visitsOcontextMap :: ContextMap- _visitsOinh :: Attributes- _visitsOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _visitsOnt :: NontermIdent- _visitsOo_case :: Bool- _visitsOo_cata :: Bool- _visitsOo_costcentre :: Bool- _visitsOo_data :: (Maybe Bool)- _visitsOo_linePragmas :: Bool- _visitsOo_monadic :: Bool- _visitsOo_newtypes :: Bool- _visitsOo_pretty :: Bool- _visitsOo_rename :: Bool- _visitsOo_sem :: Bool- _visitsOo_sig :: Bool- _visitsOo_splitsems :: Bool- _visitsOo_strictwrap :: Bool- _visitsOo_traces :: Bool- _visitsOo_unbox :: Bool- _visitsOoptions :: Options- _visitsOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _visitsOparamMap :: ParamMap- _visitsOprefix :: String- _visitsOsyn :: Attributes- _visitsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _visitsOwith_sig :: Bool- _visitsIcomments :: ([String])- _visitsIdecls :: Decls- _visitsIgatherInstVisitNrs :: (Map Identifier Int)- _visitsIintra :: Exprs- _visitsIintraVars :: (Set String)- _visitsIisNil :: Bool- _visitsIsemNames :: ([String])- _visitsIvisitedSet :: (Set Identifier)- -- "GenerateCode.ag"(line 92, column 19)- _visitsOcon =- ({-# LINE 92 "GenerateCode.ag" #-}- con_- {-# LINE 2118 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 93, column 20)- _visitsOterminals =- ({-# LINE 93 "GenerateCode.ag" #-}- terminals_- {-# LINE 2123 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 105, column 7)- _paramInstMap =- ({-# LINE 105 "GenerateCode.ag" #-}- Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- children_, let tps = map cleanupArg $ nontermArgs tp, not (null tps) ]- {-# LINE 2128 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 141, column 32)- _visitsOvisitedSet =- ({-# LINE 141 "GenerateCode.ag" #-}- Set.empty- {-# LINE 2133 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 273, column 18)- _visitsOnr =- ({-# LINE 273 "GenerateCode.ag" #-}- 0- {-# LINE 2138 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 414, column 18)- _visitsOchildren =- ({-# LINE 414 "GenerateCode.ag" #-}- children_- {-# LINE 2143 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 556, column 7)- _visitsOinstVisitNrs =- ({-# LINE 556 "GenerateCode.ag" #-}- _visitsIgatherInstVisitNrs- {-# LINE 2148 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 576, column 34)- _aroundMap =- ({-# LINE 576 "GenerateCode.ag" #-}- Map.findWithDefault Set.empty con_ _lhsIaroundMap- {-# LINE 2153 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 592, column 34)- _mergeMap =- ({-# LINE 592 "GenerateCode.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergeMap- {-# LINE 2158 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 872, column 18)- _firstOrderChildren =- ({-# LINE 872 "GenerateCode.ag" #-}- [ (nm,fromJust mb,virt) | (nm,tp,virt) <- children_, let mb = isFirstOrder virt tp, isJust mb ]- {-# LINE 2163 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 873, column 18)- _lhsOcomments =- ({-# LINE 873 "GenerateCode.ag" #-}- ("alternative " ++ getName con_ ++ ":")- : map ind ( map (\(x,y,_) -> makeLocalComment 14 "child" x (Just y)) _firstOrderChildren- ++ _visitsIcomments- )- {-# LINE 2171 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 1009, column 17)- _params =- ({-# LINE 1009 "GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 2176 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 1010, column 17)- _lhsOdataAlt =- ({-# LINE 1010 "GenerateCode.ag" #-}- DataAlt (conname _lhsIo_rename _lhsInt con_) (map (\(_,t,_) -> typeToCodeType (Just _lhsInt) _params t) _firstOrderChildren )- {-# LINE 2181 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 1109, column 17)- _lhsOcataAlt =- ({-# LINE 1109 "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 _,_) = let tp' = maybe tp id (deforestedNt tp)- in App (cataname _lhsIprefix tp')- [SimpleExpr (locname nm)]- argument (nm, _,_) = SimpleExpr (locname nm)- in Decl lhs rhs Set.empty Set.empty- {-# LINE 2195 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 911, column 44)- _lhsOdecls =- ({-# LINE 911 "GenerateCode.ag" #-}- _visitsIdecls- {-# LINE 2200 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 1125, column 61)- _lhsOsemNames =- ({-# LINE 1125 "GenerateCode.ag" #-}- _visitsIsemNames- {-# LINE 2205 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 2210 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOallPragmas =- ({-# LINE 73 "GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 2215 "GenerateCode.hs" #-})- -- copy rule (from local)- _visitsOaroundMap =- ({-# LINE 572 "GenerateCode.ag" #-}- _aroundMap- {-# LINE 2220 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOcontextMap =- ({-# LINE 115 "GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 2225 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 2230 "GenerateCode.hs" #-})- -- copy rule (from local)- _visitsOmergeMap =- ({-# LINE 588 "GenerateCode.ag" #-}- _mergeMap- {-# LINE 2235 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 2240 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 2245 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 2250 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 2255 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 2260 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 2265 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 2270 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 2275 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 2280 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 2285 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 2290 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 2295 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 2300 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 2305 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 2310 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 2315 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 2320 "GenerateCode.hs" #-})- -- copy rule (from local)- _visitsOparamInstMap =- ({-# LINE 101 "GenerateCode.ag" #-}- _paramInstMap- {-# LINE 2325 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 2330 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 2335 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 2340 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 2345 "GenerateCode.hs" #-})- -- copy rule (down)- _visitsOwith_sig =- ({-# LINE 844 "GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 2350 "GenerateCode.hs" #-})- ( _visitsIcomments,_visitsIdecls,_visitsIgatherInstVisitNrs,_visitsIintra,_visitsIintraVars,_visitsIisNil,_visitsIsemNames,_visitsIvisitedSet) =- (visits_ _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 _visitsOsyn _visitsOterminals _visitsOunfoldSemDom _visitsOvisitedSet _visitsOwith_sig )- in ( _lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOsemNames))) )--- CProductions -------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Map ConstructorIdent (Set Identifier)- contextMap : ContextMap- inh : Attributes- mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- syn : Attributes- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- synthesized attributes:- cataAlts : Decls- comments : [String]- dataAlts : DataAlts- decls : Decls- semNames : [String]- alternatives:- alternative Cons:- child hd : CProduction - child tl : CProductions - alternative Nil:--}--- cata-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 ((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 ->- Attributes ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- Bool ->- ( Decls,([String]),DataAlts,Decls,([String])))-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),syn_Inh_CProductions :: !(Attributes),unfoldSemDom_Inh_CProductions :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProductions :: !(Bool)}-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]))}-wrap_CProductions :: T_CProductions ->- Inh_CProductions ->- Syn_CProductions -wrap_CProductions (T_CProductions sem ) (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 _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig ) =- (let ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames) =- (sem _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 _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )- in (Syn_CProductions _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames ))-sem_CProductions_Cons :: T_CProduction ->- T_CProductions ->- T_CProductions -sem_CProductions_Cons (T_CProduction hd_ ) (T_CProductions tl_ ) =- (T_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- _lhsIsyn- _lhsIunfoldSemDom- _lhsIwith_sig ->- (let _lhsOdataAlts :: DataAlts- _lhsOcataAlts :: Decls- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOsemNames :: ([String])- _hdOallNts :: (Set NontermIdent)- _hdOallPragmas :: PragmaMap- _hdOaroundMap :: (Map ConstructorIdent (Set Identifier))- _hdOcontextMap :: ContextMap- _hdOinh :: Attributes- _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- _hdOnt :: NontermIdent- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOsyn :: Attributes- _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _hdOwith_sig :: Bool- _tlOallNts :: (Set NontermIdent)- _tlOallPragmas :: PragmaMap- _tlOaroundMap :: (Map ConstructorIdent (Set Identifier))- _tlOcontextMap :: ContextMap- _tlOinh :: Attributes- _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))- _tlOnt :: NontermIdent- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOsyn :: Attributes- _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _tlOwith_sig :: Bool- _hdIcataAlt :: Decl- _hdIcomments :: ([String])- _hdIdataAlt :: DataAlt- _hdIdecls :: Decls- _hdIsemNames :: ([String])- _tlIcataAlts :: Decls- _tlIcomments :: ([String])- _tlIdataAlts :: DataAlts- _tlIdecls :: Decls- _tlIsemNames :: ([String])- -- "GenerateCode.ag"(line 1005, column 17)- _lhsOdataAlts =- ({-# LINE 1005 "GenerateCode.ag" #-}- _hdIdataAlt : _tlIdataAlts- {-# LINE 2549 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 1105, column 10)- _lhsOcataAlts =- ({-# LINE 1105 "GenerateCode.ag" #-}- _hdIcataAlt : _tlIcataAlts- {-# LINE 2554 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- _hdIcomments ++ _tlIcomments- {-# LINE 2559 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 911, column 44)- _lhsOdecls =- ({-# LINE 911 "GenerateCode.ag" #-}- _hdIdecls ++ _tlIdecls- {-# LINE 2564 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 1125, column 61)- _lhsOsemNames =- ({-# LINE 1125 "GenerateCode.ag" #-}- _hdIsemNames ++ _tlIsemNames- {-# LINE 2569 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 2574 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOallPragmas =- ({-# LINE 73 "GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 2579 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 570 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 2584 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOcontextMap =- ({-# LINE 115 "GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 2589 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 2594 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 586 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 2599 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 2604 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 2609 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 2614 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 2619 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 2624 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 2629 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 2634 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 2639 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 2644 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 2649 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 2654 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 2659 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 2664 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 2669 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 2674 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 2679 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 2684 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 2689 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 2694 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 2699 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 2704 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOwith_sig =- ({-# LINE 844 "GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 2709 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 2714 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOallPragmas =- ({-# LINE 73 "GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 2719 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 570 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 2724 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOcontextMap =- ({-# LINE 115 "GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 2729 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 2734 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 586 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 2739 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 2744 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 2749 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 2754 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 2759 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 2764 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 2769 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 2774 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 2779 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 2784 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 2789 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 2794 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 2799 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 2804 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 2809 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 2814 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 2819 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 2824 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 2829 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 2834 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 2839 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 2844 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOwith_sig =- ({-# LINE 844 "GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 2849 "GenerateCode.hs" #-})- ( _hdIcataAlt,_hdIcomments,_hdIdataAlt,_hdIdecls,_hdIsemNames) =- (hd_ _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 _hdOsyn _hdOunfoldSemDom _hdOwith_sig )- ( _tlIcataAlts,_tlIcomments,_tlIdataAlts,_tlIdecls,_tlIsemNames) =- (tl_ _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 _tlOsyn _tlOunfoldSemDom _tlOwith_sig )- in ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames))) )-sem_CProductions_Nil :: T_CProductions -sem_CProductions_Nil =- (T_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- _lhsIsyn- _lhsIunfoldSemDom- _lhsIwith_sig ->- (let _lhsOdataAlts :: DataAlts- _lhsOcataAlts :: Decls- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOsemNames :: ([String])- -- "GenerateCode.ag"(line 1006, column 17)- _lhsOdataAlts =- ({-# LINE 1006 "GenerateCode.ag" #-}- []- {-# LINE 2894 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 1106, column 10)- _lhsOcataAlts =- ({-# LINE 1106 "GenerateCode.ag" #-}- []- {-# LINE 2899 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- []- {-# LINE 2904 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 911, column 44)- _lhsOdecls =- ({-# LINE 911 "GenerateCode.ag" #-}- []- {-# LINE 2909 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 1125, column 61)- _lhsOsemNames =- ({-# LINE 1125 "GenerateCode.ag" #-}- []- {-# LINE 2914 "GenerateCode.hs" #-})- in ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames))) )--- CRule --------------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- aroundMap : Set Identifier- children : [(Identifier,Type,Maybe (Maybe Type))]- con : ConstructorIdent- inh : Attributes- instVisitNrs : Map Identifier Int- mergeMap : Map Identifier (Identifier, [Identifier])- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramInstMap : Map Identifier (NontermIdent, [String])- paramMap : ParamMap- prefix : String- syn : Attributes- terminals : [Identifier]- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- what : String- chained attributes:- declsAbove : [Decl]- visitedSet : Set Identifier- synthesized attributes:- allTpsFound : Bool- bldBlocksFun : DeclBlocks -> DeclBlocks- comments : [String]- decls : Decls- definedInsts : [Identifier]- exprs : Exprs- tSigs : [Decl]- tps : [Type]- usedVars : Set String- alternatives:- alternative CChildVisit:- child name : {Identifier}- child nt : {NontermIdent}- child nr : {Int}- child inh : {Attributes}- child syn : {Attributes}- child isLast : {Bool}- visit 0:- local visitedSet : _- local costCentreDescr : _- local addCostCentre : _- local decls : _- local isSuperfluousHigherOrderIntra : _- local names : _- local mkTp : _- local definedTps : _- local nextTp : _- local orgParams : _- local instParams : _- local replParamMap : _- local replace : _- local evalTp : _- alternative CRule:- child name : {Identifier}- child isIn : {Bool}- child hasCode : {Bool}- child nt : {NontermIdent}- child con : {ConstructorIdent}- child field : {Identifier}- child childnt : {Maybe NontermIdent}- child tp : {Maybe Type}- child pattern : Pattern - child rhs : {[String]}- child defines : {Map Int (Identifier,Identifier,Maybe Type)}- child owrt : {Bool}- child origin : {String}- child uses : {Set (Identifier, Identifier)}- child explicit : {Bool}- child mbNamed : {Maybe Identifier}- visit 0:- local instTypes : _- local originComment : _- local instDecls : _- local patDescr : _- local traceDescr : _- local addTrace : _- local costCentreDescr : _- local addCostCentre : _- local addLinePragma : _- local decls : _- local definedInsts : _- local rulename : _- local mkTp : _- local orgParams : _- local evalTp : _- local _tup3 : {([Type],Bool)}--}--- cata-sem_CRule :: CRule ->- T_CRule -sem_CRule (CChildVisit _name _nt _nr _inh _syn _isLast ) =- (sem_CRule_CChildVisit _name _nt _nr _inh _syn _isLast )-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 )--- semantic domain-newtype T_CRule = T_CRule ((Set NontermIdent) ->- (Set Identifier) ->- ([(Identifier,Type,Maybe (Maybe Type))]) ->- 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 ->- ( Bool,(DeclBlocks -> DeclBlocks),([String]),Decls,([Decl]),([Identifier]),Exprs,([Decl]),([Type]),(Set String),(Set Identifier)))-data Inh_CRule = Inh_CRule {allNts_Inh_CRule :: !((Set NontermIdent)),aroundMap_Inh_CRule :: !((Set Identifier)),children_Inh_CRule :: !(([(Identifier,Type,Maybe (Maybe Type))])),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))}-wrap_CRule :: T_CRule ->- Inh_CRule ->- Syn_CRule -wrap_CRule (T_CRule sem ) (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 ) =- (let ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet) =- (sem _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 )- in (Syn_CRule _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet ))-sem_CRule_CChildVisit :: Identifier ->- NontermIdent ->- Int ->- Attributes ->- Attributes ->- Bool ->- T_CRule -sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ =- (T_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 ->- (let _lhsOexprs :: Exprs- _lhsOusedVars :: (Set String)- _lhsOtSigs :: ([Decl])- _lhsOtps :: ([Type])- _lhsOdeclsAbove :: ([Decl])- _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)- _lhsOallTpsFound :: Bool- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOdefinedInsts :: ([Identifier])- _lhsOvisitedSet :: (Set Identifier)- -- "GenerateCode.ag"(line 142, column 26)- _visitedSet =- ({-# LINE 142 "GenerateCode.ag" #-}- Set.insert name_ _lhsIvisitedSet- {-# LINE 3132 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 198, column 18)- _costCentreDescr =- ({-# LINE 198 "GenerateCode.ag" #-}- show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show name_ ++ ":" ++ show nt_ ++ ":" ++ show nr_- {-# LINE 3137 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 199, column 18)- _addCostCentre =- ({-# LINE 199 "GenerateCode.ag" #-}- \v -> if _lhsIo_costcentre- then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v- else v- {-# LINE 3144 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 202, column 18)- _decls =- ({-# LINE 202 "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,t,mb) : r)- | nm == n = isJust mb- | 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 "merge" [App fun (map SimpleExpr rhsVars)]- in [Resume _lhsIo_monadic (typeName nt_ nr_) tuple' rhs']- in- (outDecls ++ outMerged)- {-# LINE 3184 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 320, column 7)- _isSuperfluousHigherOrderIntra =- ({-# LINE 320 "GenerateCode.ag" #-}- _lhsInr <= Map.findWithDefault (-1) name_ _lhsIinstVisitNrs- {-# LINE 3189 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 334, column 8)- _names =- ({-# LINE 334 "GenerateCode.ag" #-}- if _isSuperfluousHigherOrderIntra- then []- else [funname name_ (nr_+1)]- {-# LINE 3196 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 338, column 8)- _lhsOexprs =- ({-# LINE 338 "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 3204 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 350, column 7)- _lhsOusedVars =- ({-# LINE 350 "GenerateCode.ag" #-}- Set.fromList _names- {-# LINE 3209 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 389, column 19)- _mkTp =- ({-# LINE 389 "GenerateCode.ag" #-}- _evalTp . typeToCodeType (Just nt_) _orgParams- {-# LINE 3214 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 390, column 19)- _definedTps =- ({-# LINE 390 "GenerateCode.ag" #-}- [ TSig (attrname True name_ a) (_mkTp tp) | (a,tp) <- Map.toList syn_ ]- {-# LINE 3219 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 391, column 19)- _nextTp =- ({-# LINE 391 "GenerateCode.ag" #-}- typeName nt_ (nr_+1)- {-# LINE 3224 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 392, column 19)- _lhsOtSigs =- ({-# LINE 392 "GenerateCode.ag" #-}- (if isLast_ then id else (TSig (funname name_ (nr_+1)) (TypeApp (SimpleType _nextTp) (map SimpleType _instParams )) :)) _definedTps- {-# LINE 3229 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 394, column 19)- _orgParams =- ({-# LINE 394 "GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] nt_ _lhsIparamMap- {-# LINE 3234 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 395, column 19)- _instParams =- ({-# LINE 395 "GenerateCode.ag" #-}- snd $ Map.findWithDefault (nt_,[]) name_ _lhsIparamInstMap- {-# LINE 3239 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 396, column 19)- _replParamMap =- ({-# LINE 396 "GenerateCode.ag" #-}- Map.fromList (zip _orgParams _instParams )- {-# LINE 3244 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 397, column 19)- _replace =- ({-# LINE 397 "GenerateCode.ag" #-}- \k -> Map.findWithDefault k k _replParamMap- {-# LINE 3249 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 398, column 19)- _evalTp =- ({-# LINE 398 "GenerateCode.ag" #-}- if null _orgParams then id else evalType _replace- {-# LINE 3254 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 421, column 19)- _lhsOtps =- ({-# LINE 421 "GenerateCode.ag" #-}- if _isSuperfluousHigherOrderIntra- then []- else [NT (ntOfVisit nt_ (nr_+1)) _instParams ]- {-# LINE 3261 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 610, column 7)- _lhsOdeclsAbove =- ({-# LINE 610 "GenerateCode.ag" #-}- []- {-# LINE 3266 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 623, column 7)- _lhsObldBlocksFun =- ({-# LINE 623 "GenerateCode.ag" #-}- DeclBlock _lhsIdeclsAbove (head _decls )- {-# LINE 3271 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 418, column 39)- _lhsOallTpsFound =- ({-# LINE 418 "GenerateCode.ag" #-}- True- {-# LINE 3276 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- []- {-# LINE 3281 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 150, column 34)- _lhsOdecls =- ({-# LINE 150 "GenerateCode.ag" #-}- _decls- {-# LINE 3286 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- []- {-# LINE 3291 "GenerateCode.hs" #-})- -- copy rule (from local)- _lhsOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _visitedSet- {-# LINE 3296 "GenerateCode.hs" #-})- in ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )-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 name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ (T_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_ =- (T_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 ->- (let _lhsOexprs :: Exprs- _lhsOusedVars :: (Set String)- _lhsOtSigs :: ([Decl])- __tup3 :: (([Type],Bool))- _lhsOtps :: ([Type])- _lhsOallTpsFound :: Bool- _lhsOdeclsAbove :: ([Decl])- _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOdefinedInsts :: ([Identifier])- _lhsOvisitedSet :: (Set Identifier)- _patternIcopy :: Pattern - _patternIdefinedInsts :: ([Identifier])- _patternIpatternAttributes :: ([(Identifier, Identifier)])- -- "GenerateCode.ag"(line 152, column 12)- _instTypes =- ({-# LINE 152 "GenerateCode.ag" #-}- [ (n, (t, mb)) | (n, NT t _, mb) <- _lhsIchildren ]- {-# LINE 3369 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 153, column 12)- _originComment =- ({-# LINE 153 "GenerateCode.ag" #-}- if _lhsIo_pretty- then (Comment origin_:)- else id- {-# LINE 3376 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 156, column 12)- _instDecls =- ({-# LINE 156 "GenerateCode.ag" #-}- [ mkDecl _lhsIo_monadic (Pattern3 (Alias _INST' inst (Underscore (getPos inst)) []))- ( let (nm,mb) = fromJust $ inst `lookup` _instTypes- in unwrapSem _lhsIo_newtypes (maybe nm id (deforestedNt nm))- $ case mb of- Just (Just tp') -> App instLocFieldName [SimpleExpr $ fieldname inst]- _ ->- case nm `Set.member` _lhsIallNts of- True -> App (cataname _lhsIprefix nm)- [SimpleExpr instLocFieldName]- False -> SimpleExpr instLocFieldName- )- (Set.singleton instSemFieldName)- (Set.singleton instLocFieldName)- | inst <- _definedInsts- , let instLocFieldName = attrname True _INST inst- instSemFieldName = attrname False _INST' inst- ]- {-# LINE 3397 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 173, column 12)- _patDescr =- ({-# LINE 173 "GenerateCode.ag" #-}- if isIn_- then "_"- else concat $ intersperse "," (map (\(f,a) -> show f ++ "." ++ show a) _patternIpatternAttributes)- {-# LINE 3404 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 176, column 12)- _traceDescr =- ({-# LINE 176 "GenerateCode.ag" #-}- (maybe "" (\nm -> show nm ++ ":") mbNamed_) ++ show nt_ ++ " :: " ++ show con_ ++ " :: " ++ _patDescr- {-# LINE 3409 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 178, column 12)- _addTrace =- ({-# LINE 178 "GenerateCode.ag" #-}- \v -> if _lhsIo_traces- then Trace _traceDescr v- else v- {-# LINE 3416 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 181, column 12)- _costCentreDescr =- ({-# LINE 181 "GenerateCode.ag" #-}- show nt_ ++ ":" ++ show con_ ++ ":" ++ _patDescr- {-# LINE 3421 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 182, column 12)- _addCostCentre =- ({-# LINE 182 "GenerateCode.ag" #-}- \v -> if _lhsIo_costcentre- then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v- else v- {-# LINE 3428 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 185, column 12)- _addLinePragma =- ({-# LINE 185 "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 3439 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 192, column 12)- _decls =- ({-# LINE 192 "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 3449 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 259, column 12)- _definedInsts =- ({-# LINE 259 "GenerateCode.ag" #-}- if isIn_ then [] else _patternIdefinedInsts- {-# LINE 3454 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 329, column 12)- _rulename =- ({-# LINE 329 "GenerateCode.ag" #-}- if field_ == _LOC && name_ `elem` _lhsIterminals- then funname name_ 0- else attrname isIn_ field_ name_- {-# LINE 3461 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 332, column 12)- _lhsOexprs =- ({-# LINE 332 "GenerateCode.ag" #-}- [SimpleExpr _rulename ]- {-# LINE 3466 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 348, column 7)- _lhsOusedVars =- ({-# LINE 348 "GenerateCode.ag" #-}- Set.singleton _rulename- {-# LINE 3471 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 358, column 19)- _mkTp =- ({-# LINE 358 "GenerateCode.ag" #-}- typeToCodeType (Just _lhsInt) _orgParams- {-# LINE 3476 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 359, column 19)- _lhsOtSigs =- ({-# LINE 359 "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 tp'' = case tp' of- NT n params -> NT (Ident ("T_" ++ show n) (getPos n)) params- _ -> tp'- tp2 = _evalTp field $ _mkTp tp''- in Arr tp2 tp1- Nothing -> tp1- findOrigType nm [] = Nothing- findOrigType nm ((n,_,mb) : r)- | nm == n = case mb of- Just (Just orig) -> Just orig- _ -> Nothing- | otherwise = findOrigType nm r- ]- {-# LINE 3497 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 377, column 19)- _orgParams =- ({-# LINE 377 "GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 3502 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 378, column 19)- _evalTp =- ({-# LINE 378 "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 3515 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 420, column 23)- __tup3 =- ({-# LINE 420 "GenerateCode.ag" #-}- maybe ([],False) (\tp -> ([substSelf (fromJust childnt_) tp],True)) tp_- {-# LINE 3520 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 420, column 23)- (_lhsOtps,_) =- ({-# LINE 420 "GenerateCode.ag" #-}- __tup3- {-# LINE 3525 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 420, column 23)- (_,_lhsOallTpsFound) =- ({-# LINE 420 "GenerateCode.ag" #-}- __tup3- {-# LINE 3530 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 608, column 7)- _lhsOdeclsAbove =- ({-# LINE 608 "GenerateCode.ag" #-}- _lhsIdeclsAbove ++ _decls- {-# LINE 3535 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 621, column 7)- _lhsObldBlocksFun =- ({-# LINE 621 "GenerateCode.ag" #-}- id- {-# LINE 3540 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 895, column 18)- _lhsOcomments =- ({-# LINE 895 "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 3546 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 150, column 34)- _lhsOdecls =- ({-# LINE 150 "GenerateCode.ag" #-}- _decls- {-# LINE 3551 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- _definedInsts- {-# LINE 3556 "GenerateCode.hs" #-})- -- copy rule (chain)- _lhsOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 3561 "GenerateCode.hs" #-})- ( _patternIcopy,_patternIdefinedInsts,_patternIpatternAttributes) =- (pattern_ )- in ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )--- CSegment -----------------------------------------------------{-- visit 0:- inherited attributes:- inh : Attributes- isLast : Bool- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- syn : Attributes- synthesized attributes:- comments : [String]- semDom : [Decl]- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- wrapDecls : Decls- alternatives:- alternative CSegment:- child inh : {Attributes}- child syn : {Attributes}- visit 0:- local altSemForm : _- local tp : _- local inhTps : _- local inhTup : _- local synTps : _- local curTypeName : _- local nextTypeName : _- local indexName : _- local dataIndex : _- local indexExpr : _- local indexStr : _- local inhInstance : _- local synInstance : _- local continuation : _- local params : _--}--- cata-sem_CSegment :: CSegment ->- T_CSegment -sem_CSegment (CSegment _inh _syn ) =- (sem_CSegment_CSegment _inh _syn )--- semantic domain-newtype T_CSegment = T_CSegment (Attributes ->- Bool ->- Int ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- Attributes ->- ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))-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)}-wrap_CSegment :: T_CSegment ->- Inh_CSegment ->- Syn_CSegment -wrap_CSegment (T_CSegment sem ) (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 ) =- (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) =- (sem _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 )- in (Syn_CSegment _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls ))-sem_CSegment_CSegment :: Attributes ->- Attributes ->- T_CSegment -sem_CSegment_CSegment inh_ syn_ =- (T_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 ->- (let _lhsOsemDom :: ([Decl])- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _lhsOwrapDecls :: Decls- _lhsOcomments :: ([String])- -- "GenerateCode.ag"(line 707, column 15)- _altSemForm =- ({-# LINE 707 "GenerateCode.ag" #-}- breadthFirst _lhsIoptions- {-# LINE 3692 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 708, column 15)- _tp =- ({-# LINE 708 "GenerateCode.ag" #-}- if _altSemForm- then TypeApp (SimpleType "Closure") [SimpleType "EvalInfo", _indexExpr ]- else foldr Arr _synTps _inhTps- {-# LINE 3699 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 711, column 15)- _inhTps =- ({-# LINE 711 "GenerateCode.ag" #-}- [typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems inh_]- {-# LINE 3704 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 712, column 15)- _inhTup =- ({-# LINE 712 "GenerateCode.ag" #-}- mkTupleType _lhsIo_unbox (null _inhTps ) _inhTps- {-# LINE 3709 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 713, column 15)- _synTps =- ({-# LINE 713 "GenerateCode.ag" #-}- mkTupleType _lhsIo_unbox (null _inhTps ) ([typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems syn_] ++ _continuation )- {-# LINE 3714 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 714, column 15)- _curTypeName =- ({-# LINE 714 "GenerateCode.ag" #-}- typeName _lhsInt _lhsInr- {-# LINE 3719 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 715, column 15)- _nextTypeName =- ({-# LINE 715 "GenerateCode.ag" #-}- typeName _lhsInt (_lhsInr + 1)- {-# LINE 3724 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 716, column 15)- _indexName =- ({-# LINE 716 "GenerateCode.ag" #-}- "I_" ++ _curTypeName- {-# LINE 3729 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 717, column 15)- _dataIndex =- ({-# LINE 717 "GenerateCode.ag" #-}- Code.Data _indexName _params [DataAlt _indexName []] False []- {-# LINE 3734 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 718, column 15)- _indexExpr =- ({-# LINE 718 "GenerateCode.ag" #-}- TypeApp (SimpleType _indexName ) (map (SimpleType . ('@':)) _params )- {-# LINE 3739 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 719, column 15)- _indexStr =- ({-# LINE 719 "GenerateCode.ag" #-}- "(" ++ _indexName ++ concatMap (\p -> " " ++ p) _params ++ ")"- {-# LINE 3744 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 720, column 15)- _inhInstance =- ({-# LINE 720 "GenerateCode.ag" #-}- Code.Data "instance Inh" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Inh") [_inhTup ] ] False []- {-# LINE 3749 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 721, column 15)- _synInstance =- ({-# LINE 721 "GenerateCode.ag" #-}- Code.Data "instance Syn" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Syn") [_synTps ] ] False []- {-# LINE 3754 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 722, column 15)- _continuation =- ({-# LINE 722 "GenerateCode.ag" #-}- if _lhsIisLast- then []- else [TypeApp (SimpleType _nextTypeName ) (map (SimpleType . ('@':)) _params )]- {-# LINE 3761 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 725, column 15)- _params =- ({-# LINE 725 "GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 3766 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 726, column 15)- _lhsOsemDom =- ({-# LINE 726 "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 3779 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 740, column 7)- _lhsOsemDomUnfoldGath =- ({-# LINE 740 "GenerateCode.ag" #-}- Map.singleton (_lhsInt, _lhsInr) (_params , _tp )- {-# LINE 3784 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 824, column 15)- _lhsOwrapDecls =- ({-# LINE 824 "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 3798 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 866, column 18)- _lhsOcomments =- ({-# LINE 866 "GenerateCode.ag" #-}- let body = map ind (showsSegment (CSegment inh_ syn_))- in if null body- then []- else ("visit " ++ show _lhsInr ++ ":") : body- {-# LINE 3806 "GenerateCode.hs" #-})- in ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )--- CSegments ----------------------------------------------------{-- visit 0:- inherited attributes:- inh : Attributes- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramMap : ParamMap- prefix : String- syn : Attributes- synthesized attributes:- comments : [String]- isNil : Bool- semDom : [Decl]- semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)- wrapDecls : Decls- alternatives:- alternative Cons:- child hd : CSegment - child tl : CSegments - alternative Nil:--}--- cata-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 (Attributes ->- Int ->- NontermIdent ->- Bool ->- Bool ->- Bool ->- (Maybe Bool) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Options ->- ParamMap ->- String ->- Attributes ->- ( ([String]),Bool,([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))-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)}-wrap_CSegments :: T_CSegments ->- Inh_CSegments ->- Syn_CSegments -wrap_CSegments (T_CSegments sem ) (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 ) =- (let ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) =- (sem _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 )- in (Syn_CSegments _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls ))-sem_CSegments_Cons :: T_CSegment ->- T_CSegments ->- T_CSegments -sem_CSegments_Cons (T_CSegment hd_ ) (T_CSegments tl_ ) =- (T_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 ->- (let _tlOnr :: Int- _lhsOisNil :: Bool- _hdOisLast :: Bool- _lhsOcomments :: ([String])- _lhsOsemDom :: ([Decl])- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _lhsOwrapDecls :: Decls- _hdOinh :: Attributes- _hdOnr :: Int- _hdOnt :: NontermIdent- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOsyn :: Attributes- _tlOinh :: Attributes- _tlOnt :: NontermIdent- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOsyn :: Attributes- _hdIcomments :: ([String])- _hdIsemDom :: ([Decl])- _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _hdIwrapDecls :: Decls- _tlIcomments :: ([String])- _tlIisNil :: Bool- _tlIsemDom :: ([Decl])- _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _tlIwrapDecls :: Decls- -- "GenerateCode.ag"(line 279, column 11)- _tlOnr =- ({-# LINE 279 "GenerateCode.ag" #-}- _lhsInr + 1- {-# LINE 3973 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 292, column 12)- _lhsOisNil =- ({-# LINE 292 "GenerateCode.ag" #-}- False- {-# LINE 3978 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 293, column 12)- _hdOisLast =- ({-# LINE 293 "GenerateCode.ag" #-}- _tlIisNil- {-# LINE 3983 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- _hdIcomments ++ _tlIcomments- {-# LINE 3988 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 702, column 50)- _lhsOsemDom =- ({-# LINE 702 "GenerateCode.ag" #-}- _hdIsemDom ++ _tlIsemDom- {-# LINE 3993 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 736, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 736 "GenerateCode.ag" #-}- _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath- {-# LINE 3998 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 822, column 52)- _lhsOwrapDecls =- ({-# LINE 822 "GenerateCode.ag" #-}- _hdIwrapDecls ++ _tlIwrapDecls- {-# LINE 4003 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 4008 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOnr =- ({-# LINE 271 "GenerateCode.ag" #-}- _lhsInr- {-# LINE 4013 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 4018 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 4023 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 4028 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 4033 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 4038 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 4043 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 4048 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 4053 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 4058 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 4063 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 4068 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 4073 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 4078 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 4083 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 4088 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 4093 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 4098 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 4103 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 4108 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 4113 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 4118 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 4123 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 4128 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 4133 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 4138 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 4143 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 4148 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 4153 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 4158 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 4163 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 4168 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 4173 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 4178 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 4183 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 4188 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 4193 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 4198 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 4203 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 4208 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 4213 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 4218 "GenerateCode.hs" #-})- ( _hdIcomments,_hdIsemDom,_hdIsemDomUnfoldGath,_hdIwrapDecls) =- (hd_ _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 )- ( _tlIcomments,_tlIisNil,_tlIsemDom,_tlIsemDomUnfoldGath,_tlIwrapDecls) =- (tl_ _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 )- in ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )-sem_CSegments_Nil :: T_CSegments -sem_CSegments_Nil =- (T_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 ->- (let _lhsOisNil :: Bool- _lhsOcomments :: ([String])- _lhsOsemDom :: ([Decl])- _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))- _lhsOwrapDecls :: Decls- -- "GenerateCode.ag"(line 294, column 10)- _lhsOisNil =- ({-# LINE 294 "GenerateCode.ag" #-}- True- {-# LINE 4257 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- []- {-# LINE 4262 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 702, column 50)- _lhsOsemDom =- ({-# LINE 702 "GenerateCode.ag" #-}- []- {-# LINE 4267 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 736, column 86)- _lhsOsemDomUnfoldGath =- ({-# LINE 736 "GenerateCode.ag" #-}- Map.empty- {-# LINE 4272 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 822, column 52)- _lhsOwrapDecls =- ({-# LINE 822 "GenerateCode.ag" #-}- []- {-# LINE 4277 "GenerateCode.hs" #-})- in ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )--- CVisit -------------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Set Identifier- children : [(Identifier,Type, Maybe (Maybe Type))]- con : ConstructorIdent- contextMap : ContextMap- inh : Attributes- instVisitNrs : Map Identifier Int- isLast : Bool- mergeMap : Map Identifier (Identifier, [Identifier])- nextIntra : Exprs- nextIntraVars : Set String- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramInstMap : Map Identifier (NontermIdent, [String])- paramMap : ParamMap- prefix : String- syn : Attributes- terminals : [Identifier]- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- chained attributes:- decls : Decls- visitedSet : Set Identifier- synthesized attributes:- comments : [String]- gatherInstVisitNrs : Map Identifier Int- intra : Exprs- intraVars : Set String- semNames : [String]- alternatives:- alternative CVisit:- child inh : {Attributes}- child syn : {Attributes}- child vss : Sequence - child intra : Sequence - child ordered : {Bool}- visit 0:- local _tup4 : _- local higherOrderChildren : _- local firstOrderChildren : _- local firstOrderOrig : _- local funcname : _- local nextVisitName : _- local nextVisitDecl : _- local decls : _- local lastExprVars : _- local _tup5 : _- local blockFunDecls : _- local blockFirstFunCall : _- local costCentreDescr : _- local addCostCentre : _- local params : _- local semFun : _- local tsig : _- local semType : _- local typeSigs : _- local o_do : _- local o_case : _- local declsType : _- local o_splitsems : _--}--- cata-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 ((Set NontermIdent) ->- PragmaMap ->- (Set Identifier) ->- ([(Identifier,Type, Maybe (Maybe Type))]) ->- 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 ->- Attributes ->- ([Identifier]) ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- (Set Identifier) ->- Bool ->- ( ([String]),Decls,(Map Identifier Int),Exprs,(Set String),([String]),(Set Identifier)))-data Inh_CVisit = Inh_CVisit {allNts_Inh_CVisit :: !((Set NontermIdent)),allPragmas_Inh_CVisit :: !(PragmaMap),aroundMap_Inh_CVisit :: !((Set Identifier)),children_Inh_CVisit :: !(([(Identifier,Type, Maybe (Maybe Type))])),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),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)}-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))}-wrap_CVisit :: T_CVisit ->- Inh_CVisit ->- Syn_CVisit -wrap_CVisit (T_CVisit sem ) (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 _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig ) =- (let ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames,_lhsOvisitedSet) =- (sem _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 _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig )- in (Syn_CVisit _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet ))-sem_CVisit_CVisit :: Attributes ->- Attributes ->- T_Sequence ->- T_Sequence ->- Bool ->- T_CVisit -sem_CVisit_CVisit inh_ syn_ (T_Sequence vss_ ) (T_Sequence intra_ ) ordered_ =- (T_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- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwith_sig ->- (let _lhsOintra :: Exprs- _lhsOintraVars :: (Set String)- _vssOlastExpr :: Expr- _intraOlastExpr :: Expr- _lhsOdecls :: Decls- _lhsOgatherInstVisitNrs :: (Map Identifier Int)- _vssOdeclsAbove :: ([Decl])- _intraOdeclsAbove :: ([Decl])- _lhsOcomments :: ([String])- _vssOwhat :: String- _intraOwhat :: String- _lhsOsemNames :: ([String])- _lhsOvisitedSet :: (Set Identifier)- _vssOallNts :: (Set NontermIdent)- _vssOaroundMap :: (Set Identifier)- _vssOchildren :: ([(Identifier,Type,Maybe (Maybe Type))])- _vssOcon :: ConstructorIdent- _vssOinh :: Attributes- _vssOinstVisitNrs :: (Map Identifier Int)- _vssOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _vssOnr :: Int- _vssOnt :: NontermIdent- _vssOo_case :: Bool- _vssOo_cata :: Bool- _vssOo_costcentre :: Bool- _vssOo_data :: (Maybe Bool)- _vssOo_linePragmas :: Bool- _vssOo_monadic :: Bool- _vssOo_newtypes :: Bool- _vssOo_pretty :: Bool- _vssOo_rename :: Bool- _vssOo_sem :: Bool- _vssOo_sig :: Bool- _vssOo_splitsems :: Bool- _vssOo_strictwrap :: Bool- _vssOo_traces :: Bool- _vssOo_unbox :: Bool- _vssOoptions :: Options- _vssOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _vssOparamMap :: ParamMap- _vssOprefix :: String- _vssOsyn :: Attributes- _vssOterminals :: ([Identifier])- _vssOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _vssOvisitedSet :: (Set Identifier)- _intraOallNts :: (Set NontermIdent)- _intraOaroundMap :: (Set Identifier)- _intraOchildren :: ([(Identifier,Type,Maybe (Maybe Type))])- _intraOcon :: ConstructorIdent- _intraOinh :: Attributes- _intraOinstVisitNrs :: (Map Identifier Int)- _intraOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _intraOnr :: Int- _intraOnt :: NontermIdent- _intraOo_case :: Bool- _intraOo_cata :: Bool- _intraOo_costcentre :: Bool- _intraOo_data :: (Maybe Bool)- _intraOo_linePragmas :: Bool- _intraOo_monadic :: Bool- _intraOo_newtypes :: Bool- _intraOo_pretty :: Bool- _intraOo_rename :: Bool- _intraOo_sem :: Bool- _intraOo_sig :: Bool- _intraOo_splitsems :: Bool- _intraOo_strictwrap :: Bool- _intraOo_traces :: Bool- _intraOo_unbox :: Bool- _intraOoptions :: Options- _intraOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _intraOparamMap :: ParamMap- _intraOprefix :: String- _intraOsyn :: Attributes- _intraOterminals :: ([Identifier])- _intraOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _intraOvisitedSet :: (Set Identifier)- _vssIallTpsFound :: Bool- _vssIblockDecls :: DeclBlocks - _vssIcomments :: ([String])- _vssIdecls :: Decls- _vssIdeclsAbove :: ([Decl])- _vssIdefinedInsts :: ([Identifier])- _vssIexprs :: Exprs- _vssItSigs :: ([Decl])- _vssItps :: ([Type])- _vssIusedVars :: (Set String)- _vssIvisitedSet :: (Set Identifier)- _intraIallTpsFound :: Bool- _intraIblockDecls :: DeclBlocks - _intraIcomments :: ([String])- _intraIdecls :: Decls- _intraIdeclsAbove :: ([Decl])- _intraIdefinedInsts :: ([Identifier])- _intraIexprs :: Exprs- _intraItSigs :: ([Decl])- _intraItps :: ([Type])- _intraIusedVars :: (Set String)- _intraIvisitedSet :: (Set Identifier)- -- "GenerateCode.ag"(line 303, column 13)- _lhsOintra =- ({-# LINE 303 "GenerateCode.ag" #-}- _intraIexprs- {-# LINE 4565 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 304, column 13)- _lhsOintraVars =- ({-# LINE 304 "GenerateCode.ag" #-}- _intraIusedVars- {-# LINE 4570 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 443, column 13)- __tup4 =- ({-# LINE 443 "GenerateCode.ag" #-}- partition (\(_,_,virt) -> isHigherOrder virt) _lhsIchildren- {-# LINE 4575 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 443, column 13)- (_higherOrderChildren,_) =- ({-# LINE 443 "GenerateCode.ag" #-}- __tup4- {-# LINE 4580 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 443, column 13)- (_,_firstOrderChildren) =- ({-# LINE 443 "GenerateCode.ag" #-}- __tup4- {-# LINE 4585 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 444, column 13)- _firstOrderOrig =- ({-# LINE 444 "GenerateCode.ag" #-}- map pickOrigType _firstOrderChildren- {-# LINE 4590 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 445, column 13)- _funcname =- ({-# LINE 445 "GenerateCode.ag" #-}- seqSemname _lhsIprefix _lhsInt _lhsIcon _lhsInr- {-# LINE 4595 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 446, column 13)- _nextVisitName =- ({-# LINE 446 "GenerateCode.ag" #-}- if _lhsIisLast then [] else [visitname _lhsIprefix _lhsInt (_lhsInr+1)]- {-# LINE 4600 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 447, column 13)- _nextVisitDecl =- ({-# LINE 447 "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 4610 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 454, column 13)- _decls =- ({-# LINE 454 "GenerateCode.ag" #-}- _typeSigs ++ _vssIdecls ++ _nextVisitDecl- {-# LINE 4615 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 455, column 13)- _vssOlastExpr =- ({-# LINE 455 "GenerateCode.ag" #-}- mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_) $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName- {-# LINE 4620 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 456, column 13)- _intraOlastExpr =- ({-# LINE 456 "GenerateCode.ag" #-}- error "lastExpr: not used here"- {-# LINE 4625 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 457, column 13)- _lastExprVars =- ({-# LINE 457 "GenerateCode.ag" #-}- map (lhsname False) (Map.keys syn_) ++ _nextVisitName- {-# LINE 4630 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 458, column 13)- __tup5 =- ({-# LINE 458 "GenerateCode.ag" #-}- mkPartitionedFunction _funcname _o_case _nextVisitDecl _lastExprVars _vssIblockDecls- {-# LINE 4635 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 458, column 13)- (_blockFunDecls,_) =- ({-# LINE 458 "GenerateCode.ag" #-}- __tup5- {-# LINE 4640 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 458, column 13)- (_,_blockFirstFunCall) =- ({-# LINE 458 "GenerateCode.ag" #-}- __tup5- {-# LINE 4645 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 460, column 13)- _costCentreDescr =- ({-# LINE 460 "GenerateCode.ag" #-}- "b" ++ ":" ++ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show _lhsInr- {-# LINE 4650 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 461, column 13)- _addCostCentre =- ({-# LINE 461 "GenerateCode.ag" #-}- \v -> if _lhsIo_costcentre- then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v- else v- {-# LINE 4657 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 465, column 13)- _params =- ({-# LINE 465 "GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 4662 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 466, column 13)- _semFun =- ({-# LINE 466 "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 tp)- mbEvalTp | null _params = const Nothing- | otherwise = Just . idEvalType- rhs = wrap- . mkSemFun _lhsInt _lhsInr [mkLambdaArg (lhsname True nm) (mbEvalTp $ typeToCodeType (Just _lhsInt) _params 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 4692 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 497, column 13)- _tsig =- ({-# LINE 497 "GenerateCode.ag" #-}- TSig _funcname _semType- {-# LINE 4697 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 498, column 13)- _semType =- ({-# LINE 498 "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- evalTp | null _params = id- | otherwise = idEvalType- in 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 4710 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 509, column 13)- _lhsOdecls =- ({-# LINE 509 "GenerateCode.ag" #-}- ( if _lhsIwith_sig- then [_tsig, _semFun]- else [_semFun]- ) ++- ( if ordered_ && _o_splitsems- then _blockFunDecls- else []- )- {-# LINE 4722 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 517, column 13)- _typeSigs =- ({-# LINE 517 "GenerateCode.ag" #-}- if _lhsIo_sig && not _o_case- then _vssItSigs- else []- {-# LINE 4729 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 520, column 13)- _o_do =- ({-# LINE 520 "GenerateCode.ag" #-}- ordered_ && _lhsIo_monadic- {-# LINE 4734 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 521, column 13)- _o_case =- ({-# LINE 521 "GenerateCode.ag" #-}- not _o_do && _lhsIo_case && ordered_ && not (hasPragma _lhsIallPragmas _lhsInt _lhsIcon _NOCASE)- {-# LINE 4739 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 522, column 13)- _declsType =- ({-# LINE 522 "GenerateCode.ag" #-}- if _o_do- then DeclsDo- else if _o_case- then DeclsCase- else DeclsLet- {-# LINE 4748 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 527, column 13)- _o_splitsems =- ({-# LINE 527 "GenerateCode.ag" #-}- ordered_ && _lhsIo_splitsems- {-# LINE 4753 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 560, column 7)- _lhsOgatherInstVisitNrs =- ({-# LINE 560 "GenerateCode.ag" #-}- Map.fromList [(i,_lhsInr) | i <- _vssIdefinedInsts]- {-# LINE 4758 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 603, column 7)- _vssOdeclsAbove =- ({-# LINE 603 "GenerateCode.ag" #-}- []- {-# LINE 4763 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 604, column 7)- _intraOdeclsAbove =- ({-# LINE 604 "GenerateCode.ag" #-}- error "declsAbove: not used here"- {-# LINE 4768 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 886, column 18)- _lhsOcomments =- ({-# LINE 886 "GenerateCode.ag" #-}- let body = map ind (_vssIcomments ++ _intraIcomments)- in if null body- then []- else ("visit " ++ show _lhsInr ++ ":") : body- {-# LINE 4776 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 890, column 18)- _vssOwhat =- ({-# LINE 890 "GenerateCode.ag" #-}- "local"- {-# LINE 4781 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 891, column 18)- _intraOwhat =- ({-# LINE 891 "GenerateCode.ag" #-}- "intra"- {-# LINE 4786 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 1135, column 7)- _lhsOsemNames =- ({-# LINE 1135 "GenerateCode.ag" #-}- [_funcname ]- {-# LINE 4791 "GenerateCode.hs" #-})- -- copy rule (up)- _lhsOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _intraIvisitedSet- {-# LINE 4796 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 4801 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOaroundMap =- ({-# LINE 572 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 4806 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOchildren =- ({-# LINE 252 "GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 4811 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOcon =- ({-# LINE 89 "GenerateCode.ag" #-}- _lhsIcon- {-# LINE 4816 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 4821 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOinstVisitNrs =- ({-# LINE 552 "GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 4826 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOmergeMap =- ({-# LINE 588 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 4831 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOnr =- ({-# LINE 271 "GenerateCode.ag" #-}- _lhsInr- {-# LINE 4836 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 4841 "GenerateCode.hs" #-})- -- copy rule (from local)- _vssOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _o_case- {-# LINE 4846 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 4851 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 4856 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 4861 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 4866 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 4871 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 4876 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 4881 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 4886 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 4891 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 4896 "GenerateCode.hs" #-})- -- copy rule (from local)- _vssOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _o_splitsems- {-# LINE 4901 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 4906 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 4911 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 4916 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 4921 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOparamInstMap =- ({-# LINE 101 "GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 4926 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 4931 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 4936 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 4941 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOterminals =- ({-# LINE 90 "GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 4946 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 4951 "GenerateCode.hs" #-})- -- copy rule (down)- _vssOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 4956 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 4961 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOaroundMap =- ({-# LINE 572 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 4966 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOchildren =- ({-# LINE 252 "GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 4971 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOcon =- ({-# LINE 89 "GenerateCode.ag" #-}- _lhsIcon- {-# LINE 4976 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 4981 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOinstVisitNrs =- ({-# LINE 552 "GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 4986 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOmergeMap =- ({-# LINE 588 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 4991 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOnr =- ({-# LINE 271 "GenerateCode.ag" #-}- _lhsInr- {-# LINE 4996 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 5001 "GenerateCode.hs" #-})- -- copy rule (from local)- _intraOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _o_case- {-# LINE 5006 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 5011 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 5016 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 5021 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 5026 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 5031 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 5036 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 5041 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 5046 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 5051 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 5056 "GenerateCode.hs" #-})- -- copy rule (from local)- _intraOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _o_splitsems- {-# LINE 5061 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 5066 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 5071 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 5076 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 5081 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOparamInstMap =- ({-# LINE 101 "GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 5086 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 5091 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 5096 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 5101 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOterminals =- ({-# LINE 90 "GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 5106 "GenerateCode.hs" #-})- -- copy rule (down)- _intraOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 5111 "GenerateCode.hs" #-})- -- copy rule (chain)- _intraOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _vssIvisitedSet- {-# LINE 5116 "GenerateCode.hs" #-})- ( _vssIallTpsFound,_vssIblockDecls,_vssIcomments,_vssIdecls,_vssIdeclsAbove,_vssIdefinedInsts,_vssIexprs,_vssItSigs,_vssItps,_vssIusedVars,_vssIvisitedSet) =- (vss_ _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 )- ( _intraIallTpsFound,_intraIblockDecls,_intraIcomments,_intraIdecls,_intraIdeclsAbove,_intraIdefinedInsts,_intraIexprs,_intraItSigs,_intraItps,_intraIusedVars,_intraIvisitedSet) =- (intra_ _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 )- in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames,_lhsOvisitedSet))) )--- CVisits ------------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- allPragmas : PragmaMap- aroundMap : Set Identifier- children : [(Identifier,Type, Maybe (Maybe Type))]- con : ConstructorIdent- contextMap : ContextMap- inh : Attributes- instVisitNrs : Map Identifier Int- mergeMap : Map Identifier (Identifier, [Identifier])- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramInstMap : Map Identifier (NontermIdent, [String])- paramMap : ParamMap- prefix : String- syn : Attributes- terminals : [Identifier]- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- with_sig : Bool- chained attribute:- visitedSet : Set Identifier- synthesized attributes:- comments : [String]- decls : Decls- gatherInstVisitNrs : Map Identifier Int- intra : Exprs- intraVars : Set String- isNil : Bool- semNames : [String]- alternatives:- alternative Cons:- child hd : CVisit - child tl : CVisits - alternative Nil:--}--- cata-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 ((Set NontermIdent) ->- PragmaMap ->- (Set Identifier) ->- ([(Identifier,Type, Maybe (Maybe Type))]) ->- 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 ->- Attributes ->- ([Identifier]) ->- (NontermIdent -> Int -> [String] -> Code.Type) ->- (Set Identifier) ->- Bool ->- ( ([String]),Decls,(Map Identifier Int),Exprs,(Set String),Bool,([String]),(Set Identifier)))-data Inh_CVisits = Inh_CVisits {allNts_Inh_CVisits :: !((Set NontermIdent)),allPragmas_Inh_CVisits :: !(PragmaMap),aroundMap_Inh_CVisits :: !((Set Identifier)),children_Inh_CVisits :: !(([(Identifier,Type, Maybe (Maybe Type))])),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),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)}-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))}-wrap_CVisits :: T_CVisits ->- Inh_CVisits ->- Syn_CVisits -wrap_CVisits (T_CVisits sem ) (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 _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig ) =- (let ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet) =- (sem _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 _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig )- in (Syn_CVisits _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet ))-sem_CVisits_Cons :: T_CVisit ->- T_CVisits ->- T_CVisits -sem_CVisits_Cons (T_CVisit hd_ ) (T_CVisits tl_ ) =- (T_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- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwith_sig ->- (let _tlOnr :: Int- _lhsOisNil :: Bool- _hdOisLast :: Bool- _hdOnextIntra :: Exprs- _hdOnextIntraVars :: (Set String)- _lhsOintra :: Exprs- _lhsOintraVars :: (Set String)- _lhsOdecls :: Decls- _hdOdecls :: Decls- _lhsOcomments :: ([String])- _lhsOgatherInstVisitNrs :: (Map Identifier Int)- _lhsOsemNames :: ([String])- _lhsOvisitedSet :: (Set Identifier)- _hdOallNts :: (Set NontermIdent)- _hdOallPragmas :: PragmaMap- _hdOaroundMap :: (Set Identifier)- _hdOchildren :: ([(Identifier,Type, Maybe (Maybe Type))])- _hdOcon :: ConstructorIdent- _hdOcontextMap :: ContextMap- _hdOinh :: Attributes- _hdOinstVisitNrs :: (Map Identifier Int)- _hdOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _hdOnr :: Int- _hdOnt :: NontermIdent- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOsyn :: Attributes- _hdOterminals :: ([Identifier])- _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _hdOvisitedSet :: (Set Identifier)- _hdOwith_sig :: Bool- _tlOallNts :: (Set NontermIdent)- _tlOallPragmas :: PragmaMap- _tlOaroundMap :: (Set Identifier)- _tlOchildren :: ([(Identifier,Type, Maybe (Maybe Type))])- _tlOcon :: ConstructorIdent- _tlOcontextMap :: ContextMap- _tlOinh :: Attributes- _tlOinstVisitNrs :: (Map Identifier Int)- _tlOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _tlOnt :: NontermIdent- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOsyn :: Attributes- _tlOterminals :: ([Identifier])- _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _tlOvisitedSet :: (Set Identifier)- _tlOwith_sig :: Bool- _hdIcomments :: ([String])- _hdIdecls :: Decls- _hdIgatherInstVisitNrs :: (Map Identifier Int)- _hdIintra :: Exprs- _hdIintraVars :: (Set String)- _hdIsemNames :: ([String])- _hdIvisitedSet :: (Set Identifier)- _tlIcomments :: ([String])- _tlIdecls :: Decls- _tlIgatherInstVisitNrs :: (Map Identifier Int)- _tlIintra :: Exprs- _tlIintraVars :: (Set String)- _tlIisNil :: Bool- _tlIsemNames :: ([String])- _tlIvisitedSet :: (Set Identifier)- -- "GenerateCode.ag"(line 275, column 11)- _tlOnr =- ({-# LINE 275 "GenerateCode.ag" #-}- _lhsInr + 1- {-# LINE 5367 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 288, column 12)- _lhsOisNil =- ({-# LINE 288 "GenerateCode.ag" #-}- False- {-# LINE 5372 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 289, column 12)- _hdOisLast =- ({-# LINE 289 "GenerateCode.ag" #-}- _tlIisNil- {-# LINE 5377 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 306, column 12)- _hdOnextIntra =- ({-# LINE 306 "GenerateCode.ag" #-}- _tlIintra- {-# LINE 5382 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 307, column 12)- _hdOnextIntraVars =- ({-# LINE 307 "GenerateCode.ag" #-}- _tlIintraVars- {-# LINE 5387 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 308, column 12)- _lhsOintra =- ({-# LINE 308 "GenerateCode.ag" #-}- _hdIintra- {-# LINE 5392 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 309, column 12)- _lhsOintraVars =- ({-# LINE 309 "GenerateCode.ag" #-}- _hdIintraVars- {-# LINE 5397 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 433, column 11)- _lhsOdecls =- ({-# LINE 433 "GenerateCode.ag" #-}- _hdIdecls- {-# LINE 5402 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 434, column 11)- _hdOdecls =- ({-# LINE 434 "GenerateCode.ag" #-}- _tlIdecls- {-# LINE 5407 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- _hdIcomments ++ _tlIcomments- {-# LINE 5412 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 553, column 44)- _lhsOgatherInstVisitNrs =- ({-# LINE 553 "GenerateCode.ag" #-}- _hdIgatherInstVisitNrs `Map.union` _tlIgatherInstVisitNrs- {-# LINE 5417 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 1125, column 61)- _lhsOsemNames =- ({-# LINE 1125 "GenerateCode.ag" #-}- _hdIsemNames ++ _tlIsemNames- {-# LINE 5422 "GenerateCode.hs" #-})- -- copy rule (up)- _lhsOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _tlIvisitedSet- {-# LINE 5427 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 5432 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOallPragmas =- ({-# LINE 73 "GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 5437 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 572 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 5442 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOchildren =- ({-# LINE 412 "GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 5447 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOcon =- ({-# LINE 89 "GenerateCode.ag" #-}- _lhsIcon- {-# LINE 5452 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOcontextMap =- ({-# LINE 115 "GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 5457 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 5462 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOinstVisitNrs =- ({-# LINE 552 "GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 5467 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 588 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 5472 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOnr =- ({-# LINE 271 "GenerateCode.ag" #-}- _lhsInr- {-# LINE 5477 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 5482 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 5487 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 5492 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 5497 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 5502 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 5507 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 5512 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 5517 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 5522 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 5527 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 5532 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 5537 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 5542 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 5547 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 5552 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 5557 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 5562 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOparamInstMap =- ({-# LINE 101 "GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 5567 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 5572 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 5577 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 5582 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOterminals =- ({-# LINE 90 "GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 5587 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 5592 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 5597 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOwith_sig =- ({-# LINE 844 "GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 5602 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 5607 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOallPragmas =- ({-# LINE 73 "GenerateCode.ag" #-}- _lhsIallPragmas- {-# LINE 5612 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 572 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 5617 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOchildren =- ({-# LINE 412 "GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 5622 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOcon =- ({-# LINE 89 "GenerateCode.ag" #-}- _lhsIcon- {-# LINE 5627 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOcontextMap =- ({-# LINE 115 "GenerateCode.ag" #-}- _lhsIcontextMap- {-# LINE 5632 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 5637 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOinstVisitNrs =- ({-# LINE 552 "GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 5642 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 588 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 5647 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 5652 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 5657 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 5662 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 5667 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 5672 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 5677 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 5682 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 5687 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 5692 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 5697 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 5702 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 5707 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 5712 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 5717 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 5722 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 5727 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 5732 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOparamInstMap =- ({-# LINE 101 "GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 5737 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 5742 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 5747 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 5752 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOterminals =- ({-# LINE 90 "GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 5757 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 5762 "GenerateCode.hs" #-})- -- copy rule (chain)- _tlOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _hdIvisitedSet- {-# LINE 5767 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOwith_sig =- ({-# LINE 844 "GenerateCode.ag" #-}- _lhsIwith_sig- {-# LINE 5772 "GenerateCode.hs" #-})- ( _hdIcomments,_hdIdecls,_hdIgatherInstVisitNrs,_hdIintra,_hdIintraVars,_hdIsemNames,_hdIvisitedSet) =- (hd_ _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 _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwith_sig )- ( _tlIcomments,_tlIdecls,_tlIgatherInstVisitNrs,_tlIintra,_tlIintraVars,_tlIisNil,_tlIsemNames,_tlIvisitedSet) =- (tl_ _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 _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwith_sig )- in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet))) )-sem_CVisits_Nil :: T_CVisits -sem_CVisits_Nil =- (T_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- _lhsIsyn- _lhsIterminals- _lhsIunfoldSemDom- _lhsIvisitedSet- _lhsIwith_sig ->- (let _lhsOisNil :: Bool- _lhsOintra :: Exprs- _lhsOintraVars :: (Set String)- _lhsOdecls :: Decls- _lhsOcomments :: ([String])- _lhsOgatherInstVisitNrs :: (Map Identifier Int)- _lhsOsemNames :: ([String])- _lhsOvisitedSet :: (Set Identifier)- -- "GenerateCode.ag"(line 290, column 10)- _lhsOisNil =- ({-# LINE 290 "GenerateCode.ag" #-}- True- {-# LINE 5827 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 310, column 10)- _lhsOintra =- ({-# LINE 310 "GenerateCode.ag" #-}- []- {-# LINE 5832 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 311, column 10)- _lhsOintraVars =- ({-# LINE 311 "GenerateCode.ag" #-}- Set.empty- {-# LINE 5837 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 432, column 11)- _lhsOdecls =- ({-# LINE 432 "GenerateCode.ag" #-}- []- {-# LINE 5842 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- []- {-# LINE 5847 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 553, column 44)- _lhsOgatherInstVisitNrs =- ({-# LINE 553 "GenerateCode.ag" #-}- Map.empty- {-# LINE 5852 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 1125, column 61)- _lhsOsemNames =- ({-# LINE 1125 "GenerateCode.ag" #-}- []- {-# LINE 5857 "GenerateCode.hs" #-})- -- copy rule (chain)- _lhsOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 5862 "GenerateCode.hs" #-})- in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet))) )--- DeclBlocks ---------------------------------------------------{-- visit 0:- inherited attributes:- blockNr : Int- lastExprVars : [String]- nextVisitDecls : [Decl]- optCase : Bool- prefix : String- synthesized attributes:- callExpr : Expr- decls : [Decl]- freeVars : [String]- alternatives:- alternative DeclBlock:- child defs : {[Decl]}- child visit : {Decl}- child next : DeclBlocks - visit 0:- local lambdaName : _- local pragmaDecl : _- local freeVars : _- local decl : _- alternative DeclTerminator:- child defs : {[Decl]}- child result : {Expr}- visit 0:- local lambdaName : _- local pragmaDecl : _- local freeVars : _--}--- cata-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 (Int ->- ([String]) ->- ([Decl]) ->- Bool ->- String ->- ( Expr,([Decl]),([String])))-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]))}-wrap_DeclBlocks :: T_DeclBlocks ->- Inh_DeclBlocks ->- Syn_DeclBlocks -wrap_DeclBlocks (T_DeclBlocks sem ) (Inh_DeclBlocks _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix ) =- (let ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars) =- (sem _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix )- in (Syn_DeclBlocks _lhsOcallExpr _lhsOdecls _lhsOfreeVars ))-sem_DeclBlocks_DeclBlock :: ([Decl]) ->- Decl ->- T_DeclBlocks ->- T_DeclBlocks -sem_DeclBlocks_DeclBlock defs_ visit_ (T_DeclBlocks next_ ) =- (T_DeclBlocks (\ _lhsIblockNr- _lhsIlastExprVars- _lhsInextVisitDecls- _lhsIoptCase- _lhsIprefix ->- (let _nextOblockNr :: Int- _lhsOcallExpr :: Expr- _lhsOdecls :: ([Decl])- _lhsOfreeVars :: ([String])- _nextOlastExprVars :: ([String])- _nextOnextVisitDecls :: ([Decl])- _nextOoptCase :: Bool- _nextOprefix :: String- _nextIcallExpr :: Expr- _nextIdecls :: ([Decl])- _nextIfreeVars :: ([String])- -- "GenerateCode.ag"(line 654, column 7)- _nextOblockNr =- ({-# LINE 654 "GenerateCode.ag" #-}- _lhsIblockNr + 1- {-# LINE 5943 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 659, column 7)- _lambdaName =- ({-# LINE 659 "GenerateCode.ag" #-}- _lhsIprefix ++ "_block" ++ show _lhsIblockNr- {-# LINE 5948 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 660, column 7)- _pragmaDecl =- ({-# LINE 660 "GenerateCode.ag" #-}- PragmaDecl ("NOINLINE " ++ _lambdaName )- {-# LINE 5953 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 661, column 7)- _lhsOcallExpr =- ({-# LINE 661 "GenerateCode.ag" #-}- App _lambdaName (map SimpleExpr _freeVars )- {-# LINE 5958 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 665, column 7)- _freeVars =- ({-# LINE 665 "GenerateCode.ag" #-}- freevars _nextIfreeVars (visit_ : defs_)- {-# LINE 5963 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 672, column 7)- _decl =- ({-# LINE 672 "GenerateCode.ag" #-}- mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ [visit_]) _nextIcallExpr- {-# LINE 5968 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 673, column 7)- _lhsOdecls =- ({-# LINE 673 "GenerateCode.ag" #-}- (if _lhsIblockNr > 1 then [_pragmaDecl ] else []) ++ [_decl ] ++ _nextIdecls- {-# LINE 5973 "GenerateCode.hs" #-})- -- copy rule (from local)- _lhsOfreeVars =- ({-# LINE 656 "GenerateCode.ag" #-}- _freeVars- {-# LINE 5978 "GenerateCode.hs" #-})- -- copy rule (down)- _nextOlastExprVars =- ({-# LINE 640 "GenerateCode.ag" #-}- _lhsIlastExprVars- {-# LINE 5983 "GenerateCode.hs" #-})- -- copy rule (down)- _nextOnextVisitDecls =- ({-# LINE 640 "GenerateCode.ag" #-}- _lhsInextVisitDecls- {-# LINE 5988 "GenerateCode.hs" #-})- -- copy rule (down)- _nextOoptCase =- ({-# LINE 640 "GenerateCode.ag" #-}- _lhsIoptCase- {-# LINE 5993 "GenerateCode.hs" #-})- -- copy rule (down)- _nextOprefix =- ({-# LINE 640 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 5998 "GenerateCode.hs" #-})- ( _nextIcallExpr,_nextIdecls,_nextIfreeVars) =- (next_ _nextOblockNr _nextOlastExprVars _nextOnextVisitDecls _nextOoptCase _nextOprefix )- in ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars))) )-sem_DeclBlocks_DeclTerminator :: ([Decl]) ->- Expr ->- T_DeclBlocks -sem_DeclBlocks_DeclTerminator defs_ result_ =- (T_DeclBlocks (\ _lhsIblockNr- _lhsIlastExprVars- _lhsInextVisitDecls- _lhsIoptCase- _lhsIprefix ->- (let _lhsOcallExpr :: Expr- _lhsOdecls :: ([Decl])- _lhsOfreeVars :: ([String])- -- "GenerateCode.ag"(line 659, column 7)- _lambdaName =- ({-# LINE 659 "GenerateCode.ag" #-}- _lhsIprefix ++ "_block" ++ show _lhsIblockNr- {-# LINE 6018 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 660, column 7)- _pragmaDecl =- ({-# LINE 660 "GenerateCode.ag" #-}- PragmaDecl ("NOINLINE " ++ _lambdaName )- {-# LINE 6023 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 661, column 7)- _lhsOcallExpr =- ({-# LINE 661 "GenerateCode.ag" #-}- App _lambdaName (map SimpleExpr _freeVars )- {-# LINE 6028 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 663, column 7)- _freeVars =- ({-# LINE 663 "GenerateCode.ag" #-}- freevars _lhsIlastExprVars (defs_ ++ _lhsInextVisitDecls)- {-# LINE 6033 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 670, column 7)- _lhsOdecls =- ({-# LINE 670 "GenerateCode.ag" #-}- [ mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ _lhsInextVisitDecls) result_ ]- {-# LINE 6038 "GenerateCode.hs" #-})- -- copy rule (from local)- _lhsOfreeVars =- ({-# LINE 656 "GenerateCode.ag" #-}- _freeVars- {-# LINE 6043 "GenerateCode.hs" #-})- in ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars))) )--- DeclBlocksRoot -----------------------------------------------{-- visit 0:- inherited attributes:- lastExprVars : [String]- nextVisitDecls : [Decl]- optCase : Bool- prefix : String- synthesized attributes:- firstCall : Expr- lambdas : [Decl]- alternatives:- alternative DeclBlocksRoot:- child blocks : DeclBlocks --}--- cata-sem_DeclBlocksRoot :: DeclBlocksRoot ->- T_DeclBlocksRoot -sem_DeclBlocksRoot (DeclBlocksRoot _blocks ) =- (sem_DeclBlocksRoot_DeclBlocksRoot (sem_DeclBlocks _blocks ) )--- semantic domain-newtype T_DeclBlocksRoot = T_DeclBlocksRoot (([String]) ->- ([Decl]) ->- Bool ->- String ->- ( Expr,([Decl])))-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]))}-wrap_DeclBlocksRoot :: T_DeclBlocksRoot ->- Inh_DeclBlocksRoot ->- Syn_DeclBlocksRoot -wrap_DeclBlocksRoot (T_DeclBlocksRoot sem ) (Inh_DeclBlocksRoot _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix ) =- (let ( _lhsOfirstCall,_lhsOlambdas) =- (sem _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix )- in (Syn_DeclBlocksRoot _lhsOfirstCall _lhsOlambdas ))-sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks ->- T_DeclBlocksRoot -sem_DeclBlocksRoot_DeclBlocksRoot (T_DeclBlocks blocks_ ) =- (T_DeclBlocksRoot (\ _lhsIlastExprVars- _lhsInextVisitDecls- _lhsIoptCase- _lhsIprefix ->- (let _lhsOlambdas :: ([Decl])- _lhsOfirstCall :: Expr- _blocksOblockNr :: Int- _blocksOlastExprVars :: ([String])- _blocksOnextVisitDecls :: ([Decl])- _blocksOoptCase :: Bool- _blocksOprefix :: String- _blocksIcallExpr :: Expr- _blocksIdecls :: ([Decl])- _blocksIfreeVars :: ([String])- -- "GenerateCode.ag"(line 645, column 7)- _lhsOlambdas =- ({-# LINE 645 "GenerateCode.ag" #-}- _blocksIdecls- {-# LINE 6101 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 646, column 7)- _lhsOfirstCall =- ({-# LINE 646 "GenerateCode.ag" #-}- _blocksIcallExpr- {-# LINE 6106 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 651, column 7)- _blocksOblockNr =- ({-# LINE 651 "GenerateCode.ag" #-}- 1- {-# LINE 6111 "GenerateCode.hs" #-})- -- copy rule (down)- _blocksOlastExprVars =- ({-# LINE 640 "GenerateCode.ag" #-}- _lhsIlastExprVars- {-# LINE 6116 "GenerateCode.hs" #-})- -- copy rule (down)- _blocksOnextVisitDecls =- ({-# LINE 640 "GenerateCode.ag" #-}- _lhsInextVisitDecls- {-# LINE 6121 "GenerateCode.hs" #-})- -- copy rule (down)- _blocksOoptCase =- ({-# LINE 640 "GenerateCode.ag" #-}- _lhsIoptCase- {-# LINE 6126 "GenerateCode.hs" #-})- -- copy rule (down)- _blocksOprefix =- ({-# LINE 640 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 6131 "GenerateCode.hs" #-})- ( _blocksIcallExpr,_blocksIdecls,_blocksIfreeVars) =- (blocks_ _blocksOblockNr _blocksOlastExprVars _blocksOnextVisitDecls _blocksOoptCase _blocksOprefix )- in ( _lhsOfirstCall,_lhsOlambdas))) )--- Pattern ------------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - definedInsts : [Identifier]- patternAttributes : [(Identifier, Identifier)]- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - child parts : Patterns - visit 0:- local copy : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local copy : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local copy : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern (Alias _field _attr _pat _parts ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )-sem_Pattern (Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern (Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern (Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern (Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (( Pattern ,([Identifier]),([(Identifier, Identifier)])))-data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern ),definedInsts_Syn_Pattern :: !(([Identifier])),patternAttributes_Syn_Pattern :: !(([(Identifier, Identifier)]))}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes) =- (sem )- in (Syn_Pattern _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Patterns ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - _patIcopy :: Pattern - _patIdefinedInsts :: ([Identifier])- _patIpatternAttributes :: ([(Identifier, Identifier)])- _partsIcopy :: Patterns - _partsIdefinedInsts :: ([Identifier])- _partsIpatternAttributes :: ([(Identifier, Identifier)])- -- "GenerateCode.ag"(line 256, column 11)- _lhsOdefinedInsts =- ({-# LINE 256 "GenerateCode.ag" #-}- (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts- {-# LINE 6212 "GenerateCode.hs" #-})- -- "GenerateCode.ag"(line 264, column 7)- _lhsOpatternAttributes =- ({-# LINE 264 "GenerateCode.ag" #-}- (field_,attr_) : (_patIpatternAttributes ++ _partsIpatternAttributes)- {-# LINE 6217 "GenerateCode.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 6222 "GenerateCode.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 6227 "GenerateCode.hs" #-})- ( _patIcopy,_patIdefinedInsts,_patIpatternAttributes) =- (pat_ )- ( _partsIcopy,_partsIdefinedInsts,_partsIpatternAttributes) =- (parts_ )- in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - _patsIdefinedInsts :: ([Identifier])- _patsIpatternAttributes :: ([(Identifier, Identifier)])- -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- _patsIdefinedInsts- {-# LINE 6247 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 261, column 47)- _lhsOpatternAttributes =- ({-# LINE 261 "GenerateCode.ag" #-}- _patsIpatternAttributes- {-# LINE 6252 "GenerateCode.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 6257 "GenerateCode.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 6262 "GenerateCode.hs" #-})- ( _patsIcopy,_patsIdefinedInsts,_patsIpatternAttributes) =- (pats_ )- in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - _patIcopy :: Pattern - _patIdefinedInsts :: ([Identifier])- _patIpatternAttributes :: ([(Identifier, Identifier)])- -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- _patIdefinedInsts- {-# LINE 6279 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 261, column 47)- _lhsOpatternAttributes =- ({-# LINE 261 "GenerateCode.ag" #-}- _patIpatternAttributes- {-# LINE 6284 "GenerateCode.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 6289 "GenerateCode.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 6294 "GenerateCode.hs" #-})- ( _patIcopy,_patIdefinedInsts,_patIpatternAttributes) =- (pat_ )- in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - _patsIdefinedInsts :: ([Identifier])- _patsIpatternAttributes :: ([(Identifier, Identifier)])- -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- _patsIdefinedInsts- {-# LINE 6312 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 261, column 47)- _lhsOpatternAttributes =- ({-# LINE 261 "GenerateCode.ag" #-}- _patsIpatternAttributes- {-# LINE 6317 "GenerateCode.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 6322 "GenerateCode.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 6327 "GenerateCode.hs" #-})- ( _patsIcopy,_patsIdefinedInsts,_patsIpatternAttributes) =- (pats_ )- in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =- (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern - -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- []- {-# LINE 6341 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 261, column 47)- _lhsOpatternAttributes =- ({-# LINE 261 "GenerateCode.ag" #-}- []- {-# LINE 6346 "GenerateCode.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Underscore pos_- {-# LINE 6351 "GenerateCode.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 6356 "GenerateCode.hs" #-})- in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )--- Patterns -----------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - definedInsts : [Identifier]- patternAttributes : [(Identifier, Identifier)]- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-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 (( Patterns ,([Identifier]),([(Identifier, Identifier)])))-data Inh_Patterns = Inh_Patterns {}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns ),definedInsts_Syn_Patterns :: !(([Identifier])),patternAttributes_Syn_Patterns :: !(([(Identifier, Identifier)]))}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes) =- (sem )- in (Syn_Patterns _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Patterns - _hdIcopy :: Pattern - _hdIdefinedInsts :: ([Identifier])- _hdIpatternAttributes :: ([(Identifier, Identifier)])- _tlIcopy :: Patterns - _tlIdefinedInsts :: ([Identifier])- _tlIpatternAttributes :: ([(Identifier, Identifier)])- -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 6408 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 261, column 47)- _lhsOpatternAttributes =- ({-# LINE 261 "GenerateCode.ag" #-}- _hdIpatternAttributes ++ _tlIpatternAttributes- {-# LINE 6413 "GenerateCode.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 6418 "GenerateCode.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 6423 "GenerateCode.hs" #-})- ( _hdIcopy,_hdIdefinedInsts,_hdIpatternAttributes) =- (hd_ )- ( _tlIcopy,_tlIdefinedInsts,_tlIpatternAttributes) =- (tl_ )- in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (let _lhsOdefinedInsts :: ([Identifier])- _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Patterns - -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- []- {-# LINE 6438 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 261, column 47)- _lhsOpatternAttributes =- ({-# LINE 261 "GenerateCode.ag" #-}- []- {-# LINE 6443 "GenerateCode.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- []- {-# LINE 6448 "GenerateCode.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 6453 "GenerateCode.hs" #-})- in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )--- Sequence -----------------------------------------------------{-- visit 0:- inherited attributes:- allNts : Set NontermIdent- aroundMap : Set Identifier- children : [(Identifier,Type,Maybe (Maybe Type))]- con : ConstructorIdent- inh : Attributes- instVisitNrs : Map Identifier Int- lastExpr : Expr- mergeMap : Map Identifier (Identifier, [Identifier])- nr : Int- nt : NontermIdent- o_case : Bool- o_cata : Bool- o_costcentre : Bool- o_data : Maybe Bool- o_linePragmas : Bool- o_monadic : Bool- o_newtypes : Bool- o_pretty : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_splitsems : Bool- o_strictwrap : Bool- o_traces : Bool- o_unbox : Bool- options : Options- paramInstMap : Map Identifier (NontermIdent, [String])- paramMap : ParamMap- prefix : String- syn : Attributes- terminals : [Identifier]- unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type- what : String- chained attributes:- declsAbove : [Decl]- visitedSet : Set Identifier- synthesized attributes:- allTpsFound : Bool- blockDecls : DeclBlocks - comments : [String]- decls : Decls- definedInsts : [Identifier]- exprs : Exprs- tSigs : [Decl]- tps : [Type]- usedVars : Set String- alternatives:- alternative Cons:- child hd : CRule - child tl : Sequence - alternative Nil:--}--- cata-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 ((Set NontermIdent) ->- (Set Identifier) ->- ([(Identifier,Type,Maybe (Maybe Type))]) ->- 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 ->- ( Bool,DeclBlocks ,([String]),Decls,([Decl]),([Identifier]),Exprs,([Decl]),([Type]),(Set String),(Set Identifier)))-data Inh_Sequence = Inh_Sequence {allNts_Inh_Sequence :: !((Set NontermIdent)),aroundMap_Inh_Sequence :: !((Set Identifier)),children_Inh_Sequence :: !(([(Identifier,Type,Maybe (Maybe Type))])),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))}-wrap_Sequence :: T_Sequence ->- Inh_Sequence ->- Syn_Sequence -wrap_Sequence (T_Sequence sem ) (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 ) =- (let ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet) =- (sem _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 )- in (Syn_Sequence _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet ))-sem_Sequence_Cons :: T_CRule ->- T_Sequence ->- T_Sequence -sem_Sequence_Cons (T_CRule hd_ ) (T_Sequence tl_ ) =- (T_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 ->- (let _lhsOblockDecls :: DeclBlocks - _lhsOallTpsFound :: Bool- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOdefinedInsts :: ([Identifier])- _lhsOexprs :: Exprs- _lhsOtSigs :: ([Decl])- _lhsOtps :: ([Type])- _lhsOusedVars :: (Set String)- _lhsOdeclsAbove :: ([Decl])- _lhsOvisitedSet :: (Set Identifier)- _hdOallNts :: (Set NontermIdent)- _hdOaroundMap :: (Set Identifier)- _hdOchildren :: ([(Identifier,Type,Maybe (Maybe Type))])- _hdOcon :: ConstructorIdent- _hdOdeclsAbove :: ([Decl])- _hdOinh :: Attributes- _hdOinstVisitNrs :: (Map Identifier Int)- _hdOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _hdOnr :: Int- _hdOnt :: NontermIdent- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_costcentre :: Bool- _hdOo_data :: (Maybe Bool)- _hdOo_linePragmas :: Bool- _hdOo_monadic :: Bool- _hdOo_newtypes :: Bool- _hdOo_pretty :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_splitsems :: Bool- _hdOo_strictwrap :: Bool- _hdOo_traces :: Bool- _hdOo_unbox :: Bool- _hdOoptions :: Options- _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _hdOparamMap :: ParamMap- _hdOprefix :: String- _hdOsyn :: Attributes- _hdOterminals :: ([Identifier])- _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _hdOvisitedSet :: (Set Identifier)- _hdOwhat :: String- _tlOallNts :: (Set NontermIdent)- _tlOaroundMap :: (Set Identifier)- _tlOchildren :: ([(Identifier,Type,Maybe (Maybe Type))])- _tlOcon :: ConstructorIdent- _tlOdeclsAbove :: ([Decl])- _tlOinh :: Attributes- _tlOinstVisitNrs :: (Map Identifier Int)- _tlOlastExpr :: Expr- _tlOmergeMap :: (Map Identifier (Identifier, [Identifier]))- _tlOnr :: Int- _tlOnt :: NontermIdent- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_costcentre :: Bool- _tlOo_data :: (Maybe Bool)- _tlOo_linePragmas :: Bool- _tlOo_monadic :: Bool- _tlOo_newtypes :: Bool- _tlOo_pretty :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_splitsems :: Bool- _tlOo_strictwrap :: Bool- _tlOo_traces :: Bool- _tlOo_unbox :: Bool- _tlOoptions :: Options- _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))- _tlOparamMap :: ParamMap- _tlOprefix :: String- _tlOsyn :: Attributes- _tlOterminals :: ([Identifier])- _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)- _tlOvisitedSet :: (Set Identifier)- _tlOwhat :: String- _hdIallTpsFound :: Bool- _hdIbldBlocksFun :: (DeclBlocks -> DeclBlocks)- _hdIcomments :: ([String])- _hdIdecls :: Decls- _hdIdeclsAbove :: ([Decl])- _hdIdefinedInsts :: ([Identifier])- _hdIexprs :: Exprs- _hdItSigs :: ([Decl])- _hdItps :: ([Type])- _hdIusedVars :: (Set String)- _hdIvisitedSet :: (Set Identifier)- _tlIallTpsFound :: Bool- _tlIblockDecls :: DeclBlocks - _tlIcomments :: ([String])- _tlIdecls :: Decls- _tlIdeclsAbove :: ([Decl])- _tlIdefinedInsts :: ([Identifier])- _tlIexprs :: Exprs- _tlItSigs :: ([Decl])- _tlItps :: ([Type])- _tlIusedVars :: (Set String)- _tlIvisitedSet :: (Set Identifier)- -- "GenerateCode.ag"(line 614, column 7)- _lhsOblockDecls =- ({-# LINE 614 "GenerateCode.ag" #-}- _hdIbldBlocksFun _tlIblockDecls- {-# LINE 6707 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 418, column 39)- _lhsOallTpsFound =- ({-# LINE 418 "GenerateCode.ag" #-}- _hdIallTpsFound && _tlIallTpsFound- {-# LINE 6712 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- _hdIcomments ++ _tlIcomments- {-# LINE 6717 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 150, column 34)- _lhsOdecls =- ({-# LINE 150 "GenerateCode.ag" #-}- _hdIdecls ++ _tlIdecls- {-# LINE 6722 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 6727 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 327, column 34)- _lhsOexprs =- ({-# LINE 327 "GenerateCode.ag" #-}- _hdIexprs ++ _tlIexprs- {-# LINE 6732 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 356, column 33)- _lhsOtSigs =- ({-# LINE 356 "GenerateCode.ag" #-}- _hdItSigs ++ _tlItSigs- {-# LINE 6737 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 417, column 31)- _lhsOtps =- ({-# LINE 417 "GenerateCode.ag" #-}- _hdItps ++ _tlItps- {-# LINE 6742 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 345, column 37)- _lhsOusedVars =- ({-# LINE 345 "GenerateCode.ag" #-}- _hdIusedVars `Set.union` _tlIusedVars- {-# LINE 6747 "GenerateCode.hs" #-})- -- copy rule (up)- _lhsOdeclsAbove =- ({-# LINE 600 "GenerateCode.ag" #-}- _tlIdeclsAbove- {-# LINE 6752 "GenerateCode.hs" #-})- -- copy rule (up)- _lhsOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _tlIvisitedSet- {-# LINE 6757 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 6762 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 572 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 6767 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOchildren =- ({-# LINE 252 "GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 6772 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOcon =- ({-# LINE 89 "GenerateCode.ag" #-}- _lhsIcon- {-# LINE 6777 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOdeclsAbove =- ({-# LINE 600 "GenerateCode.ag" #-}- _lhsIdeclsAbove- {-# LINE 6782 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 6787 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOinstVisitNrs =- ({-# LINE 552 "GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 6792 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 588 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 6797 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOnr =- ({-# LINE 271 "GenerateCode.ag" #-}- _lhsInr- {-# LINE 6802 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 6807 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 6812 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 6817 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 6822 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 6827 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 6832 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 6837 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 6842 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 6847 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 6852 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 6857 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 6862 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 6867 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 6872 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 6877 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 6882 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 6887 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOparamInstMap =- ({-# LINE 101 "GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 6892 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 6897 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 6902 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 6907 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOterminals =- ({-# LINE 90 "GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 6912 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 6917 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 6922 "GenerateCode.hs" #-})- -- copy rule (down)- _hdOwhat =- ({-# LINE 863 "GenerateCode.ag" #-}- _lhsIwhat- {-# LINE 6927 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOallNts =- ({-# LINE 127 "GenerateCode.ag" #-}- _lhsIallNts- {-# LINE 6932 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 572 "GenerateCode.ag" #-}- _lhsIaroundMap- {-# LINE 6937 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOchildren =- ({-# LINE 252 "GenerateCode.ag" #-}- _lhsIchildren- {-# LINE 6942 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOcon =- ({-# LINE 89 "GenerateCode.ag" #-}- _lhsIcon- {-# LINE 6947 "GenerateCode.hs" #-})- -- copy rule (chain)- _tlOdeclsAbove =- ({-# LINE 600 "GenerateCode.ag" #-}- _hdIdeclsAbove- {-# LINE 6952 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOinh =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIinh- {-# LINE 6957 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOinstVisitNrs =- ({-# LINE 552 "GenerateCode.ag" #-}- _lhsIinstVisitNrs- {-# LINE 6962 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOlastExpr =- ({-# LINE 598 "GenerateCode.ag" #-}- _lhsIlastExpr- {-# LINE 6967 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 588 "GenerateCode.ag" #-}- _lhsImergeMap- {-# LINE 6972 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOnr =- ({-# LINE 271 "GenerateCode.ag" #-}- _lhsInr- {-# LINE 6977 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOnt =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsInt- {-# LINE 6982 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_case =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_case- {-# LINE 6987 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_cata =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_cata- {-# LINE 6992 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_costcentre =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_costcentre- {-# LINE 6997 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_data =- ({-# LINE 48 "GenerateCode.ag" #-}- _lhsIo_data- {-# LINE 7002 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_linePragmas =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_linePragmas- {-# LINE 7007 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_monadic =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_monadic- {-# LINE 7012 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_newtypes- {-# LINE 7017 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_pretty =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_pretty- {-# LINE 7022 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_rename =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_rename- {-# LINE 7027 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sem =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sem- {-# LINE 7032 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_sig =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_sig- {-# LINE 7037 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_splitsems =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_splitsems- {-# LINE 7042 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_strictwrap =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_strictwrap- {-# LINE 7047 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_traces =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_traces- {-# LINE 7052 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 47 "GenerateCode.ag" #-}- _lhsIo_unbox- {-# LINE 7057 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOoptions =- ({-# LINE 50 "GenerateCode.ag" #-}- _lhsIoptions- {-# LINE 7062 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOparamInstMap =- ({-# LINE 101 "GenerateCode.ag" #-}- _lhsIparamInstMap- {-# LINE 7067 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOparamMap =- ({-# LINE 95 "GenerateCode.ag" #-}- _lhsIparamMap- {-# LINE 7072 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOprefix =- ({-# LINE 49 "GenerateCode.ag" #-}- _lhsIprefix- {-# LINE 7077 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOsyn =- ({-# LINE 84 "GenerateCode.ag" #-}- _lhsIsyn- {-# LINE 7082 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOterminals =- ({-# LINE 90 "GenerateCode.ag" #-}- _lhsIterminals- {-# LINE 7087 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOunfoldSemDom =- ({-# LINE 742 "GenerateCode.ag" #-}- _lhsIunfoldSemDom- {-# LINE 7092 "GenerateCode.hs" #-})- -- copy rule (chain)- _tlOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _hdIvisitedSet- {-# LINE 7097 "GenerateCode.hs" #-})- -- copy rule (down)- _tlOwhat =- ({-# LINE 863 "GenerateCode.ag" #-}- _lhsIwhat- {-# LINE 7102 "GenerateCode.hs" #-})- ( _hdIallTpsFound,_hdIbldBlocksFun,_hdIcomments,_hdIdecls,_hdIdeclsAbove,_hdIdefinedInsts,_hdIexprs,_hdItSigs,_hdItps,_hdIusedVars,_hdIvisitedSet) =- (hd_ _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 )- ( _tlIallTpsFound,_tlIblockDecls,_tlIcomments,_tlIdecls,_tlIdeclsAbove,_tlIdefinedInsts,_tlIexprs,_tlItSigs,_tlItps,_tlIusedVars,_tlIvisitedSet) =- (tl_ _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 )- in ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )-sem_Sequence_Nil :: T_Sequence -sem_Sequence_Nil =- (T_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 ->- (let _lhsOblockDecls :: DeclBlocks - _lhsOallTpsFound :: Bool- _lhsOcomments :: ([String])- _lhsOdecls :: Decls- _lhsOdefinedInsts :: ([Identifier])- _lhsOexprs :: Exprs- _lhsOtSigs :: ([Decl])- _lhsOtps :: ([Type])- _lhsOusedVars :: (Set String)- _lhsOdeclsAbove :: ([Decl])- _lhsOvisitedSet :: (Set Identifier)- -- "GenerateCode.ag"(line 616, column 7)- _lhsOblockDecls =- ({-# LINE 616 "GenerateCode.ag" #-}- DeclTerminator _lhsIdeclsAbove _lhsIlastExpr- {-# LINE 7160 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 418, column 39)- _lhsOallTpsFound =- ({-# LINE 418 "GenerateCode.ag" #-}- True- {-# LINE 7165 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 861, column 52)- _lhsOcomments =- ({-# LINE 861 "GenerateCode.ag" #-}- []- {-# LINE 7170 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 150, column 34)- _lhsOdecls =- ({-# LINE 150 "GenerateCode.ag" #-}- []- {-# LINE 7175 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 254, column 55)- _lhsOdefinedInsts =- ({-# LINE 254 "GenerateCode.ag" #-}- []- {-# LINE 7180 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 327, column 34)- _lhsOexprs =- ({-# LINE 327 "GenerateCode.ag" #-}- []- {-# LINE 7185 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 356, column 33)- _lhsOtSigs =- ({-# LINE 356 "GenerateCode.ag" #-}- []- {-# LINE 7190 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 417, column 31)- _lhsOtps =- ({-# LINE 417 "GenerateCode.ag" #-}- []- {-# LINE 7195 "GenerateCode.hs" #-})- -- use rule "GenerateCode.ag"(line 345, column 37)- _lhsOusedVars =- ({-# LINE 345 "GenerateCode.ag" #-}- Set.empty- {-# LINE 7200 "GenerateCode.hs" #-})- -- copy rule (chain)- _lhsOdeclsAbove =- ({-# LINE 600 "GenerateCode.ag" #-}- _lhsIdeclsAbove- {-# LINE 7205 "GenerateCode.hs" #-})- -- copy rule (chain)- _lhsOvisitedSet =- ({-# LINE 140 "GenerateCode.ag" #-}- _lhsIvisitedSet- {-# LINE 7210 "GenerateCode.hs" #-})+-- UUAGC 0.9.30 (GenerateCode.ag)+module GenerateCode where+{-# LINE 9 "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,intersect,(\\))+import Maybe(fromJust,isJust)++import Debug.Trace+{-# LINE 33 "../src-derived/GenerateCode.hs" #-}++{-# LINE 2 "./CodeSyntax.ag" #-}++import Patterns+import CommonTypes+import Data.Map(Map)+import Data.Set(Set)+{-# LINE 41 "../src-derived/GenerateCode.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 48 "../src-derived/GenerateCode.hs" #-}++{-# LINE 2 "./DeclBlocks.ag" #-}++import Code (Decl,Expr)+{-# LINE 53 "../src-derived/GenerateCode.hs" #-}+{-# LINE 107 "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'+{-# LINE 61 "../src-derived/GenerateCode.hs" #-}++{-# LINE 121 "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+{-# LINE 68 "../src-derived/GenerateCode.hs" #-}++{-# LINE 240 "GenerateCode.ag" #-}++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 81 "../src-derived/GenerateCode.hs" #-}++{-# LINE 406 "GenerateCode.ag" #-}++substSelf nt tp = case tp of+ NT t tps | t == _SELF -> Haskell (getName nt ++ " " ++ unwords tps)+ _ -> tp+{-# LINE 88 "../src-derived/GenerateCode.hs" #-}++{-# LINE 529 "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 nm params = TypeApp (SimpleType nm) (map SimpleType params)++isHigherOrder :: Maybe (Maybe Type) -> Bool+isHigherOrder (Just Nothing) = True+isHigherOrder _ = False++pickOrigType :: (Identifier, Type, Maybe (Maybe Type)) -> (Identifier, Type, Maybe (Maybe Type))+pickOrigType (nm, tp, virt@(Just (Just x))) = (nm, x, virt)+pickOrigType x = x+{-# LINE 112 "../src-derived/GenerateCode.hs" #-}++{-# LINE 625 "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 126 "../src-derived/GenerateCode.hs" #-}++{-# LINE 675 "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 149 "../src-derived/GenerateCode.hs" #-}++{-# LINE 753 "GenerateCode.ag" #-}++typeToCodeType :: Maybe NontermIdent -> [String] -> Type -> Code.Type+typeToCodeType mbNt params tp+ = case tp of+ NT nt tps | nt == _SELF -> NontermType (maybe "Unknown" getName mbNt) params+ | otherwise -> NontermType (getName nt) tps+ Haskell t -> SimpleType t++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 188 "../src-derived/GenerateCode.hs" #-}++{-# LINE 878 "GenerateCode.ag" #-}++-- for a virtual child that already existed as a child, returns +isFirstOrder :: Maybe (Maybe Type) -> Type -> Maybe Type+isFirstOrder Nothing tp = Just tp+isFirstOrder (Just x) _ = x+{-# LINE 196 "../src-derived/GenerateCode.hs" #-}++{-# LINE 898 "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++"}") tp+ in ( what ++ " " ++ x ++ replicate ((width - length x) `max` 0) ' ' ++ " : " ++ y )++{-# LINE 205 "../src-derived/GenerateCode.hs" #-}++{-# LINE 929 "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 _ _) exp = Case rhs [CaseAlt left exp]+oneCase (Resume _ nt left rhs) exp = ResumeExpr nt rhs left exp+oneCase _ exp = exp++-- Gives the name of the visit function+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 251 "../src-derived/GenerateCode.hs" #-}+-- CGrammar ----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ errors : Seq Error+ output : Program+ alternatives:+ alternative CGrammar:+ child typeSyns : {TypeSyns}+ child derivings : {Derivings}+ child wrappers : {Set NontermIdent}+ child nonts : CNonterminals + child pragmas : {PragmaMap}+ child paramMap : {ParamMap}+ child contextMap : {ContextMap}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Set Identifier))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))}+ child multivisit : {Bool}+ visit 0:+ local options : _+ local aroundMap : _+ local mergeMap : _+ local unfoldSemDom : _+-}+-- cata+sem_CGrammar :: CGrammar ->+ T_CGrammar +sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _aroundsMap _mergeMap _multivisit ) =+ (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts ) _pragmas _paramMap _contextMap _aroundsMap _mergeMap _multivisit )+-- semantic domain+newtype T_CGrammar = T_CGrammar (Options ->+ ( (Seq Error),Program))+data Inh_CGrammar = Inh_CGrammar {options_Inh_CGrammar :: !(Options)}+data Syn_CGrammar = Syn_CGrammar {errors_Syn_CGrammar :: !((Seq Error)),output_Syn_CGrammar :: !(Program)}+wrap_CGrammar :: T_CGrammar ->+ Inh_CGrammar ->+ Syn_CGrammar +wrap_CGrammar (T_CGrammar sem ) (Inh_CGrammar _lhsIoptions ) =+ (let ( _lhsOerrors,_lhsOoutput) = sem _lhsIoptions + in (Syn_CGrammar _lhsOerrors _lhsOoutput ))+sem_CGrammar_CGrammar :: TypeSyns ->+ Derivings ->+ (Set NontermIdent) ->+ T_CNonterminals ->+ PragmaMap ->+ ParamMap ->+ ContextMap ->+ (Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ Bool ->+ T_CGrammar +sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_ aroundsMap_ mergeMap_ multivisit_ =+ (T_CGrammar (\ _lhsIoptions ->+ (let _nontsOo_sig :: Bool+ _nontsOo_cata :: Bool+ _nontsOo_sem :: Bool+ _nontsOo_newtypes :: Bool+ _nontsOo_unbox :: Bool+ _nontsOo_case :: Bool+ _nontsOo_pretty :: Bool+ _nontsOo_rename :: Bool+ _nontsOo_strictwrap :: Bool+ _nontsOo_splitsems :: Bool+ _nontsOo_data :: (Maybe Bool)+ _nontsOprefix :: String+ _nontsOo_traces :: Bool+ _nontsOo_costcentre :: Bool+ _nontsOo_linePragmas :: Bool+ _nontsOo_monadic :: Bool+ _nontsOallPragmas :: PragmaMap+ _nontsOparamMap :: ParamMap+ _nontsOcontextMap :: ContextMap+ _nontsOallNts :: (Set NontermIdent)+ _nontsOwith_sig :: Bool+ _lhsOerrors :: (Seq Error)+ _lhsOoutput :: Program+ _nontsOtypeSyns :: TypeSyns+ _nontsOderivings :: Derivings+ _nontsOwrappers :: (Set NontermIdent)+ _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))+ _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))+ _nontsOoptions :: Options+ _nontsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _nontsIchunks :: Chunks+ _nontsIgathNts :: (Set NontermIdent)+ _nontsIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_sig =+ ({-# LINE 53 "GenerateCode.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 344 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_cata =+ ({-# LINE 54 "GenerateCode.ag" #-}+ folds _lhsIoptions+ {-# LINE 349 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_sem =+ ({-# LINE 55 "GenerateCode.ag" #-}+ semfuns _lhsIoptions+ {-# LINE 354 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_newtypes =+ ({-# LINE 56 "GenerateCode.ag" #-}+ newtypes _lhsIoptions+ {-# LINE 359 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_unbox =+ ({-# LINE 57 "GenerateCode.ag" #-}+ unbox _lhsIoptions+ {-# LINE 364 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_case =+ ({-# LINE 58 "GenerateCode.ag" #-}+ cases _lhsIoptions+ {-# LINE 369 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_pretty =+ ({-# LINE 59 "GenerateCode.ag" #-}+ attrInfo _lhsIoptions+ {-# LINE 374 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_rename =+ ({-# LINE 60 "GenerateCode.ag" #-}+ rename _lhsIoptions+ {-# LINE 379 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_strictwrap =+ ({-# LINE 61 "GenerateCode.ag" #-}+ strictWrap _lhsIoptions+ {-# LINE 384 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_splitsems =+ ({-# LINE 62 "GenerateCode.ag" #-}+ splitSems _lhsIoptions+ {-# LINE 389 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_data =+ ({-# LINE 63 "GenerateCode.ag" #-}+ if dataTypes _lhsIoptions then Just (strictData _lhsIoptions) else Nothing+ {-# LINE 394 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOprefix =+ ({-# LINE 64 "GenerateCode.ag" #-}+ prefix _lhsIoptions+ {-# LINE 399 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_traces =+ ({-# LINE 65 "GenerateCode.ag" #-}+ genTraces _lhsIoptions+ {-# LINE 404 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_costcentre =+ ({-# LINE 66 "GenerateCode.ag" #-}+ genCostCentres _lhsIoptions+ {-# LINE 409 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_linePragmas =+ ({-# LINE 67 "GenerateCode.ag" #-}+ genLinePragmas _lhsIoptions+ {-# LINE 414 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 53, column 17)+ _nontsOo_monadic =+ ({-# LINE 68 "GenerateCode.ag" #-}+ monadic _lhsIoptions+ {-# LINE 419 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 71, column 3)+ _options =+ ({-# LINE 71 "GenerateCode.ag" #-}+ _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && multivisit_ }+ {-# LINE 424 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 76, column 15)+ _nontsOallPragmas =+ ({-# LINE 76 "GenerateCode.ag" #-}+ pragmas_+ {-# LINE 429 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 98, column 14)+ _nontsOparamMap =+ ({-# LINE 98 "GenerateCode.ag" #-}+ paramMap_+ {-# LINE 434 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 119, column 7)+ _nontsOcontextMap =+ ({-# LINE 119 "GenerateCode.ag" #-}+ contextMap_+ {-# LINE 439 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 131, column 7)+ _nontsOallNts =+ ({-# LINE 131 "GenerateCode.ag" #-}+ _nontsIgathNts+ {-# LINE 444 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 574, column 34)+ _aroundMap =+ ({-# LINE 574 "GenerateCode.ag" #-}+ aroundsMap_+ {-# LINE 449 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 590, column 34)+ _mergeMap =+ ({-# LINE 590 "GenerateCode.ag" #-}+ mergeMap_+ {-# LINE 454 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 746, column 7)+ _unfoldSemDom =+ ({-# LINE 746 "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 463 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 847, column 14)+ _nontsOwith_sig =+ ({-# LINE 847 "GenerateCode.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 468 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 850, column 15)+ _lhsOerrors =+ ({-# LINE 850 "GenerateCode.ag" #-}+ Seq.empty+ {-# LINE 473 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 915, column 17)+ _lhsOoutput =+ ({-# LINE 915 "GenerateCode.ag" #-}+ Program _nontsIchunks multivisit_+ {-# LINE 478 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 980, column 14)+ _nontsOtypeSyns =+ ({-# LINE 980 "GenerateCode.ag" #-}+ typeSyns_+ {-# LINE 483 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 980, column 14)+ _nontsOderivings =+ ({-# LINE 981 "GenerateCode.ag" #-}+ derivings_+ {-# LINE 488 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 980, column 14)+ _nontsOwrappers =+ ({-# LINE 982 "GenerateCode.ag" #-}+ wrappers_+ {-# LINE 493 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _nontsOaroundMap =+ ({-# LINE 567 "GenerateCode.ag" #-}+ _aroundMap+ {-# LINE 498 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _nontsOmergeMap =+ ({-# LINE 583 "GenerateCode.ag" #-}+ _mergeMap+ {-# LINE 503 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _nontsOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _options+ {-# LINE 508 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _nontsOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _unfoldSemDom+ {-# LINE 513 "GenerateCode.hs" #-})+ ( _nontsIchunks,_nontsIgathNts,_nontsIsemDomUnfoldGath) =+ nonts_ _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 _nontsOtypeSyns _nontsOunfoldSemDom _nontsOwith_sig _nontsOwrappers + in ( _lhsOerrors,_lhsOoutput))) )+-- CInterface --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ inh : Attributes+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ synthesized attributes:+ comments : [String]+ semDom : [Decl]+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ wrapDecls : Decls+ alternatives:+ alternative CInterface:+ child seg : CSegments +-}+-- cata+sem_CInterface :: CInterface ->+ T_CInterface +sem_CInterface (CInterface _seg ) =+ (sem_CInterface_CInterface (sem_CSegments _seg ) )+-- semantic domain+newtype T_CInterface = T_CInterface (Attributes ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ Attributes ->+ ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))+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)}+wrap_CInterface :: T_CInterface ->+ Inh_CInterface ->+ Syn_CInterface +wrap_CInterface (T_CInterface sem ) (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 ) =+ (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) = sem _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 + in (Syn_CInterface _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls ))+sem_CInterface_CInterface :: T_CSegments ->+ T_CInterface +sem_CInterface_CInterface (T_CSegments seg_ ) =+ (T_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 ->+ (let _segOnr :: Int+ _lhsOsemDom :: ([Decl])+ _lhsOcomments :: ([String])+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _lhsOwrapDecls :: Decls+ _segOinh :: Attributes+ _segOnt :: NontermIdent+ _segOo_case :: Bool+ _segOo_cata :: Bool+ _segOo_costcentre :: Bool+ _segOo_data :: (Maybe Bool)+ _segOo_linePragmas :: Bool+ _segOo_monadic :: Bool+ _segOo_newtypes :: Bool+ _segOo_pretty :: Bool+ _segOo_rename :: Bool+ _segOo_sem :: Bool+ _segOo_sig :: Bool+ _segOo_splitsems :: Bool+ _segOo_strictwrap :: Bool+ _segOo_traces :: Bool+ _segOo_unbox :: Bool+ _segOoptions :: Options+ _segOparamMap :: ParamMap+ _segOprefix :: String+ _segOsyn :: Attributes+ _segIcomments :: ([String])+ _segIisNil :: Bool+ _segIsemDom :: ([Decl])+ _segIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _segIwrapDecls :: Decls+ -- "GenerateCode.ag"(line 277, column 17)+ _segOnr =+ ({-# LINE 277 "GenerateCode.ag" #-}+ 0+ {-# LINE 646 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 704, column 18)+ _lhsOsemDom =+ ({-# LINE 704 "GenerateCode.ag" #-}+ Comment "semantic domain" : _segIsemDom+ {-# LINE 651 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ _segIcomments+ {-# LINE 656 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 736, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 736 "GenerateCode.ag" #-}+ _segIsemDomUnfoldGath+ {-# LINE 661 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 822, column 52)+ _lhsOwrapDecls =+ ({-# LINE 822 "GenerateCode.ag" #-}+ _segIwrapDecls+ {-# LINE 666 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 671 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 676 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 681 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 686 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 691 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 696 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 701 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 706 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 711 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 716 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 721 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 726 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 731 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 736 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 741 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 746 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 751 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 756 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 761 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 766 "GenerateCode.hs" #-})+ -- copy rule (down)+ _segOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 771 "GenerateCode.hs" #-})+ ( _segIcomments,_segIisNil,_segIsemDom,_segIsemDomUnfoldGath,_segIwrapDecls) =+ seg_ _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 + in ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )+-- CNonterminal ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Map NontermIdent (Map ConstructorIdent (Set Identifier))+ contextMap : ContextMap+ derivings : Derivings+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ typeSyns : TypeSyns+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ wrappers : Set NontermIdent+ synthesized attributes:+ chunks : Chunks+ gathNts : Set NontermIdent+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ alternatives:+ alternative CNonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : CProductions + child inter : CInterface + visit 0:+ local _tup1 : {(Attributes,Attributes,NontermIdent)}+ local _tup2 : {(Attributes,Attributes,NontermIdent)}+ local aroundMap : _+ local mergeMap : _+ local semWrapper : _+ local comment : _+ local dataDef : _+ local cataFun : _+-}+-- cata+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 ((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 ->+ TypeSyns ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ Bool ->+ (Set NontermIdent) ->+ ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))+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),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)))}+wrap_CNonterminal :: T_CNonterminal ->+ Inh_CNonterminal ->+ Syn_CNonterminal +wrap_CNonterminal (T_CNonterminal sem ) (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 _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers ) =+ (let ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath) = sem _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 _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers + in (Syn_CNonterminal _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath ))+sem_CNonterminal_CNonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_CProductions ->+ T_CInterface ->+ T_CNonterminal +sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ (T_CProductions prods_ ) (T_CInterface inter_ ) =+ (T_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+ _lhsItypeSyns+ _lhsIunfoldSemDom+ _lhsIwith_sig+ _lhsIwrappers ->+ (let __tup1 :: ((Attributes,Attributes,NontermIdent))+ _interOinh :: Attributes+ _interOsyn :: Attributes+ _interOnt :: NontermIdent+ __tup2 :: ((Attributes,Attributes,NontermIdent))+ _prodsOinh :: Attributes+ _prodsOsyn :: Attributes+ _prodsOnt :: NontermIdent+ _lhsOgathNts :: (Set NontermIdent)+ _lhsOchunks :: Chunks+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _prodsOallNts :: (Set NontermIdent)+ _prodsOallPragmas :: PragmaMap+ _prodsOaroundMap :: (Map ConstructorIdent (Set Identifier))+ _prodsOcontextMap :: ContextMap+ _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ _prodsOo_case :: Bool+ _prodsOo_cata :: Bool+ _prodsOo_costcentre :: Bool+ _prodsOo_data :: (Maybe Bool)+ _prodsOo_linePragmas :: Bool+ _prodsOo_monadic :: Bool+ _prodsOo_newtypes :: Bool+ _prodsOo_pretty :: Bool+ _prodsOo_rename :: Bool+ _prodsOo_sem :: Bool+ _prodsOo_sig :: Bool+ _prodsOo_splitsems :: Bool+ _prodsOo_strictwrap :: Bool+ _prodsOo_traces :: Bool+ _prodsOo_unbox :: Bool+ _prodsOoptions :: Options+ _prodsOparamMap :: ParamMap+ _prodsOprefix :: String+ _prodsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _prodsOwith_sig :: Bool+ _interOo_case :: Bool+ _interOo_cata :: Bool+ _interOo_costcentre :: Bool+ _interOo_data :: (Maybe Bool)+ _interOo_linePragmas :: Bool+ _interOo_monadic :: Bool+ _interOo_newtypes :: Bool+ _interOo_pretty :: Bool+ _interOo_rename :: Bool+ _interOo_sem :: Bool+ _interOo_sig :: Bool+ _interOo_splitsems :: Bool+ _interOo_strictwrap :: Bool+ _interOo_traces :: Bool+ _interOo_unbox :: Bool+ _interOoptions :: Options+ _interOparamMap :: ParamMap+ _interOprefix :: String+ _prodsIcataAlts :: Decls+ _prodsIcomments :: ([String])+ _prodsIdataAlts :: DataAlts+ _prodsIdecls :: Decls+ _prodsIsemNames :: ([String])+ _interIcomments :: ([String])+ _interIsemDom :: ([Decl])+ _interIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _interIwrapDecls :: Decls+ -- "GenerateCode.ag"(line 86, column 26)+ __tup1 =+ ({-# LINE 86 "GenerateCode.ag" #-}+ (inh_,syn_,nt_)+ {-# LINE 975 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 86, column 26)+ (_interOinh,_,_) =+ ({-# LINE 86 "GenerateCode.ag" #-}+ __tup1+ {-# LINE 980 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 86, column 26)+ (_,_interOsyn,_) =+ ({-# LINE 86 "GenerateCode.ag" #-}+ __tup1+ {-# LINE 985 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 86, column 26)+ (_,_,_interOnt) =+ ({-# LINE 86 "GenerateCode.ag" #-}+ __tup1+ {-# LINE 990 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 87, column 25)+ __tup2 =+ ({-# LINE 87 "GenerateCode.ag" #-}+ (inh_,syn_,nt_)+ {-# LINE 995 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 87, column 25)+ (_prodsOinh,_,_) =+ ({-# LINE 87 "GenerateCode.ag" #-}+ __tup2+ {-# LINE 1000 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 87, column 25)+ (_,_prodsOsyn,_) =+ ({-# LINE 87 "GenerateCode.ag" #-}+ __tup2+ {-# LINE 1005 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 87, column 25)+ (_,_,_prodsOnt) =+ ({-# LINE 87 "GenerateCode.ag" #-}+ __tup2+ {-# LINE 1010 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 137, column 7)+ _lhsOgathNts =+ ({-# LINE 137 "GenerateCode.ag" #-}+ Set.singleton nt_+ {-# LINE 1015 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 575, column 34)+ _aroundMap =+ ({-# LINE 575 "GenerateCode.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundMap+ {-# LINE 1020 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 591, column 34)+ _mergeMap =+ ({-# LINE 591 "GenerateCode.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergeMap+ {-# LINE 1025 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 796, column 18)+ _semWrapper =+ ({-# LINE 796 "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 1053 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 857, column 18)+ _comment =+ ({-# LINE 857 "GenerateCode.ag" #-}+ Comment . unlines . map ind $ ( _interIcomments ++ ("alternatives:" : map ind _prodsIcomments) )+ {-# LINE 1058 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 918, column 19)+ _lhsOchunks =+ ({-# LINE 918 "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 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 1072 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 985, column 18)+ _dataDef =+ ({-# LINE 985 "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+ ]+ 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 1091 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 1017, column 18)+ _cataFun =+ ({-# LINE 1017 "GenerateCode.ag" #-}+ let appParams nm = TypeApp (SimpleType nm) (map SimpleType (map getName params_))+ evalTp | null params_ = id+ | otherwise = idEvalType+ tSig = TSig (cataname _lhsIprefix 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 "Map.map" [SimpleExpr $ cataname _lhsIprefix t', arg]+ _ -> arg+ lhs = Fun (cataname _lhsIprefix nt_) [arg]+ rhs = App "Map.foldWithKey" [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 "IntMap.map" [SimpleExpr $ cataname _lhsIprefix t', arg]+ _ -> arg+ lhs = Fun (cataname _lhsIprefix nt_) [arg]+ rhs = App "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]+ in Comment "cata" :+ (if _lhsIo_sig then [tSig] else []) +++ maybe _prodsIcataAlts special (lookup nt_ _lhsItypeSyns)+ {-# LINE 1176 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 736, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 736 "GenerateCode.ag" #-}+ _interIsemDomUnfoldGath+ {-# LINE 1181 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 1186 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOallPragmas =+ ({-# LINE 73 "GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 1191 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _prodsOaroundMap =+ ({-# LINE 570 "GenerateCode.ag" #-}+ _aroundMap+ {-# LINE 1196 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOcontextMap =+ ({-# LINE 115 "GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 1201 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _prodsOmergeMap =+ ({-# LINE 586 "GenerateCode.ag" #-}+ _mergeMap+ {-# LINE 1206 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 1211 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 1216 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 1221 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 1226 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 1231 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 1236 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1241 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 1246 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 1251 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 1256 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 1261 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 1266 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 1271 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 1276 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 1281 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 1286 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 1291 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 1296 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 1301 "GenerateCode.hs" #-})+ -- copy rule (down)+ _prodsOwith_sig =+ ({-# LINE 844 "GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 1306 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 1311 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 1316 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 1321 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 1326 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 1331 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 1336 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1341 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 1346 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 1351 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 1356 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 1361 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 1366 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 1371 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 1376 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 1381 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 1386 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 1391 "GenerateCode.hs" #-})+ -- copy rule (down)+ _interOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 1396 "GenerateCode.hs" #-})+ ( _prodsIcataAlts,_prodsIcomments,_prodsIdataAlts,_prodsIdecls,_prodsIsemNames) =+ prods_ _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 _prodsOsyn _prodsOunfoldSemDom _prodsOwith_sig + ( _interIcomments,_interIsemDom,_interIsemDomUnfoldGath,_interIwrapDecls) =+ inter_ _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 + in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )+-- CNonterminals -----------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Map NontermIdent (Map ConstructorIdent (Set Identifier))+ contextMap : ContextMap+ derivings : Derivings+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ typeSyns : TypeSyns+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ wrappers : Set NontermIdent+ synthesized attributes:+ chunks : Chunks+ gathNts : Set NontermIdent+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ alternatives:+ alternative Cons:+ child hd : CNonterminal + child tl : CNonterminals + alternative Nil:+-}+-- cata+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 ((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 ->+ TypeSyns ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ Bool ->+ (Set NontermIdent) ->+ ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))+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),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)))}+wrap_CNonterminals :: T_CNonterminals ->+ Inh_CNonterminals ->+ Syn_CNonterminals +wrap_CNonterminals (T_CNonterminals sem ) (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 _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers ) =+ (let ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath) = sem _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 _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers + in (Syn_CNonterminals _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath ))+sem_CNonterminals_Cons :: T_CNonterminal ->+ T_CNonterminals ->+ T_CNonterminals +sem_CNonterminals_Cons (T_CNonterminal hd_ ) (T_CNonterminals tl_ ) =+ (T_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+ _lhsItypeSyns+ _lhsIunfoldSemDom+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _lhsOchunks :: Chunks+ _lhsOgathNts :: (Set NontermIdent)+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _hdOallNts :: (Set NontermIdent)+ _hdOallPragmas :: PragmaMap+ _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))+ _hdOcontextMap :: ContextMap+ _hdOderivings :: Derivings+ _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOtypeSyns :: TypeSyns+ _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _hdOwith_sig :: Bool+ _hdOwrappers :: (Set NontermIdent)+ _tlOallNts :: (Set NontermIdent)+ _tlOallPragmas :: PragmaMap+ _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))+ _tlOcontextMap :: ContextMap+ _tlOderivings :: Derivings+ _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))))+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOtypeSyns :: TypeSyns+ _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _tlOwith_sig :: Bool+ _tlOwrappers :: (Set NontermIdent)+ _hdIchunks :: Chunks+ _hdIgathNts :: (Set NontermIdent)+ _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _tlIchunks :: Chunks+ _tlIgathNts :: (Set NontermIdent)+ _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ -- use rule "GenerateCode.ag"(line 910, column 49)+ _lhsOchunks =+ ({-# LINE 910 "GenerateCode.ag" #-}+ _hdIchunks ++ _tlIchunks+ {-# LINE 1588 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 133, column 47)+ _lhsOgathNts =+ ({-# LINE 133 "GenerateCode.ag" #-}+ _hdIgathNts `Set.union` _tlIgathNts+ {-# LINE 1593 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 736, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 736 "GenerateCode.ag" #-}+ _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath+ {-# LINE 1598 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 1603 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOallPragmas =+ ({-# LINE 73 "GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 1608 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 567 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 1613 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOcontextMap =+ ({-# LINE 115 "GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 1618 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOderivings =+ ({-# LINE 978 "GenerateCode.ag" #-}+ _lhsIderivings+ {-# LINE 1623 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 583 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 1628 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 1633 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 1638 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 1643 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 1648 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 1653 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 1658 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1663 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 1668 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 1673 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 1678 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 1683 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 1688 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 1693 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 1698 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 1703 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 1708 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 1713 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 1718 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOtypeSyns =+ ({-# LINE 978 "GenerateCode.ag" #-}+ _lhsItypeSyns+ {-# LINE 1723 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 1728 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOwith_sig =+ ({-# LINE 844 "GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 1733 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOwrappers =+ ({-# LINE 978 "GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 1738 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 1743 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOallPragmas =+ ({-# LINE 73 "GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 1748 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 567 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 1753 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOcontextMap =+ ({-# LINE 115 "GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 1758 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOderivings =+ ({-# LINE 978 "GenerateCode.ag" #-}+ _lhsIderivings+ {-# LINE 1763 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 583 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 1768 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 1773 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 1778 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 1783 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 1788 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 1793 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 1798 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1803 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 1808 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 1813 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 1818 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 1823 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 1828 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 1833 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 1838 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 1843 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 1848 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 1853 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 1858 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOtypeSyns =+ ({-# LINE 978 "GenerateCode.ag" #-}+ _lhsItypeSyns+ {-# LINE 1863 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 1868 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOwith_sig =+ ({-# LINE 844 "GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 1873 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOwrappers =+ ({-# LINE 978 "GenerateCode.ag" #-}+ _lhsIwrappers+ {-# LINE 1878 "GenerateCode.hs" #-})+ ( _hdIchunks,_hdIgathNts,_hdIsemDomUnfoldGath) =+ hd_ _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 _hdOtypeSyns _hdOunfoldSemDom _hdOwith_sig _hdOwrappers + ( _tlIchunks,_tlIgathNts,_tlIsemDomUnfoldGath) =+ tl_ _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 _tlOtypeSyns _tlOunfoldSemDom _tlOwith_sig _tlOwrappers + in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )+sem_CNonterminals_Nil :: T_CNonterminals +sem_CNonterminals_Nil =+ (T_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+ _lhsItypeSyns+ _lhsIunfoldSemDom+ _lhsIwith_sig+ _lhsIwrappers ->+ (let _lhsOchunks :: Chunks+ _lhsOgathNts :: (Set NontermIdent)+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ -- use rule "GenerateCode.ag"(line 910, column 49)+ _lhsOchunks =+ ({-# LINE 910 "GenerateCode.ag" #-}+ []+ {-# LINE 1921 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 133, column 47)+ _lhsOgathNts =+ ({-# LINE 133 "GenerateCode.ag" #-}+ Set.empty+ {-# LINE 1926 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 736, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 736 "GenerateCode.ag" #-}+ Map.empty+ {-# LINE 1931 "GenerateCode.hs" #-})+ in ( _lhsOchunks,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )+-- CProduction -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Map ConstructorIdent (Set Identifier)+ contextMap : ContextMap+ inh : Attributes+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ synthesized attributes:+ cataAlt : Decl+ comments : [String]+ dataAlt : DataAlt+ decls : Decls+ semNames : [String]+ alternatives:+ alternative CProduction:+ child con : {ConstructorIdent}+ child visits : CVisits + child children : {[(Identifier,Type,Maybe (Maybe Type))]}+ child terminals : {[Identifier]}+ visit 0:+ local paramInstMap : _+ local aroundMap : _+ local mergeMap : _+ local firstOrderChildren : _+ local params : _+-}+-- cata+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 ((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 ->+ Attributes ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ Bool ->+ ( Decl,([String]),DataAlt,Decls,([String])))+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),syn_Inh_CProduction :: !(Attributes),unfoldSemDom_Inh_CProduction :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProduction :: !(Bool)}+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]))}+wrap_CProduction :: T_CProduction ->+ Inh_CProduction ->+ Syn_CProduction +wrap_CProduction (T_CProduction sem ) (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 _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig ) =+ (let ( _lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOsemNames) = sem _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 _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig + in (Syn_CProduction _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames ))+sem_CProduction_CProduction :: ConstructorIdent ->+ T_CVisits ->+ ([(Identifier,Type,Maybe (Maybe Type))]) ->+ ([Identifier]) ->+ T_CProduction +sem_CProduction_CProduction con_ (T_CVisits visits_ ) children_ terminals_ =+ (T_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+ _lhsIsyn+ _lhsIunfoldSemDom+ _lhsIwith_sig ->+ (let _visitsOcon :: ConstructorIdent+ _visitsOterminals :: ([Identifier])+ _visitsOvisitedSet :: (Set Identifier)+ _visitsOnr :: Int+ _visitsOchildren :: ([(Identifier,Type, Maybe (Maybe Type))])+ _visitsOinstVisitNrs :: (Map Identifier Int)+ _lhsOcomments :: ([String])+ _lhsOdataAlt :: DataAlt+ _lhsOcataAlt :: Decl+ _lhsOdecls :: Decls+ _lhsOsemNames :: ([String])+ _visitsOallNts :: (Set NontermIdent)+ _visitsOallPragmas :: PragmaMap+ _visitsOaroundMap :: (Set Identifier)+ _visitsOcontextMap :: ContextMap+ _visitsOinh :: Attributes+ _visitsOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _visitsOnt :: NontermIdent+ _visitsOo_case :: Bool+ _visitsOo_cata :: Bool+ _visitsOo_costcentre :: Bool+ _visitsOo_data :: (Maybe Bool)+ _visitsOo_linePragmas :: Bool+ _visitsOo_monadic :: Bool+ _visitsOo_newtypes :: Bool+ _visitsOo_pretty :: Bool+ _visitsOo_rename :: Bool+ _visitsOo_sem :: Bool+ _visitsOo_sig :: Bool+ _visitsOo_splitsems :: Bool+ _visitsOo_strictwrap :: Bool+ _visitsOo_traces :: Bool+ _visitsOo_unbox :: Bool+ _visitsOoptions :: Options+ _visitsOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _visitsOparamMap :: ParamMap+ _visitsOprefix :: String+ _visitsOsyn :: Attributes+ _visitsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _visitsOwith_sig :: Bool+ _visitsIcomments :: ([String])+ _visitsIdecls :: Decls+ _visitsIgatherInstVisitNrs :: (Map Identifier Int)+ _visitsIintra :: Exprs+ _visitsIintraVars :: (Set String)+ _visitsIisNil :: Bool+ _visitsIsemNames :: ([String])+ _visitsIvisitedSet :: (Set Identifier)+ -- "GenerateCode.ag"(line 92, column 19)+ _visitsOcon =+ ({-# LINE 92 "GenerateCode.ag" #-}+ con_+ {-# LINE 2113 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 93, column 20)+ _visitsOterminals =+ ({-# LINE 93 "GenerateCode.ag" #-}+ terminals_+ {-# LINE 2118 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 105, column 7)+ _paramInstMap =+ ({-# LINE 105 "GenerateCode.ag" #-}+ Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- children_, let tps = map cleanupArg $ nontermArgs tp, not (null tps) ]+ {-# LINE 2123 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 141, column 32)+ _visitsOvisitedSet =+ ({-# LINE 141 "GenerateCode.ag" #-}+ Set.empty+ {-# LINE 2128 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 273, column 18)+ _visitsOnr =+ ({-# LINE 273 "GenerateCode.ag" #-}+ 0+ {-# LINE 2133 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 414, column 18)+ _visitsOchildren =+ ({-# LINE 414 "GenerateCode.ag" #-}+ children_+ {-# LINE 2138 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 556, column 7)+ _visitsOinstVisitNrs =+ ({-# LINE 556 "GenerateCode.ag" #-}+ _visitsIgatherInstVisitNrs+ {-# LINE 2143 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 576, column 34)+ _aroundMap =+ ({-# LINE 576 "GenerateCode.ag" #-}+ Map.findWithDefault Set.empty con_ _lhsIaroundMap+ {-# LINE 2148 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 592, column 34)+ _mergeMap =+ ({-# LINE 592 "GenerateCode.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergeMap+ {-# LINE 2153 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 872, column 18)+ _firstOrderChildren =+ ({-# LINE 872 "GenerateCode.ag" #-}+ [ (nm,fromJust mb,virt) | (nm,tp,virt) <- children_, let mb = isFirstOrder virt tp, isJust mb ]+ {-# LINE 2158 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 873, column 18)+ _lhsOcomments =+ ({-# LINE 873 "GenerateCode.ag" #-}+ ("alternative " ++ getName con_ ++ ":")+ : map ind ( map (\(x,y,_) -> makeLocalComment 14 "child" x (Just y)) _firstOrderChildren+ ++ _visitsIcomments+ )+ {-# LINE 2166 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 1009, column 17)+ _params =+ ({-# LINE 1009 "GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 2171 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 1010, column 17)+ _lhsOdataAlt =+ ({-# LINE 1010 "GenerateCode.ag" #-}+ DataAlt (conname _lhsIo_rename _lhsInt con_) (map (\(_,t,_) -> typeToCodeType (Just _lhsInt) _params t) _firstOrderChildren )+ {-# LINE 2176 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 1109, column 17)+ _lhsOcataAlt =+ ({-# LINE 1109 "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 _,_) = let tp' = maybe tp id (deforestedNt tp)+ in App (cataname _lhsIprefix tp')+ [SimpleExpr (locname nm)]+ argument (nm, _,_) = SimpleExpr (locname nm)+ in Decl lhs rhs Set.empty Set.empty+ {-# LINE 2190 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 911, column 44)+ _lhsOdecls =+ ({-# LINE 911 "GenerateCode.ag" #-}+ _visitsIdecls+ {-# LINE 2195 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 1125, column 61)+ _lhsOsemNames =+ ({-# LINE 1125 "GenerateCode.ag" #-}+ _visitsIsemNames+ {-# LINE 2200 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 2205 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOallPragmas =+ ({-# LINE 73 "GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 2210 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _visitsOaroundMap =+ ({-# LINE 572 "GenerateCode.ag" #-}+ _aroundMap+ {-# LINE 2215 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOcontextMap =+ ({-# LINE 115 "GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 2220 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 2225 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _visitsOmergeMap =+ ({-# LINE 588 "GenerateCode.ag" #-}+ _mergeMap+ {-# LINE 2230 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 2235 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 2240 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 2245 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 2250 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 2255 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 2260 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 2265 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 2270 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 2275 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 2280 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 2285 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 2290 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 2295 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 2300 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 2305 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 2310 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 2315 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _visitsOparamInstMap =+ ({-# LINE 101 "GenerateCode.ag" #-}+ _paramInstMap+ {-# LINE 2320 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 2325 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 2330 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 2335 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 2340 "GenerateCode.hs" #-})+ -- copy rule (down)+ _visitsOwith_sig =+ ({-# LINE 844 "GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 2345 "GenerateCode.hs" #-})+ ( _visitsIcomments,_visitsIdecls,_visitsIgatherInstVisitNrs,_visitsIintra,_visitsIintraVars,_visitsIisNil,_visitsIsemNames,_visitsIvisitedSet) =+ visits_ _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 _visitsOsyn _visitsOterminals _visitsOunfoldSemDom _visitsOvisitedSet _visitsOwith_sig + in ( _lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOsemNames))) )+-- CProductions ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Map ConstructorIdent (Set Identifier)+ contextMap : ContextMap+ inh : Attributes+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ synthesized attributes:+ cataAlts : Decls+ comments : [String]+ dataAlts : DataAlts+ decls : Decls+ semNames : [String]+ alternatives:+ alternative Cons:+ child hd : CProduction + child tl : CProductions + alternative Nil:+-}+-- cata+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 ((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 ->+ Attributes ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ Bool ->+ ( Decls,([String]),DataAlts,Decls,([String])))+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),syn_Inh_CProductions :: !(Attributes),unfoldSemDom_Inh_CProductions :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProductions :: !(Bool)}+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]))}+wrap_CProductions :: T_CProductions ->+ Inh_CProductions ->+ Syn_CProductions +wrap_CProductions (T_CProductions sem ) (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 _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig ) =+ (let ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames) = sem _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 _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig + in (Syn_CProductions _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames ))+sem_CProductions_Cons :: T_CProduction ->+ T_CProductions ->+ T_CProductions +sem_CProductions_Cons (T_CProduction hd_ ) (T_CProductions tl_ ) =+ (T_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+ _lhsIsyn+ _lhsIunfoldSemDom+ _lhsIwith_sig ->+ (let _lhsOdataAlts :: DataAlts+ _lhsOcataAlts :: Decls+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOsemNames :: ([String])+ _hdOallNts :: (Set NontermIdent)+ _hdOallPragmas :: PragmaMap+ _hdOaroundMap :: (Map ConstructorIdent (Set Identifier))+ _hdOcontextMap :: ContextMap+ _hdOinh :: Attributes+ _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ _hdOnt :: NontermIdent+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _hdOwith_sig :: Bool+ _tlOallNts :: (Set NontermIdent)+ _tlOallPragmas :: PragmaMap+ _tlOaroundMap :: (Map ConstructorIdent (Set Identifier))+ _tlOcontextMap :: ContextMap+ _tlOinh :: Attributes+ _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))+ _tlOnt :: NontermIdent+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _tlOwith_sig :: Bool+ _hdIcataAlt :: Decl+ _hdIcomments :: ([String])+ _hdIdataAlt :: DataAlt+ _hdIdecls :: Decls+ _hdIsemNames :: ([String])+ _tlIcataAlts :: Decls+ _tlIcomments :: ([String])+ _tlIdataAlts :: DataAlts+ _tlIdecls :: Decls+ _tlIsemNames :: ([String])+ -- "GenerateCode.ag"(line 1005, column 17)+ _lhsOdataAlts =+ ({-# LINE 1005 "GenerateCode.ag" #-}+ _hdIdataAlt : _tlIdataAlts+ {-# LINE 2543 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 1105, column 10)+ _lhsOcataAlts =+ ({-# LINE 1105 "GenerateCode.ag" #-}+ _hdIcataAlt : _tlIcataAlts+ {-# LINE 2548 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ _hdIcomments ++ _tlIcomments+ {-# LINE 2553 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 911, column 44)+ _lhsOdecls =+ ({-# LINE 911 "GenerateCode.ag" #-}+ _hdIdecls ++ _tlIdecls+ {-# LINE 2558 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 1125, column 61)+ _lhsOsemNames =+ ({-# LINE 1125 "GenerateCode.ag" #-}+ _hdIsemNames ++ _tlIsemNames+ {-# LINE 2563 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 2568 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOallPragmas =+ ({-# LINE 73 "GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 2573 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 570 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 2578 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOcontextMap =+ ({-# LINE 115 "GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 2583 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 2588 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 586 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 2593 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 2598 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 2603 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 2608 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 2613 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 2618 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 2623 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 2628 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 2633 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 2638 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 2643 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 2648 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 2653 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 2658 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 2663 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 2668 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 2673 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 2678 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 2683 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 2688 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 2693 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 2698 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOwith_sig =+ ({-# LINE 844 "GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 2703 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 2708 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOallPragmas =+ ({-# LINE 73 "GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 2713 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 570 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 2718 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOcontextMap =+ ({-# LINE 115 "GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 2723 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 2728 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 586 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 2733 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 2738 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 2743 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 2748 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 2753 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 2758 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 2763 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 2768 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 2773 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 2778 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 2783 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 2788 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 2793 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 2798 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 2803 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 2808 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 2813 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 2818 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 2823 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 2828 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 2833 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 2838 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOwith_sig =+ ({-# LINE 844 "GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 2843 "GenerateCode.hs" #-})+ ( _hdIcataAlt,_hdIcomments,_hdIdataAlt,_hdIdecls,_hdIsemNames) =+ hd_ _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 _hdOsyn _hdOunfoldSemDom _hdOwith_sig + ( _tlIcataAlts,_tlIcomments,_tlIdataAlts,_tlIdecls,_tlIsemNames) =+ tl_ _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 _tlOsyn _tlOunfoldSemDom _tlOwith_sig + in ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames))) )+sem_CProductions_Nil :: T_CProductions +sem_CProductions_Nil =+ (T_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+ _lhsIsyn+ _lhsIunfoldSemDom+ _lhsIwith_sig ->+ (let _lhsOdataAlts :: DataAlts+ _lhsOcataAlts :: Decls+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOsemNames :: ([String])+ -- "GenerateCode.ag"(line 1006, column 17)+ _lhsOdataAlts =+ ({-# LINE 1006 "GenerateCode.ag" #-}+ []+ {-# LINE 2888 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 1106, column 10)+ _lhsOcataAlts =+ ({-# LINE 1106 "GenerateCode.ag" #-}+ []+ {-# LINE 2893 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ []+ {-# LINE 2898 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 911, column 44)+ _lhsOdecls =+ ({-# LINE 911 "GenerateCode.ag" #-}+ []+ {-# LINE 2903 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 1125, column 61)+ _lhsOsemNames =+ ({-# LINE 1125 "GenerateCode.ag" #-}+ []+ {-# LINE 2908 "GenerateCode.hs" #-})+ in ( _lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOsemNames))) )+-- CRule -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ aroundMap : Set Identifier+ children : [(Identifier,Type,Maybe (Maybe Type))]+ con : ConstructorIdent+ inh : Attributes+ instVisitNrs : Map Identifier Int+ mergeMap : Map Identifier (Identifier, [Identifier])+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramInstMap : Map Identifier (NontermIdent, [String])+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ terminals : [Identifier]+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ what : String+ chained attributes:+ declsAbove : [Decl]+ visitedSet : Set Identifier+ synthesized attributes:+ allTpsFound : Bool+ bldBlocksFun : DeclBlocks -> DeclBlocks+ comments : [String]+ decls : Decls+ definedInsts : [Identifier]+ exprs : Exprs+ tSigs : [Decl]+ tps : [Type]+ usedVars : Set String+ alternatives:+ alternative CChildVisit:+ child name : {Identifier}+ child nt : {NontermIdent}+ child nr : {Int}+ child inh : {Attributes}+ child syn : {Attributes}+ child isLast : {Bool}+ visit 0:+ local visitedSet : _+ local costCentreDescr : _+ local addCostCentre : _+ local decls : _+ local isSuperfluousHigherOrderIntra : _+ local names : _+ local mkTp : _+ local definedTps : _+ local nextTp : _+ local orgParams : _+ local instParams : _+ local replParamMap : _+ local replace : _+ local evalTp : _+ alternative CRule:+ child name : {Identifier}+ child isIn : {Bool}+ child hasCode : {Bool}+ child nt : {NontermIdent}+ child con : {ConstructorIdent}+ child field : {Identifier}+ child childnt : {Maybe NontermIdent}+ child tp : {Maybe Type}+ child pattern : Pattern + child rhs : {[String]}+ child defines : {Map Int (Identifier,Identifier,Maybe Type)}+ child owrt : {Bool}+ child origin : {String}+ child uses : {Set (Identifier, Identifier)}+ child explicit : {Bool}+ child mbNamed : {Maybe Identifier}+ visit 0:+ local instTypes : _+ local originComment : _+ local instDecls : _+ local patDescr : _+ local traceDescr : _+ local addTrace : _+ local costCentreDescr : _+ local addCostCentre : _+ local addLinePragma : _+ local decls : _+ local definedInsts : _+ local rulename : _+ local mkTp : _+ local orgParams : _+ local evalTp : _+ local _tup3 : {([Type],Bool)}+-}+-- cata+sem_CRule :: CRule ->+ T_CRule +sem_CRule (CChildVisit _name _nt _nr _inh _syn _isLast ) =+ (sem_CRule_CChildVisit _name _nt _nr _inh _syn _isLast )+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 )+-- semantic domain+newtype T_CRule = T_CRule ((Set NontermIdent) ->+ (Set Identifier) ->+ ([(Identifier,Type,Maybe (Maybe Type))]) ->+ 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 ->+ ( Bool,(DeclBlocks -> DeclBlocks),([String]),Decls,([Decl]),([Identifier]),Exprs,([Decl]),([Type]),(Set String),(Set Identifier)))+data Inh_CRule = Inh_CRule {allNts_Inh_CRule :: !((Set NontermIdent)),aroundMap_Inh_CRule :: !((Set Identifier)),children_Inh_CRule :: !(([(Identifier,Type,Maybe (Maybe Type))])),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))}+wrap_CRule :: T_CRule ->+ Inh_CRule ->+ Syn_CRule +wrap_CRule (T_CRule sem ) (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 ) =+ (let ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet) = sem _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 + in (Syn_CRule _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet ))+sem_CRule_CChildVisit :: Identifier ->+ NontermIdent ->+ Int ->+ Attributes ->+ Attributes ->+ Bool ->+ T_CRule +sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ =+ (T_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 ->+ (let _lhsOexprs :: Exprs+ _lhsOusedVars :: (Set String)+ _lhsOtSigs :: ([Decl])+ _lhsOtps :: ([Type])+ _lhsOdeclsAbove :: ([Decl])+ _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)+ _lhsOallTpsFound :: Bool+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOvisitedSet :: (Set Identifier)+ -- "GenerateCode.ag"(line 142, column 26)+ _visitedSet =+ ({-# LINE 142 "GenerateCode.ag" #-}+ Set.insert name_ _lhsIvisitedSet+ {-# LINE 3125 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 198, column 18)+ _costCentreDescr =+ ({-# LINE 198 "GenerateCode.ag" #-}+ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show name_ ++ ":" ++ show nt_ ++ ":" ++ show nr_+ {-# LINE 3130 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 199, column 18)+ _addCostCentre =+ ({-# LINE 199 "GenerateCode.ag" #-}+ \v -> if _lhsIo_costcentre+ then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v+ else v+ {-# LINE 3137 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 202, column 18)+ _decls =+ ({-# LINE 202 "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,t,mb) : r)+ | nm == n = isJust mb+ | 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 "merge" [App fun (map SimpleExpr rhsVars)]+ in [Resume _lhsIo_monadic (typeName nt_ nr_) tuple' rhs']+ in+ (outDecls ++ outMerged)+ {-# LINE 3177 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 320, column 7)+ _isSuperfluousHigherOrderIntra =+ ({-# LINE 320 "GenerateCode.ag" #-}+ _lhsInr <= Map.findWithDefault (-1) name_ _lhsIinstVisitNrs+ {-# LINE 3182 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 334, column 8)+ _names =+ ({-# LINE 334 "GenerateCode.ag" #-}+ if _isSuperfluousHigherOrderIntra+ then []+ else [funname name_ (nr_+1)]+ {-# LINE 3189 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 338, column 8)+ _lhsOexprs =+ ({-# LINE 338 "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 3197 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 350, column 7)+ _lhsOusedVars =+ ({-# LINE 350 "GenerateCode.ag" #-}+ Set.fromList _names+ {-# LINE 3202 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 389, column 19)+ _mkTp =+ ({-# LINE 389 "GenerateCode.ag" #-}+ _evalTp . typeToCodeType (Just nt_) _orgParams+ {-# LINE 3207 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 390, column 19)+ _definedTps =+ ({-# LINE 390 "GenerateCode.ag" #-}+ [ TSig (attrname True name_ a) (_mkTp tp) | (a,tp) <- Map.toList syn_ ]+ {-# LINE 3212 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 391, column 19)+ _nextTp =+ ({-# LINE 391 "GenerateCode.ag" #-}+ typeName nt_ (nr_+1)+ {-# LINE 3217 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 392, column 19)+ _lhsOtSigs =+ ({-# LINE 392 "GenerateCode.ag" #-}+ (if isLast_ then id else (TSig (funname name_ (nr_+1)) (TypeApp (SimpleType _nextTp) (map SimpleType _instParams )) :)) _definedTps+ {-# LINE 3222 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 394, column 19)+ _orgParams =+ ({-# LINE 394 "GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] nt_ _lhsIparamMap+ {-# LINE 3227 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 395, column 19)+ _instParams =+ ({-# LINE 395 "GenerateCode.ag" #-}+ snd $ Map.findWithDefault (nt_,[]) name_ _lhsIparamInstMap+ {-# LINE 3232 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 396, column 19)+ _replParamMap =+ ({-# LINE 396 "GenerateCode.ag" #-}+ Map.fromList (zip _orgParams _instParams )+ {-# LINE 3237 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 397, column 19)+ _replace =+ ({-# LINE 397 "GenerateCode.ag" #-}+ \k -> Map.findWithDefault k k _replParamMap+ {-# LINE 3242 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 398, column 19)+ _evalTp =+ ({-# LINE 398 "GenerateCode.ag" #-}+ if null _orgParams then id else evalType _replace+ {-# LINE 3247 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 421, column 19)+ _lhsOtps =+ ({-# LINE 421 "GenerateCode.ag" #-}+ if _isSuperfluousHigherOrderIntra+ then []+ else [NT (ntOfVisit nt_ (nr_+1)) _instParams ]+ {-# LINE 3254 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 610, column 7)+ _lhsOdeclsAbove =+ ({-# LINE 610 "GenerateCode.ag" #-}+ []+ {-# LINE 3259 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 623, column 7)+ _lhsObldBlocksFun =+ ({-# LINE 623 "GenerateCode.ag" #-}+ DeclBlock _lhsIdeclsAbove (head _decls )+ {-# LINE 3264 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 418, column 39)+ _lhsOallTpsFound =+ ({-# LINE 418 "GenerateCode.ag" #-}+ True+ {-# LINE 3269 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ []+ {-# LINE 3274 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 150, column 34)+ _lhsOdecls =+ ({-# LINE 150 "GenerateCode.ag" #-}+ _decls+ {-# LINE 3279 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ []+ {-# LINE 3284 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _lhsOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _visitedSet+ {-# LINE 3289 "GenerateCode.hs" #-})+ in ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )+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 name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ (T_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_ =+ (T_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 ->+ (let _lhsOexprs :: Exprs+ _lhsOusedVars :: (Set String)+ _lhsOtSigs :: ([Decl])+ __tup3 :: (([Type],Bool))+ _lhsOtps :: ([Type])+ _lhsOallTpsFound :: Bool+ _lhsOdeclsAbove :: ([Decl])+ _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOvisitedSet :: (Set Identifier)+ _patternIcopy :: Pattern + _patternIdefinedInsts :: ([Identifier])+ _patternIpatternAttributes :: ([(Identifier, Identifier)])+ -- "GenerateCode.ag"(line 152, column 12)+ _instTypes =+ ({-# LINE 152 "GenerateCode.ag" #-}+ [ (n, (t, mb)) | (n, NT t _, mb) <- _lhsIchildren ]+ {-# LINE 3362 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 153, column 12)+ _originComment =+ ({-# LINE 153 "GenerateCode.ag" #-}+ if _lhsIo_pretty+ then (Comment origin_:)+ else id+ {-# LINE 3369 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 156, column 12)+ _instDecls =+ ({-# LINE 156 "GenerateCode.ag" #-}+ [ mkDecl _lhsIo_monadic (Pattern3 (Alias _INST' inst (Underscore (getPos inst)) []))+ ( let (nm,mb) = fromJust $ inst `lookup` _instTypes+ in unwrapSem _lhsIo_newtypes (maybe nm id (deforestedNt nm))+ $ case mb of+ Just (Just tp') -> App instLocFieldName [SimpleExpr $ fieldname inst]+ _ ->+ case nm `Set.member` _lhsIallNts of+ True -> App (cataname _lhsIprefix nm)+ [SimpleExpr instLocFieldName]+ False -> SimpleExpr instLocFieldName+ )+ (Set.singleton instSemFieldName)+ (Set.singleton instLocFieldName)+ | inst <- _definedInsts+ , let instLocFieldName = attrname True _INST inst+ instSemFieldName = attrname False _INST' inst+ ]+ {-# LINE 3390 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 173, column 12)+ _patDescr =+ ({-# LINE 173 "GenerateCode.ag" #-}+ if isIn_+ then "_"+ else concat $ intersperse "," (map (\(f,a) -> show f ++ "." ++ show a) _patternIpatternAttributes)+ {-# LINE 3397 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 176, column 12)+ _traceDescr =+ ({-# LINE 176 "GenerateCode.ag" #-}+ (maybe "" (\nm -> show nm ++ ":") mbNamed_) ++ show nt_ ++ " :: " ++ show con_ ++ " :: " ++ _patDescr+ {-# LINE 3402 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 178, column 12)+ _addTrace =+ ({-# LINE 178 "GenerateCode.ag" #-}+ \v -> if _lhsIo_traces+ then Trace _traceDescr v+ else v+ {-# LINE 3409 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 181, column 12)+ _costCentreDescr =+ ({-# LINE 181 "GenerateCode.ag" #-}+ show nt_ ++ ":" ++ show con_ ++ ":" ++ _patDescr+ {-# LINE 3414 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 182, column 12)+ _addCostCentre =+ ({-# LINE 182 "GenerateCode.ag" #-}+ \v -> if _lhsIo_costcentre+ then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v+ else v+ {-# LINE 3421 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 185, column 12)+ _addLinePragma =+ ({-# LINE 185 "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 3432 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 192, column 12)+ _decls =+ ({-# LINE 192 "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 3442 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 259, column 12)+ _definedInsts =+ ({-# LINE 259 "GenerateCode.ag" #-}+ if isIn_ then [] else _patternIdefinedInsts+ {-# LINE 3447 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 329, column 12)+ _rulename =+ ({-# LINE 329 "GenerateCode.ag" #-}+ if field_ == _LOC && name_ `elem` _lhsIterminals+ then funname name_ 0+ else attrname isIn_ field_ name_+ {-# LINE 3454 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 332, column 12)+ _lhsOexprs =+ ({-# LINE 332 "GenerateCode.ag" #-}+ [SimpleExpr _rulename ]+ {-# LINE 3459 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 348, column 7)+ _lhsOusedVars =+ ({-# LINE 348 "GenerateCode.ag" #-}+ Set.singleton _rulename+ {-# LINE 3464 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 358, column 19)+ _mkTp =+ ({-# LINE 358 "GenerateCode.ag" #-}+ typeToCodeType (Just _lhsInt) _orgParams+ {-# LINE 3469 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 359, column 19)+ _lhsOtSigs =+ ({-# LINE 359 "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 tp'' = case tp' of+ NT n params -> NT (Ident ("T_" ++ show n) (getPos n)) params+ _ -> tp'+ tp2 = _evalTp field $ _mkTp tp''+ in Arr tp2 tp1+ Nothing -> tp1+ findOrigType nm [] = Nothing+ findOrigType nm ((n,_,mb) : r)+ | nm == n = case mb of+ Just (Just orig) -> Just orig+ _ -> Nothing+ | otherwise = findOrigType nm r+ ]+ {-# LINE 3490 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 377, column 19)+ _orgParams =+ ({-# LINE 377 "GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 3495 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 378, column 19)+ _evalTp =+ ({-# LINE 378 "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 3508 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 420, column 23)+ __tup3 =+ ({-# LINE 420 "GenerateCode.ag" #-}+ maybe ([],False) (\tp -> ([substSelf (fromJust childnt_) tp],True)) tp_+ {-# LINE 3513 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 420, column 23)+ (_lhsOtps,_) =+ ({-# LINE 420 "GenerateCode.ag" #-}+ __tup3+ {-# LINE 3518 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 420, column 23)+ (_,_lhsOallTpsFound) =+ ({-# LINE 420 "GenerateCode.ag" #-}+ __tup3+ {-# LINE 3523 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 608, column 7)+ _lhsOdeclsAbove =+ ({-# LINE 608 "GenerateCode.ag" #-}+ _lhsIdeclsAbove ++ _decls+ {-# LINE 3528 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 621, column 7)+ _lhsObldBlocksFun =+ ({-# LINE 621 "GenerateCode.ag" #-}+ id+ {-# LINE 3533 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 895, column 18)+ _lhsOcomments =+ ({-# LINE 895 "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 3539 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 150, column 34)+ _lhsOdecls =+ ({-# LINE 150 "GenerateCode.ag" #-}+ _decls+ {-# LINE 3544 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ _definedInsts+ {-# LINE 3549 "GenerateCode.hs" #-})+ -- copy rule (chain)+ _lhsOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 3554 "GenerateCode.hs" #-})+ ( _patternIcopy,_patternIdefinedInsts,_patternIpatternAttributes) =+ pattern_ + in ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )+-- CSegment ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ inh : Attributes+ isLast : Bool+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ synthesized attributes:+ comments : [String]+ semDom : [Decl]+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ wrapDecls : Decls+ alternatives:+ alternative CSegment:+ child inh : {Attributes}+ child syn : {Attributes}+ visit 0:+ local altSemForm : _+ local tp : _+ local inhTps : _+ local inhTup : _+ local synTps : _+ local curTypeName : _+ local nextTypeName : _+ local indexName : _+ local dataIndex : _+ local indexExpr : _+ local indexStr : _+ local inhInstance : _+ local synInstance : _+ local continuation : _+ local params : _+-}+-- cata+sem_CSegment :: CSegment ->+ T_CSegment +sem_CSegment (CSegment _inh _syn ) =+ (sem_CSegment_CSegment _inh _syn )+-- semantic domain+newtype T_CSegment = T_CSegment (Attributes ->+ Bool ->+ Int ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ Attributes ->+ ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))+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)}+wrap_CSegment :: T_CSegment ->+ Inh_CSegment ->+ Syn_CSegment +wrap_CSegment (T_CSegment sem ) (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 ) =+ (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) = sem _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 + in (Syn_CSegment _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls ))+sem_CSegment_CSegment :: Attributes ->+ Attributes ->+ T_CSegment +sem_CSegment_CSegment inh_ syn_ =+ (T_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 ->+ (let _lhsOsemDom :: ([Decl])+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _lhsOwrapDecls :: Decls+ _lhsOcomments :: ([String])+ -- "GenerateCode.ag"(line 707, column 15)+ _altSemForm =+ ({-# LINE 707 "GenerateCode.ag" #-}+ breadthFirst _lhsIoptions+ {-# LINE 3684 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 708, column 15)+ _tp =+ ({-# LINE 708 "GenerateCode.ag" #-}+ if _altSemForm+ then TypeApp (SimpleType "Closure") [SimpleType "EvalInfo", _indexExpr ]+ else foldr Arr _synTps _inhTps+ {-# LINE 3691 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 711, column 15)+ _inhTps =+ ({-# LINE 711 "GenerateCode.ag" #-}+ [typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems inh_]+ {-# LINE 3696 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 712, column 15)+ _inhTup =+ ({-# LINE 712 "GenerateCode.ag" #-}+ mkTupleType _lhsIo_unbox (null _inhTps ) _inhTps+ {-# LINE 3701 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 713, column 15)+ _synTps =+ ({-# LINE 713 "GenerateCode.ag" #-}+ mkTupleType _lhsIo_unbox (null _inhTps ) ([typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems syn_] ++ _continuation )+ {-# LINE 3706 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 714, column 15)+ _curTypeName =+ ({-# LINE 714 "GenerateCode.ag" #-}+ typeName _lhsInt _lhsInr+ {-# LINE 3711 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 715, column 15)+ _nextTypeName =+ ({-# LINE 715 "GenerateCode.ag" #-}+ typeName _lhsInt (_lhsInr + 1)+ {-# LINE 3716 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 716, column 15)+ _indexName =+ ({-# LINE 716 "GenerateCode.ag" #-}+ "I_" ++ _curTypeName+ {-# LINE 3721 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 717, column 15)+ _dataIndex =+ ({-# LINE 717 "GenerateCode.ag" #-}+ Code.Data _indexName _params [DataAlt _indexName []] False []+ {-# LINE 3726 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 718, column 15)+ _indexExpr =+ ({-# LINE 718 "GenerateCode.ag" #-}+ TypeApp (SimpleType _indexName ) (map (SimpleType . ('@':)) _params )+ {-# LINE 3731 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 719, column 15)+ _indexStr =+ ({-# LINE 719 "GenerateCode.ag" #-}+ "(" ++ _indexName ++ concatMap (\p -> " " ++ p) _params ++ ")"+ {-# LINE 3736 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 720, column 15)+ _inhInstance =+ ({-# LINE 720 "GenerateCode.ag" #-}+ Code.Data "instance Inh" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Inh") [_inhTup ] ] False []+ {-# LINE 3741 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 721, column 15)+ _synInstance =+ ({-# LINE 721 "GenerateCode.ag" #-}+ Code.Data "instance Syn" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Syn") [_synTps ] ] False []+ {-# LINE 3746 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 722, column 15)+ _continuation =+ ({-# LINE 722 "GenerateCode.ag" #-}+ if _lhsIisLast+ then []+ else [TypeApp (SimpleType _nextTypeName ) (map (SimpleType . ('@':)) _params )]+ {-# LINE 3753 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 725, column 15)+ _params =+ ({-# LINE 725 "GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 3758 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 726, column 15)+ _lhsOsemDom =+ ({-# LINE 726 "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 3771 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 740, column 7)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 740 "GenerateCode.ag" #-}+ Map.singleton (_lhsInt, _lhsInr) (_params , _tp )+ {-# LINE 3776 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 824, column 15)+ _lhsOwrapDecls =+ ({-# LINE 824 "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 3790 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 866, column 18)+ _lhsOcomments =+ ({-# LINE 866 "GenerateCode.ag" #-}+ let body = map ind (showsSegment (CSegment inh_ syn_))+ in if null body+ then []+ else ("visit " ++ show _lhsInr ++ ":") : body+ {-# LINE 3798 "GenerateCode.hs" #-})+ in ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )+-- CSegments ---------------------------------------------------+{-+ visit 0:+ inherited attributes:+ inh : Attributes+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ synthesized attributes:+ comments : [String]+ isNil : Bool+ semDom : [Decl]+ semDomUnfoldGath : Map (NontermIdent, Int) ([String], Code.Type)+ wrapDecls : Decls+ alternatives:+ alternative Cons:+ child hd : CSegment + child tl : CSegments + alternative Nil:+-}+-- cata+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 (Attributes ->+ Int ->+ NontermIdent ->+ Bool ->+ Bool ->+ Bool ->+ (Maybe Bool) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Options ->+ ParamMap ->+ String ->+ Attributes ->+ ( ([String]),Bool,([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))+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)}+wrap_CSegments :: T_CSegments ->+ Inh_CSegments ->+ Syn_CSegments +wrap_CSegments (T_CSegments sem ) (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 ) =+ (let ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) = sem _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 + in (Syn_CSegments _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls ))+sem_CSegments_Cons :: T_CSegment ->+ T_CSegments ->+ T_CSegments +sem_CSegments_Cons (T_CSegment hd_ ) (T_CSegments tl_ ) =+ (T_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 ->+ (let _tlOnr :: Int+ _lhsOisNil :: Bool+ _hdOisLast :: Bool+ _lhsOcomments :: ([String])+ _lhsOsemDom :: ([Decl])+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _lhsOwrapDecls :: Decls+ _hdOinh :: Attributes+ _hdOnr :: Int+ _hdOnt :: NontermIdent+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _tlOinh :: Attributes+ _tlOnt :: NontermIdent+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _hdIcomments :: ([String])+ _hdIsemDom :: ([Decl])+ _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _hdIwrapDecls :: Decls+ _tlIcomments :: ([String])+ _tlIisNil :: Bool+ _tlIsemDom :: ([Decl])+ _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _tlIwrapDecls :: Decls+ -- "GenerateCode.ag"(line 279, column 11)+ _tlOnr =+ ({-# LINE 279 "GenerateCode.ag" #-}+ _lhsInr + 1+ {-# LINE 3964 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 292, column 12)+ _lhsOisNil =+ ({-# LINE 292 "GenerateCode.ag" #-}+ False+ {-# LINE 3969 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 293, column 12)+ _hdOisLast =+ ({-# LINE 293 "GenerateCode.ag" #-}+ _tlIisNil+ {-# LINE 3974 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ _hdIcomments ++ _tlIcomments+ {-# LINE 3979 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 702, column 50)+ _lhsOsemDom =+ ({-# LINE 702 "GenerateCode.ag" #-}+ _hdIsemDom ++ _tlIsemDom+ {-# LINE 3984 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 736, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 736 "GenerateCode.ag" #-}+ _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath+ {-# LINE 3989 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 822, column 52)+ _lhsOwrapDecls =+ ({-# LINE 822 "GenerateCode.ag" #-}+ _hdIwrapDecls ++ _tlIwrapDecls+ {-# LINE 3994 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 3999 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOnr =+ ({-# LINE 271 "GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 4004 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 4009 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 4014 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 4019 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 4024 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 4029 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 4034 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 4039 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 4044 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 4049 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 4054 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 4059 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 4064 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 4069 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 4074 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 4079 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 4084 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 4089 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 4094 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 4099 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 4104 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 4109 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 4114 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 4119 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 4124 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 4129 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 4134 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 4139 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 4144 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 4149 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 4154 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 4159 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 4164 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 4169 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 4174 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 4179 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 4184 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 4189 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 4194 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 4199 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 4204 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 4209 "GenerateCode.hs" #-})+ ( _hdIcomments,_hdIsemDom,_hdIsemDomUnfoldGath,_hdIwrapDecls) =+ hd_ _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 + ( _tlIcomments,_tlIisNil,_tlIsemDom,_tlIsemDomUnfoldGath,_tlIwrapDecls) =+ tl_ _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 + in ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )+sem_CSegments_Nil :: T_CSegments +sem_CSegments_Nil =+ (T_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 ->+ (let _lhsOisNil :: Bool+ _lhsOcomments :: ([String])+ _lhsOsemDom :: ([Decl])+ _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+ _lhsOwrapDecls :: Decls+ -- "GenerateCode.ag"(line 294, column 10)+ _lhsOisNil =+ ({-# LINE 294 "GenerateCode.ag" #-}+ True+ {-# LINE 4248 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ []+ {-# LINE 4253 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 702, column 50)+ _lhsOsemDom =+ ({-# LINE 702 "GenerateCode.ag" #-}+ []+ {-# LINE 4258 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 736, column 86)+ _lhsOsemDomUnfoldGath =+ ({-# LINE 736 "GenerateCode.ag" #-}+ Map.empty+ {-# LINE 4263 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 822, column 52)+ _lhsOwrapDecls =+ ({-# LINE 822 "GenerateCode.ag" #-}+ []+ {-# LINE 4268 "GenerateCode.hs" #-})+ in ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )+-- CVisit ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Set Identifier+ children : [(Identifier,Type, Maybe (Maybe Type))]+ con : ConstructorIdent+ contextMap : ContextMap+ inh : Attributes+ instVisitNrs : Map Identifier Int+ isLast : Bool+ mergeMap : Map Identifier (Identifier, [Identifier])+ nextIntra : Exprs+ nextIntraVars : Set String+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramInstMap : Map Identifier (NontermIdent, [String])+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ terminals : [Identifier]+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ chained attributes:+ decls : Decls+ visitedSet : Set Identifier+ synthesized attributes:+ comments : [String]+ gatherInstVisitNrs : Map Identifier Int+ intra : Exprs+ intraVars : Set String+ semNames : [String]+ alternatives:+ alternative CVisit:+ child inh : {Attributes}+ child syn : {Attributes}+ child vss : Sequence + child intra : Sequence + child ordered : {Bool}+ visit 0:+ local _tup4 : _+ local higherOrderChildren : _+ local firstOrderChildren : _+ local firstOrderOrig : _+ local funcname : _+ local nextVisitName : _+ local nextVisitDecl : _+ local decls : _+ local lastExprVars : _+ local _tup5 : _+ local blockFunDecls : _+ local blockFirstFunCall : _+ local costCentreDescr : _+ local addCostCentre : _+ local params : _+ local semFun : _+ local tsig : _+ local semType : _+ local typeSigs : _+ local o_do : _+ local o_case : _+ local declsType : _+ local o_splitsems : _+-}+-- cata+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 ((Set NontermIdent) ->+ PragmaMap ->+ (Set Identifier) ->+ ([(Identifier,Type, Maybe (Maybe Type))]) ->+ 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 ->+ Attributes ->+ ([Identifier]) ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ (Set Identifier) ->+ Bool ->+ ( ([String]),Decls,(Map Identifier Int),Exprs,(Set String),([String]),(Set Identifier)))+data Inh_CVisit = Inh_CVisit {allNts_Inh_CVisit :: !((Set NontermIdent)),allPragmas_Inh_CVisit :: !(PragmaMap),aroundMap_Inh_CVisit :: !((Set Identifier)),children_Inh_CVisit :: !(([(Identifier,Type, Maybe (Maybe Type))])),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),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)}+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))}+wrap_CVisit :: T_CVisit ->+ Inh_CVisit ->+ Syn_CVisit +wrap_CVisit (T_CVisit sem ) (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 _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig ) =+ (let ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames,_lhsOvisitedSet) = sem _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 _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig + in (Syn_CVisit _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet ))+sem_CVisit_CVisit :: Attributes ->+ Attributes ->+ T_Sequence ->+ T_Sequence ->+ Bool ->+ T_CVisit +sem_CVisit_CVisit inh_ syn_ (T_Sequence vss_ ) (T_Sequence intra_ ) ordered_ =+ (T_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+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwith_sig ->+ (let _lhsOintra :: Exprs+ _lhsOintraVars :: (Set String)+ _vssOlastExpr :: Expr+ _intraOlastExpr :: Expr+ _lhsOdecls :: Decls+ _lhsOgatherInstVisitNrs :: (Map Identifier Int)+ _vssOdeclsAbove :: ([Decl])+ _intraOdeclsAbove :: ([Decl])+ _lhsOcomments :: ([String])+ _vssOwhat :: String+ _intraOwhat :: String+ _lhsOsemNames :: ([String])+ _lhsOvisitedSet :: (Set Identifier)+ _vssOallNts :: (Set NontermIdent)+ _vssOaroundMap :: (Set Identifier)+ _vssOchildren :: ([(Identifier,Type,Maybe (Maybe Type))])+ _vssOcon :: ConstructorIdent+ _vssOinh :: Attributes+ _vssOinstVisitNrs :: (Map Identifier Int)+ _vssOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _vssOnr :: Int+ _vssOnt :: NontermIdent+ _vssOo_case :: Bool+ _vssOo_cata :: Bool+ _vssOo_costcentre :: Bool+ _vssOo_data :: (Maybe Bool)+ _vssOo_linePragmas :: Bool+ _vssOo_monadic :: Bool+ _vssOo_newtypes :: Bool+ _vssOo_pretty :: Bool+ _vssOo_rename :: Bool+ _vssOo_sem :: Bool+ _vssOo_sig :: Bool+ _vssOo_splitsems :: Bool+ _vssOo_strictwrap :: Bool+ _vssOo_traces :: Bool+ _vssOo_unbox :: Bool+ _vssOoptions :: Options+ _vssOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _vssOparamMap :: ParamMap+ _vssOprefix :: String+ _vssOsyn :: Attributes+ _vssOterminals :: ([Identifier])+ _vssOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _vssOvisitedSet :: (Set Identifier)+ _intraOallNts :: (Set NontermIdent)+ _intraOaroundMap :: (Set Identifier)+ _intraOchildren :: ([(Identifier,Type,Maybe (Maybe Type))])+ _intraOcon :: ConstructorIdent+ _intraOinh :: Attributes+ _intraOinstVisitNrs :: (Map Identifier Int)+ _intraOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _intraOnr :: Int+ _intraOnt :: NontermIdent+ _intraOo_case :: Bool+ _intraOo_cata :: Bool+ _intraOo_costcentre :: Bool+ _intraOo_data :: (Maybe Bool)+ _intraOo_linePragmas :: Bool+ _intraOo_monadic :: Bool+ _intraOo_newtypes :: Bool+ _intraOo_pretty :: Bool+ _intraOo_rename :: Bool+ _intraOo_sem :: Bool+ _intraOo_sig :: Bool+ _intraOo_splitsems :: Bool+ _intraOo_strictwrap :: Bool+ _intraOo_traces :: Bool+ _intraOo_unbox :: Bool+ _intraOoptions :: Options+ _intraOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _intraOparamMap :: ParamMap+ _intraOprefix :: String+ _intraOsyn :: Attributes+ _intraOterminals :: ([Identifier])+ _intraOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _intraOvisitedSet :: (Set Identifier)+ _vssIallTpsFound :: Bool+ _vssIblockDecls :: DeclBlocks + _vssIcomments :: ([String])+ _vssIdecls :: Decls+ _vssIdeclsAbove :: ([Decl])+ _vssIdefinedInsts :: ([Identifier])+ _vssIexprs :: Exprs+ _vssItSigs :: ([Decl])+ _vssItps :: ([Type])+ _vssIusedVars :: (Set String)+ _vssIvisitedSet :: (Set Identifier)+ _intraIallTpsFound :: Bool+ _intraIblockDecls :: DeclBlocks + _intraIcomments :: ([String])+ _intraIdecls :: Decls+ _intraIdeclsAbove :: ([Decl])+ _intraIdefinedInsts :: ([Identifier])+ _intraIexprs :: Exprs+ _intraItSigs :: ([Decl])+ _intraItps :: ([Type])+ _intraIusedVars :: (Set String)+ _intraIvisitedSet :: (Set Identifier)+ -- "GenerateCode.ag"(line 303, column 13)+ _lhsOintra =+ ({-# LINE 303 "GenerateCode.ag" #-}+ _intraIexprs+ {-# LINE 4555 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 304, column 13)+ _lhsOintraVars =+ ({-# LINE 304 "GenerateCode.ag" #-}+ _intraIusedVars+ {-# LINE 4560 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 443, column 13)+ __tup4 =+ ({-# LINE 443 "GenerateCode.ag" #-}+ partition (\(_,_,virt) -> isHigherOrder virt) _lhsIchildren+ {-# LINE 4565 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 443, column 13)+ (_higherOrderChildren,_) =+ ({-# LINE 443 "GenerateCode.ag" #-}+ __tup4+ {-# LINE 4570 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 443, column 13)+ (_,_firstOrderChildren) =+ ({-# LINE 443 "GenerateCode.ag" #-}+ __tup4+ {-# LINE 4575 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 444, column 13)+ _firstOrderOrig =+ ({-# LINE 444 "GenerateCode.ag" #-}+ map pickOrigType _firstOrderChildren+ {-# LINE 4580 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 445, column 13)+ _funcname =+ ({-# LINE 445 "GenerateCode.ag" #-}+ seqSemname _lhsIprefix _lhsInt _lhsIcon _lhsInr+ {-# LINE 4585 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 446, column 13)+ _nextVisitName =+ ({-# LINE 446 "GenerateCode.ag" #-}+ if _lhsIisLast then [] else [visitname _lhsIprefix _lhsInt (_lhsInr+1)]+ {-# LINE 4590 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 447, column 13)+ _nextVisitDecl =+ ({-# LINE 447 "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 4600 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 454, column 13)+ _decls =+ ({-# LINE 454 "GenerateCode.ag" #-}+ _typeSigs ++ _vssIdecls ++ _nextVisitDecl+ {-# LINE 4605 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 455, column 13)+ _vssOlastExpr =+ ({-# LINE 455 "GenerateCode.ag" #-}+ mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_) $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName+ {-# LINE 4610 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 456, column 13)+ _intraOlastExpr =+ ({-# LINE 456 "GenerateCode.ag" #-}+ error "lastExpr: not used here"+ {-# LINE 4615 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 457, column 13)+ _lastExprVars =+ ({-# LINE 457 "GenerateCode.ag" #-}+ map (lhsname False) (Map.keys syn_) ++ _nextVisitName+ {-# LINE 4620 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 458, column 13)+ __tup5 =+ ({-# LINE 458 "GenerateCode.ag" #-}+ mkPartitionedFunction _funcname _o_case _nextVisitDecl _lastExprVars _vssIblockDecls+ {-# LINE 4625 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 458, column 13)+ (_blockFunDecls,_) =+ ({-# LINE 458 "GenerateCode.ag" #-}+ __tup5+ {-# LINE 4630 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 458, column 13)+ (_,_blockFirstFunCall) =+ ({-# LINE 458 "GenerateCode.ag" #-}+ __tup5+ {-# LINE 4635 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 460, column 13)+ _costCentreDescr =+ ({-# LINE 460 "GenerateCode.ag" #-}+ "b" ++ ":" ++ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show _lhsInr+ {-# LINE 4640 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 461, column 13)+ _addCostCentre =+ ({-# LINE 461 "GenerateCode.ag" #-}+ \v -> if _lhsIo_costcentre+ then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v+ else v+ {-# LINE 4647 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 465, column 13)+ _params =+ ({-# LINE 465 "GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 4652 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 466, column 13)+ _semFun =+ ({-# LINE 466 "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 tp)+ mbEvalTp | null _params = const Nothing+ | otherwise = Just . idEvalType+ rhs = wrap+ . mkSemFun _lhsInt _lhsInr [mkLambdaArg (lhsname True nm) (mbEvalTp $ typeToCodeType (Just _lhsInt) _params 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 4682 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 497, column 13)+ _tsig =+ ({-# LINE 497 "GenerateCode.ag" #-}+ TSig _funcname _semType+ {-# LINE 4687 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 498, column 13)+ _semType =+ ({-# LINE 498 "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+ evalTp | null _params = id+ | otherwise = idEvalType+ in 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 4700 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 509, column 13)+ _lhsOdecls =+ ({-# LINE 509 "GenerateCode.ag" #-}+ ( if _lhsIwith_sig+ then [_tsig, _semFun]+ else [_semFun]+ ) +++ ( if ordered_ && _o_splitsems+ then _blockFunDecls+ else []+ )+ {-# LINE 4712 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 517, column 13)+ _typeSigs =+ ({-# LINE 517 "GenerateCode.ag" #-}+ if _lhsIo_sig && not _o_case+ then _vssItSigs+ else []+ {-# LINE 4719 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 520, column 13)+ _o_do =+ ({-# LINE 520 "GenerateCode.ag" #-}+ ordered_ && _lhsIo_monadic+ {-# LINE 4724 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 521, column 13)+ _o_case =+ ({-# LINE 521 "GenerateCode.ag" #-}+ not _o_do && _lhsIo_case && ordered_ && not (hasPragma _lhsIallPragmas _lhsInt _lhsIcon _NOCASE)+ {-# LINE 4729 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 522, column 13)+ _declsType =+ ({-# LINE 522 "GenerateCode.ag" #-}+ if _o_do+ then DeclsDo+ else if _o_case+ then DeclsCase+ else DeclsLet+ {-# LINE 4738 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 527, column 13)+ _o_splitsems =+ ({-# LINE 527 "GenerateCode.ag" #-}+ ordered_ && _lhsIo_splitsems+ {-# LINE 4743 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 560, column 7)+ _lhsOgatherInstVisitNrs =+ ({-# LINE 560 "GenerateCode.ag" #-}+ Map.fromList [(i,_lhsInr) | i <- _vssIdefinedInsts]+ {-# LINE 4748 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 603, column 7)+ _vssOdeclsAbove =+ ({-# LINE 603 "GenerateCode.ag" #-}+ []+ {-# LINE 4753 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 604, column 7)+ _intraOdeclsAbove =+ ({-# LINE 604 "GenerateCode.ag" #-}+ error "declsAbove: not used here"+ {-# LINE 4758 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 886, column 18)+ _lhsOcomments =+ ({-# LINE 886 "GenerateCode.ag" #-}+ let body = map ind (_vssIcomments ++ _intraIcomments)+ in if null body+ then []+ else ("visit " ++ show _lhsInr ++ ":") : body+ {-# LINE 4766 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 890, column 18)+ _vssOwhat =+ ({-# LINE 890 "GenerateCode.ag" #-}+ "local"+ {-# LINE 4771 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 891, column 18)+ _intraOwhat =+ ({-# LINE 891 "GenerateCode.ag" #-}+ "intra"+ {-# LINE 4776 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 1135, column 7)+ _lhsOsemNames =+ ({-# LINE 1135 "GenerateCode.ag" #-}+ [_funcname ]+ {-# LINE 4781 "GenerateCode.hs" #-})+ -- copy rule (up)+ _lhsOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _intraIvisitedSet+ {-# LINE 4786 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 4791 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOaroundMap =+ ({-# LINE 572 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 4796 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOchildren =+ ({-# LINE 252 "GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 4801 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOcon =+ ({-# LINE 89 "GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 4806 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 4811 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOinstVisitNrs =+ ({-# LINE 552 "GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 4816 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOmergeMap =+ ({-# LINE 588 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 4821 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOnr =+ ({-# LINE 271 "GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 4826 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 4831 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _vssOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _o_case+ {-# LINE 4836 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 4841 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 4846 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 4851 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 4856 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 4861 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 4866 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 4871 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 4876 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 4881 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 4886 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _vssOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _o_splitsems+ {-# LINE 4891 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 4896 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 4901 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 4906 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 4911 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOparamInstMap =+ ({-# LINE 101 "GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 4916 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 4921 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 4926 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 4931 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOterminals =+ ({-# LINE 90 "GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 4936 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 4941 "GenerateCode.hs" #-})+ -- copy rule (down)+ _vssOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 4946 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 4951 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOaroundMap =+ ({-# LINE 572 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 4956 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOchildren =+ ({-# LINE 252 "GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 4961 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOcon =+ ({-# LINE 89 "GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 4966 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 4971 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOinstVisitNrs =+ ({-# LINE 552 "GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 4976 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOmergeMap =+ ({-# LINE 588 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 4981 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOnr =+ ({-# LINE 271 "GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 4986 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 4991 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _intraOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _o_case+ {-# LINE 4996 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 5001 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 5006 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 5011 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 5016 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 5021 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 5026 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 5031 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 5036 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 5041 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 5046 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _intraOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _o_splitsems+ {-# LINE 5051 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 5056 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 5061 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 5066 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 5071 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOparamInstMap =+ ({-# LINE 101 "GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 5076 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 5081 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 5086 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 5091 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOterminals =+ ({-# LINE 90 "GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 5096 "GenerateCode.hs" #-})+ -- copy rule (down)+ _intraOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 5101 "GenerateCode.hs" #-})+ -- copy rule (chain)+ _intraOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _vssIvisitedSet+ {-# LINE 5106 "GenerateCode.hs" #-})+ ( _vssIallTpsFound,_vssIblockDecls,_vssIcomments,_vssIdecls,_vssIdeclsAbove,_vssIdefinedInsts,_vssIexprs,_vssItSigs,_vssItps,_vssIusedVars,_vssIvisitedSet) =+ vss_ _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 + ( _intraIallTpsFound,_intraIblockDecls,_intraIcomments,_intraIdecls,_intraIdeclsAbove,_intraIdefinedInsts,_intraIexprs,_intraItSigs,_intraItps,_intraIusedVars,_intraIvisitedSet) =+ intra_ _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 + in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames,_lhsOvisitedSet))) )+-- CVisits -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ allPragmas : PragmaMap+ aroundMap : Set Identifier+ children : [(Identifier,Type, Maybe (Maybe Type))]+ con : ConstructorIdent+ contextMap : ContextMap+ inh : Attributes+ instVisitNrs : Map Identifier Int+ mergeMap : Map Identifier (Identifier, [Identifier])+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramInstMap : Map Identifier (NontermIdent, [String])+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ terminals : [Identifier]+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ with_sig : Bool+ chained attribute:+ visitedSet : Set Identifier+ synthesized attributes:+ comments : [String]+ decls : Decls+ gatherInstVisitNrs : Map Identifier Int+ intra : Exprs+ intraVars : Set String+ isNil : Bool+ semNames : [String]+ alternatives:+ alternative Cons:+ child hd : CVisit + child tl : CVisits + alternative Nil:+-}+-- cata+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 ((Set NontermIdent) ->+ PragmaMap ->+ (Set Identifier) ->+ ([(Identifier,Type, Maybe (Maybe Type))]) ->+ 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 ->+ Attributes ->+ ([Identifier]) ->+ (NontermIdent -> Int -> [String] -> Code.Type) ->+ (Set Identifier) ->+ Bool ->+ ( ([String]),Decls,(Map Identifier Int),Exprs,(Set String),Bool,([String]),(Set Identifier)))+data Inh_CVisits = Inh_CVisits {allNts_Inh_CVisits :: !((Set NontermIdent)),allPragmas_Inh_CVisits :: !(PragmaMap),aroundMap_Inh_CVisits :: !((Set Identifier)),children_Inh_CVisits :: !(([(Identifier,Type, Maybe (Maybe Type))])),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),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)}+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))}+wrap_CVisits :: T_CVisits ->+ Inh_CVisits ->+ Syn_CVisits +wrap_CVisits (T_CVisits sem ) (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 _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig ) =+ (let ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet) = sem _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 _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig + in (Syn_CVisits _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet ))+sem_CVisits_Cons :: T_CVisit ->+ T_CVisits ->+ T_CVisits +sem_CVisits_Cons (T_CVisit hd_ ) (T_CVisits tl_ ) =+ (T_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+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwith_sig ->+ (let _tlOnr :: Int+ _lhsOisNil :: Bool+ _hdOisLast :: Bool+ _hdOnextIntra :: Exprs+ _hdOnextIntraVars :: (Set String)+ _lhsOintra :: Exprs+ _lhsOintraVars :: (Set String)+ _lhsOdecls :: Decls+ _hdOdecls :: Decls+ _lhsOcomments :: ([String])+ _lhsOgatherInstVisitNrs :: (Map Identifier Int)+ _lhsOsemNames :: ([String])+ _lhsOvisitedSet :: (Set Identifier)+ _hdOallNts :: (Set NontermIdent)+ _hdOallPragmas :: PragmaMap+ _hdOaroundMap :: (Set Identifier)+ _hdOchildren :: ([(Identifier,Type, Maybe (Maybe Type))])+ _hdOcon :: ConstructorIdent+ _hdOcontextMap :: ContextMap+ _hdOinh :: Attributes+ _hdOinstVisitNrs :: (Map Identifier Int)+ _hdOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _hdOnr :: Int+ _hdOnt :: NontermIdent+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _hdOterminals :: ([Identifier])+ _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _hdOvisitedSet :: (Set Identifier)+ _hdOwith_sig :: Bool+ _tlOallNts :: (Set NontermIdent)+ _tlOallPragmas :: PragmaMap+ _tlOaroundMap :: (Set Identifier)+ _tlOchildren :: ([(Identifier,Type, Maybe (Maybe Type))])+ _tlOcon :: ConstructorIdent+ _tlOcontextMap :: ContextMap+ _tlOinh :: Attributes+ _tlOinstVisitNrs :: (Map Identifier Int)+ _tlOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _tlOnt :: NontermIdent+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _tlOterminals :: ([Identifier])+ _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _tlOvisitedSet :: (Set Identifier)+ _tlOwith_sig :: Bool+ _hdIcomments :: ([String])+ _hdIdecls :: Decls+ _hdIgatherInstVisitNrs :: (Map Identifier Int)+ _hdIintra :: Exprs+ _hdIintraVars :: (Set String)+ _hdIsemNames :: ([String])+ _hdIvisitedSet :: (Set Identifier)+ _tlIcomments :: ([String])+ _tlIdecls :: Decls+ _tlIgatherInstVisitNrs :: (Map Identifier Int)+ _tlIintra :: Exprs+ _tlIintraVars :: (Set String)+ _tlIisNil :: Bool+ _tlIsemNames :: ([String])+ _tlIvisitedSet :: (Set Identifier)+ -- "GenerateCode.ag"(line 275, column 11)+ _tlOnr =+ ({-# LINE 275 "GenerateCode.ag" #-}+ _lhsInr + 1+ {-# LINE 5356 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 288, column 12)+ _lhsOisNil =+ ({-# LINE 288 "GenerateCode.ag" #-}+ False+ {-# LINE 5361 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 289, column 12)+ _hdOisLast =+ ({-# LINE 289 "GenerateCode.ag" #-}+ _tlIisNil+ {-# LINE 5366 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 306, column 12)+ _hdOnextIntra =+ ({-# LINE 306 "GenerateCode.ag" #-}+ _tlIintra+ {-# LINE 5371 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 307, column 12)+ _hdOnextIntraVars =+ ({-# LINE 307 "GenerateCode.ag" #-}+ _tlIintraVars+ {-# LINE 5376 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 308, column 12)+ _lhsOintra =+ ({-# LINE 308 "GenerateCode.ag" #-}+ _hdIintra+ {-# LINE 5381 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 309, column 12)+ _lhsOintraVars =+ ({-# LINE 309 "GenerateCode.ag" #-}+ _hdIintraVars+ {-# LINE 5386 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 433, column 11)+ _lhsOdecls =+ ({-# LINE 433 "GenerateCode.ag" #-}+ _hdIdecls+ {-# LINE 5391 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 434, column 11)+ _hdOdecls =+ ({-# LINE 434 "GenerateCode.ag" #-}+ _tlIdecls+ {-# LINE 5396 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ _hdIcomments ++ _tlIcomments+ {-# LINE 5401 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 553, column 44)+ _lhsOgatherInstVisitNrs =+ ({-# LINE 553 "GenerateCode.ag" #-}+ _hdIgatherInstVisitNrs `Map.union` _tlIgatherInstVisitNrs+ {-# LINE 5406 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 1125, column 61)+ _lhsOsemNames =+ ({-# LINE 1125 "GenerateCode.ag" #-}+ _hdIsemNames ++ _tlIsemNames+ {-# LINE 5411 "GenerateCode.hs" #-})+ -- copy rule (up)+ _lhsOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _tlIvisitedSet+ {-# LINE 5416 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 5421 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOallPragmas =+ ({-# LINE 73 "GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 5426 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 572 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 5431 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOchildren =+ ({-# LINE 412 "GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 5436 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 89 "GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 5441 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOcontextMap =+ ({-# LINE 115 "GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 5446 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 5451 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOinstVisitNrs =+ ({-# LINE 552 "GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 5456 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 588 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 5461 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOnr =+ ({-# LINE 271 "GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 5466 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 5471 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 5476 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 5481 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 5486 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 5491 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 5496 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 5501 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 5506 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 5511 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 5516 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 5521 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 5526 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 5531 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 5536 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 5541 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 5546 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 5551 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOparamInstMap =+ ({-# LINE 101 "GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 5556 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 5561 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 5566 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 5571 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOterminals =+ ({-# LINE 90 "GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 5576 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 5581 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 5586 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOwith_sig =+ ({-# LINE 844 "GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 5591 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 5596 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOallPragmas =+ ({-# LINE 73 "GenerateCode.ag" #-}+ _lhsIallPragmas+ {-# LINE 5601 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 572 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 5606 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOchildren =+ ({-# LINE 412 "GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 5611 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 89 "GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 5616 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOcontextMap =+ ({-# LINE 115 "GenerateCode.ag" #-}+ _lhsIcontextMap+ {-# LINE 5621 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 5626 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOinstVisitNrs =+ ({-# LINE 552 "GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 5631 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 588 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 5636 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 5641 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 5646 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 5651 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 5656 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 5661 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 5666 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 5671 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 5676 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 5681 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 5686 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 5691 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 5696 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 5701 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 5706 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 5711 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 5716 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 5721 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOparamInstMap =+ ({-# LINE 101 "GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 5726 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 5731 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 5736 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 5741 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOterminals =+ ({-# LINE 90 "GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 5746 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 5751 "GenerateCode.hs" #-})+ -- copy rule (chain)+ _tlOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _hdIvisitedSet+ {-# LINE 5756 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOwith_sig =+ ({-# LINE 844 "GenerateCode.ag" #-}+ _lhsIwith_sig+ {-# LINE 5761 "GenerateCode.hs" #-})+ ( _hdIcomments,_hdIdecls,_hdIgatherInstVisitNrs,_hdIintra,_hdIintraVars,_hdIsemNames,_hdIvisitedSet) =+ hd_ _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 _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwith_sig + ( _tlIcomments,_tlIdecls,_tlIgatherInstVisitNrs,_tlIintra,_tlIintraVars,_tlIisNil,_tlIsemNames,_tlIvisitedSet) =+ tl_ _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 _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwith_sig + in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet))) )+sem_CVisits_Nil :: T_CVisits +sem_CVisits_Nil =+ (T_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+ _lhsIsyn+ _lhsIterminals+ _lhsIunfoldSemDom+ _lhsIvisitedSet+ _lhsIwith_sig ->+ (let _lhsOisNil :: Bool+ _lhsOintra :: Exprs+ _lhsOintraVars :: (Set String)+ _lhsOdecls :: Decls+ _lhsOcomments :: ([String])+ _lhsOgatherInstVisitNrs :: (Map Identifier Int)+ _lhsOsemNames :: ([String])+ _lhsOvisitedSet :: (Set Identifier)+ -- "GenerateCode.ag"(line 290, column 10)+ _lhsOisNil =+ ({-# LINE 290 "GenerateCode.ag" #-}+ True+ {-# LINE 5816 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 310, column 10)+ _lhsOintra =+ ({-# LINE 310 "GenerateCode.ag" #-}+ []+ {-# LINE 5821 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 311, column 10)+ _lhsOintraVars =+ ({-# LINE 311 "GenerateCode.ag" #-}+ Set.empty+ {-# LINE 5826 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 432, column 11)+ _lhsOdecls =+ ({-# LINE 432 "GenerateCode.ag" #-}+ []+ {-# LINE 5831 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ []+ {-# LINE 5836 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 553, column 44)+ _lhsOgatherInstVisitNrs =+ ({-# LINE 553 "GenerateCode.ag" #-}+ Map.empty+ {-# LINE 5841 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 1125, column 61)+ _lhsOsemNames =+ ({-# LINE 1125 "GenerateCode.ag" #-}+ []+ {-# LINE 5846 "GenerateCode.hs" #-})+ -- copy rule (chain)+ _lhsOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 5851 "GenerateCode.hs" #-})+ in ( _lhsOcomments,_lhsOdecls,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames,_lhsOvisitedSet))) )+-- DeclBlocks --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ blockNr : Int+ lastExprVars : [String]+ nextVisitDecls : [Decl]+ optCase : Bool+ prefix : String+ synthesized attributes:+ callExpr : Expr+ decls : [Decl]+ freeVars : [String]+ alternatives:+ alternative DeclBlock:+ child defs : {[Decl]}+ child visit : {Decl}+ child next : DeclBlocks + visit 0:+ local lambdaName : _+ local pragmaDecl : _+ local freeVars : _+ local decl : _+ alternative DeclTerminator:+ child defs : {[Decl]}+ child result : {Expr}+ visit 0:+ local lambdaName : _+ local pragmaDecl : _+ local freeVars : _+-}+-- cata+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 (Int ->+ ([String]) ->+ ([Decl]) ->+ Bool ->+ String ->+ ( Expr,([Decl]),([String])))+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]))}+wrap_DeclBlocks :: T_DeclBlocks ->+ Inh_DeclBlocks ->+ Syn_DeclBlocks +wrap_DeclBlocks (T_DeclBlocks sem ) (Inh_DeclBlocks _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix ) =+ (let ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars) = sem _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix + in (Syn_DeclBlocks _lhsOcallExpr _lhsOdecls _lhsOfreeVars ))+sem_DeclBlocks_DeclBlock :: ([Decl]) ->+ Decl ->+ T_DeclBlocks ->+ T_DeclBlocks +sem_DeclBlocks_DeclBlock defs_ visit_ (T_DeclBlocks next_ ) =+ (T_DeclBlocks (\ _lhsIblockNr+ _lhsIlastExprVars+ _lhsInextVisitDecls+ _lhsIoptCase+ _lhsIprefix ->+ (let _nextOblockNr :: Int+ _lhsOcallExpr :: Expr+ _lhsOdecls :: ([Decl])+ _lhsOfreeVars :: ([String])+ _nextOlastExprVars :: ([String])+ _nextOnextVisitDecls :: ([Decl])+ _nextOoptCase :: Bool+ _nextOprefix :: String+ _nextIcallExpr :: Expr+ _nextIdecls :: ([Decl])+ _nextIfreeVars :: ([String])+ -- "GenerateCode.ag"(line 654, column 7)+ _nextOblockNr =+ ({-# LINE 654 "GenerateCode.ag" #-}+ _lhsIblockNr + 1+ {-# LINE 5931 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 659, column 7)+ _lambdaName =+ ({-# LINE 659 "GenerateCode.ag" #-}+ _lhsIprefix ++ "_block" ++ show _lhsIblockNr+ {-# LINE 5936 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 660, column 7)+ _pragmaDecl =+ ({-# LINE 660 "GenerateCode.ag" #-}+ PragmaDecl ("NOINLINE " ++ _lambdaName )+ {-# LINE 5941 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 661, column 7)+ _lhsOcallExpr =+ ({-# LINE 661 "GenerateCode.ag" #-}+ App _lambdaName (map SimpleExpr _freeVars )+ {-# LINE 5946 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 665, column 7)+ _freeVars =+ ({-# LINE 665 "GenerateCode.ag" #-}+ freevars _nextIfreeVars (visit_ : defs_)+ {-# LINE 5951 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 672, column 7)+ _decl =+ ({-# LINE 672 "GenerateCode.ag" #-}+ mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ [visit_]) _nextIcallExpr+ {-# LINE 5956 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 673, column 7)+ _lhsOdecls =+ ({-# LINE 673 "GenerateCode.ag" #-}+ (if _lhsIblockNr > 1 then [_pragmaDecl ] else []) ++ [_decl ] ++ _nextIdecls+ {-# LINE 5961 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _lhsOfreeVars =+ ({-# LINE 656 "GenerateCode.ag" #-}+ _freeVars+ {-# LINE 5966 "GenerateCode.hs" #-})+ -- copy rule (down)+ _nextOlastExprVars =+ ({-# LINE 640 "GenerateCode.ag" #-}+ _lhsIlastExprVars+ {-# LINE 5971 "GenerateCode.hs" #-})+ -- copy rule (down)+ _nextOnextVisitDecls =+ ({-# LINE 640 "GenerateCode.ag" #-}+ _lhsInextVisitDecls+ {-# LINE 5976 "GenerateCode.hs" #-})+ -- copy rule (down)+ _nextOoptCase =+ ({-# LINE 640 "GenerateCode.ag" #-}+ _lhsIoptCase+ {-# LINE 5981 "GenerateCode.hs" #-})+ -- copy rule (down)+ _nextOprefix =+ ({-# LINE 640 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 5986 "GenerateCode.hs" #-})+ ( _nextIcallExpr,_nextIdecls,_nextIfreeVars) =+ next_ _nextOblockNr _nextOlastExprVars _nextOnextVisitDecls _nextOoptCase _nextOprefix + in ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars))) )+sem_DeclBlocks_DeclTerminator :: ([Decl]) ->+ Expr ->+ T_DeclBlocks +sem_DeclBlocks_DeclTerminator defs_ result_ =+ (T_DeclBlocks (\ _lhsIblockNr+ _lhsIlastExprVars+ _lhsInextVisitDecls+ _lhsIoptCase+ _lhsIprefix ->+ (let _lhsOcallExpr :: Expr+ _lhsOdecls :: ([Decl])+ _lhsOfreeVars :: ([String])+ -- "GenerateCode.ag"(line 659, column 7)+ _lambdaName =+ ({-# LINE 659 "GenerateCode.ag" #-}+ _lhsIprefix ++ "_block" ++ show _lhsIblockNr+ {-# LINE 6006 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 660, column 7)+ _pragmaDecl =+ ({-# LINE 660 "GenerateCode.ag" #-}+ PragmaDecl ("NOINLINE " ++ _lambdaName )+ {-# LINE 6011 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 661, column 7)+ _lhsOcallExpr =+ ({-# LINE 661 "GenerateCode.ag" #-}+ App _lambdaName (map SimpleExpr _freeVars )+ {-# LINE 6016 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 663, column 7)+ _freeVars =+ ({-# LINE 663 "GenerateCode.ag" #-}+ freevars _lhsIlastExprVars (defs_ ++ _lhsInextVisitDecls)+ {-# LINE 6021 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 670, column 7)+ _lhsOdecls =+ ({-# LINE 670 "GenerateCode.ag" #-}+ [ mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ _lhsInextVisitDecls) result_ ]+ {-# LINE 6026 "GenerateCode.hs" #-})+ -- copy rule (from local)+ _lhsOfreeVars =+ ({-# LINE 656 "GenerateCode.ag" #-}+ _freeVars+ {-# LINE 6031 "GenerateCode.hs" #-})+ in ( _lhsOcallExpr,_lhsOdecls,_lhsOfreeVars))) )+-- DeclBlocksRoot ----------------------------------------------+{-+ visit 0:+ inherited attributes:+ lastExprVars : [String]+ nextVisitDecls : [Decl]+ optCase : Bool+ prefix : String+ synthesized attributes:+ firstCall : Expr+ lambdas : [Decl]+ alternatives:+ alternative DeclBlocksRoot:+ child blocks : DeclBlocks +-}+-- cata+sem_DeclBlocksRoot :: DeclBlocksRoot ->+ T_DeclBlocksRoot +sem_DeclBlocksRoot (DeclBlocksRoot _blocks ) =+ (sem_DeclBlocksRoot_DeclBlocksRoot (sem_DeclBlocks _blocks ) )+-- semantic domain+newtype T_DeclBlocksRoot = T_DeclBlocksRoot (([String]) ->+ ([Decl]) ->+ Bool ->+ String ->+ ( Expr,([Decl])))+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]))}+wrap_DeclBlocksRoot :: T_DeclBlocksRoot ->+ Inh_DeclBlocksRoot ->+ Syn_DeclBlocksRoot +wrap_DeclBlocksRoot (T_DeclBlocksRoot sem ) (Inh_DeclBlocksRoot _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix ) =+ (let ( _lhsOfirstCall,_lhsOlambdas) = sem _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix + in (Syn_DeclBlocksRoot _lhsOfirstCall _lhsOlambdas ))+sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks ->+ T_DeclBlocksRoot +sem_DeclBlocksRoot_DeclBlocksRoot (T_DeclBlocks blocks_ ) =+ (T_DeclBlocksRoot (\ _lhsIlastExprVars+ _lhsInextVisitDecls+ _lhsIoptCase+ _lhsIprefix ->+ (let _lhsOlambdas :: ([Decl])+ _lhsOfirstCall :: Expr+ _blocksOblockNr :: Int+ _blocksOlastExprVars :: ([String])+ _blocksOnextVisitDecls :: ([Decl])+ _blocksOoptCase :: Bool+ _blocksOprefix :: String+ _blocksIcallExpr :: Expr+ _blocksIdecls :: ([Decl])+ _blocksIfreeVars :: ([String])+ -- "GenerateCode.ag"(line 645, column 7)+ _lhsOlambdas =+ ({-# LINE 645 "GenerateCode.ag" #-}+ _blocksIdecls+ {-# LINE 6088 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 646, column 7)+ _lhsOfirstCall =+ ({-# LINE 646 "GenerateCode.ag" #-}+ _blocksIcallExpr+ {-# LINE 6093 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 651, column 7)+ _blocksOblockNr =+ ({-# LINE 651 "GenerateCode.ag" #-}+ 1+ {-# LINE 6098 "GenerateCode.hs" #-})+ -- copy rule (down)+ _blocksOlastExprVars =+ ({-# LINE 640 "GenerateCode.ag" #-}+ _lhsIlastExprVars+ {-# LINE 6103 "GenerateCode.hs" #-})+ -- copy rule (down)+ _blocksOnextVisitDecls =+ ({-# LINE 640 "GenerateCode.ag" #-}+ _lhsInextVisitDecls+ {-# LINE 6108 "GenerateCode.hs" #-})+ -- copy rule (down)+ _blocksOoptCase =+ ({-# LINE 640 "GenerateCode.ag" #-}+ _lhsIoptCase+ {-# LINE 6113 "GenerateCode.hs" #-})+ -- copy rule (down)+ _blocksOprefix =+ ({-# LINE 640 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 6118 "GenerateCode.hs" #-})+ ( _blocksIcallExpr,_blocksIdecls,_blocksIfreeVars) =+ blocks_ _blocksOblockNr _blocksOlastExprVars _blocksOnextVisitDecls _blocksOoptCase _blocksOprefix + in ( _lhsOfirstCall,_lhsOlambdas))) )+-- Pattern -----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : SELF + definedInsts : [Identifier]+ patternAttributes : [(Identifier, Identifier)]+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + child parts : Patterns + visit 0:+ local copy : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local copy : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local copy : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern +sem_Pattern (Alias _field _attr _pat _parts ) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )+sem_Pattern (Constr _name _pats ) =+ (sem_Pattern_Constr _name (sem_Patterns _pats ) )+sem_Pattern (Irrefutable _pat ) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat ) )+sem_Pattern (Product _pos _pats ) =+ (sem_Pattern_Product _pos (sem_Patterns _pats ) )+sem_Pattern (Underscore _pos ) =+ (sem_Pattern_Underscore _pos )+-- semantic domain+newtype T_Pattern = T_Pattern (( Pattern ,([Identifier]),([(Identifier, Identifier)])))+data Inh_Pattern = Inh_Pattern {}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern ),definedInsts_Syn_Pattern :: !(([Identifier])),patternAttributes_Syn_Pattern :: !(([(Identifier, Identifier)]))}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern +wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =+ (let ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes) = sem + in (Syn_Pattern _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes ))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern + _patIcopy :: Pattern + _patIdefinedInsts :: ([Identifier])+ _patIpatternAttributes :: ([(Identifier, Identifier)])+ _partsIcopy :: Patterns + _partsIdefinedInsts :: ([Identifier])+ _partsIpatternAttributes :: ([(Identifier, Identifier)])+ -- "GenerateCode.ag"(line 256, column 11)+ _lhsOdefinedInsts =+ ({-# LINE 256 "GenerateCode.ag" #-}+ (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts+ {-# LINE 6198 "GenerateCode.hs" #-})+ -- "GenerateCode.ag"(line 264, column 7)+ _lhsOpatternAttributes =+ ({-# LINE 264 "GenerateCode.ag" #-}+ (field_,attr_) : (_patIpatternAttributes ++ _partsIpatternAttributes)+ {-# LINE 6203 "GenerateCode.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Alias field_ attr_ _patIcopy _partsIcopy+ {-# LINE 6208 "GenerateCode.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 6213 "GenerateCode.hs" #-})+ ( _patIcopy,_patIdefinedInsts,_patIpatternAttributes) =+ pat_ + ( _partsIcopy,_partsIdefinedInsts,_partsIpatternAttributes) =+ parts_ + in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Constr name_ (T_Patterns pats_ ) =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns + _patsIdefinedInsts :: ([Identifier])+ _patsIpatternAttributes :: ([(Identifier, Identifier)])+ -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ _patsIdefinedInsts+ {-# LINE 6233 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 261, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 261 "GenerateCode.ag" #-}+ _patsIpatternAttributes+ {-# LINE 6238 "GenerateCode.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 6243 "GenerateCode.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 6248 "GenerateCode.hs" #-})+ ( _patsIcopy,_patsIdefinedInsts,_patsIpatternAttributes) =+ pats_ + in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern +sem_Pattern_Irrefutable (T_Pattern pat_ ) =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern + _patIcopy :: Pattern + _patIdefinedInsts :: ([Identifier])+ _patIpatternAttributes :: ([(Identifier, Identifier)])+ -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ _patIdefinedInsts+ {-# LINE 6265 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 261, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 261 "GenerateCode.ag" #-}+ _patIpatternAttributes+ {-# LINE 6270 "GenerateCode.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 6275 "GenerateCode.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 6280 "GenerateCode.hs" #-})+ ( _patIcopy,_patIdefinedInsts,_patIpatternAttributes) =+ pat_ + in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Product pos_ (T_Patterns pats_ ) =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns + _patsIdefinedInsts :: ([Identifier])+ _patsIpatternAttributes :: ([(Identifier, Identifier)])+ -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ _patsIdefinedInsts+ {-# LINE 6298 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 261, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 261 "GenerateCode.ag" #-}+ _patsIpatternAttributes+ {-# LINE 6303 "GenerateCode.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 6308 "GenerateCode.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 6313 "GenerateCode.hs" #-})+ ( _patsIcopy,_patsIdefinedInsts,_patsIpatternAttributes) =+ pats_ + in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )+sem_Pattern_Underscore :: Pos ->+ T_Pattern +sem_Pattern_Underscore pos_ =+ (T_Pattern (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Pattern + -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ []+ {-# LINE 6327 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 261, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 261 "GenerateCode.ag" #-}+ []+ {-# LINE 6332 "GenerateCode.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Underscore pos_+ {-# LINE 6337 "GenerateCode.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 6342 "GenerateCode.hs" #-})+ in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )+-- Patterns ----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : SELF + definedInsts : [Identifier]+ patternAttributes : [(Identifier, Identifier)]+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+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 (( Patterns ,([Identifier]),([(Identifier, Identifier)])))+data Inh_Patterns = Inh_Patterns {}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns ),definedInsts_Syn_Patterns :: !(([Identifier])),patternAttributes_Syn_Patterns :: !(([(Identifier, Identifier)]))}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns +wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =+ (let ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes) = sem + in (Syn_Patterns _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes ))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns +sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =+ (T_Patterns (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Patterns + _hdIcopy :: Pattern + _hdIdefinedInsts :: ([Identifier])+ _hdIpatternAttributes :: ([(Identifier, Identifier)])+ _tlIcopy :: Patterns + _tlIdefinedInsts :: ([Identifier])+ _tlIpatternAttributes :: ([(Identifier, Identifier)])+ -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 6393 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 261, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 261 "GenerateCode.ag" #-}+ _hdIpatternAttributes ++ _tlIpatternAttributes+ {-# LINE 6398 "GenerateCode.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 6403 "GenerateCode.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 6408 "GenerateCode.hs" #-})+ ( _hdIcopy,_hdIdefinedInsts,_hdIpatternAttributes) =+ hd_ + ( _tlIcopy,_tlIdefinedInsts,_tlIpatternAttributes) =+ tl_ + in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil =+ (T_Patterns (let _lhsOdefinedInsts :: ([Identifier])+ _lhsOpatternAttributes :: ([(Identifier, Identifier)])+ _lhsOcopy :: Patterns + -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ []+ {-# LINE 6423 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 261, column 47)+ _lhsOpatternAttributes =+ ({-# LINE 261 "GenerateCode.ag" #-}+ []+ {-# LINE 6428 "GenerateCode.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ []+ {-# LINE 6433 "GenerateCode.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 6438 "GenerateCode.hs" #-})+ in ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )+-- Sequence ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allNts : Set NontermIdent+ aroundMap : Set Identifier+ children : [(Identifier,Type,Maybe (Maybe Type))]+ con : ConstructorIdent+ inh : Attributes+ instVisitNrs : Map Identifier Int+ lastExpr : Expr+ mergeMap : Map Identifier (Identifier, [Identifier])+ nr : Int+ nt : NontermIdent+ o_case : Bool+ o_cata : Bool+ o_costcentre : Bool+ o_data : Maybe Bool+ o_linePragmas : Bool+ o_monadic : Bool+ o_newtypes : Bool+ o_pretty : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_splitsems : Bool+ o_strictwrap : Bool+ o_traces : Bool+ o_unbox : Bool+ options : Options+ paramInstMap : Map Identifier (NontermIdent, [String])+ paramMap : ParamMap+ prefix : String+ syn : Attributes+ terminals : [Identifier]+ unfoldSemDom : NontermIdent -> Int -> [String] -> Code.Type+ what : String+ chained attributes:+ declsAbove : [Decl]+ visitedSet : Set Identifier+ synthesized attributes:+ allTpsFound : Bool+ blockDecls : DeclBlocks + comments : [String]+ decls : Decls+ definedInsts : [Identifier]+ exprs : Exprs+ tSigs : [Decl]+ tps : [Type]+ usedVars : Set String+ alternatives:+ alternative Cons:+ child hd : CRule + child tl : Sequence + alternative Nil:+-}+-- cata+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 ((Set NontermIdent) ->+ (Set Identifier) ->+ ([(Identifier,Type,Maybe (Maybe Type))]) ->+ 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 ->+ ( Bool,DeclBlocks ,([String]),Decls,([Decl]),([Identifier]),Exprs,([Decl]),([Type]),(Set String),(Set Identifier)))+data Inh_Sequence = Inh_Sequence {allNts_Inh_Sequence :: !((Set NontermIdent)),aroundMap_Inh_Sequence :: !((Set Identifier)),children_Inh_Sequence :: !(([(Identifier,Type,Maybe (Maybe Type))])),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))}+wrap_Sequence :: T_Sequence ->+ Inh_Sequence ->+ Syn_Sequence +wrap_Sequence (T_Sequence sem ) (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 ) =+ (let ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet) = sem _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 + in (Syn_Sequence _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet ))+sem_Sequence_Cons :: T_CRule ->+ T_Sequence ->+ T_Sequence +sem_Sequence_Cons (T_CRule hd_ ) (T_Sequence tl_ ) =+ (T_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 ->+ (let _lhsOblockDecls :: DeclBlocks + _lhsOallTpsFound :: Bool+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOexprs :: Exprs+ _lhsOtSigs :: ([Decl])+ _lhsOtps :: ([Type])+ _lhsOusedVars :: (Set String)+ _lhsOdeclsAbove :: ([Decl])+ _lhsOvisitedSet :: (Set Identifier)+ _hdOallNts :: (Set NontermIdent)+ _hdOaroundMap :: (Set Identifier)+ _hdOchildren :: ([(Identifier,Type,Maybe (Maybe Type))])+ _hdOcon :: ConstructorIdent+ _hdOdeclsAbove :: ([Decl])+ _hdOinh :: Attributes+ _hdOinstVisitNrs :: (Map Identifier Int)+ _hdOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _hdOnr :: Int+ _hdOnt :: NontermIdent+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_costcentre :: Bool+ _hdOo_data :: (Maybe Bool)+ _hdOo_linePragmas :: Bool+ _hdOo_monadic :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_pretty :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_splitsems :: Bool+ _hdOo_strictwrap :: Bool+ _hdOo_traces :: Bool+ _hdOo_unbox :: Bool+ _hdOoptions :: Options+ _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _hdOparamMap :: ParamMap+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _hdOterminals :: ([Identifier])+ _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _hdOvisitedSet :: (Set Identifier)+ _hdOwhat :: String+ _tlOallNts :: (Set NontermIdent)+ _tlOaroundMap :: (Set Identifier)+ _tlOchildren :: ([(Identifier,Type,Maybe (Maybe Type))])+ _tlOcon :: ConstructorIdent+ _tlOdeclsAbove :: ([Decl])+ _tlOinh :: Attributes+ _tlOinstVisitNrs :: (Map Identifier Int)+ _tlOlastExpr :: Expr+ _tlOmergeMap :: (Map Identifier (Identifier, [Identifier]))+ _tlOnr :: Int+ _tlOnt :: NontermIdent+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_costcentre :: Bool+ _tlOo_data :: (Maybe Bool)+ _tlOo_linePragmas :: Bool+ _tlOo_monadic :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_pretty :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_splitsems :: Bool+ _tlOo_strictwrap :: Bool+ _tlOo_traces :: Bool+ _tlOo_unbox :: Bool+ _tlOoptions :: Options+ _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))+ _tlOparamMap :: ParamMap+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _tlOterminals :: ([Identifier])+ _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+ _tlOvisitedSet :: (Set Identifier)+ _tlOwhat :: String+ _hdIallTpsFound :: Bool+ _hdIbldBlocksFun :: (DeclBlocks -> DeclBlocks)+ _hdIcomments :: ([String])+ _hdIdecls :: Decls+ _hdIdeclsAbove :: ([Decl])+ _hdIdefinedInsts :: ([Identifier])+ _hdIexprs :: Exprs+ _hdItSigs :: ([Decl])+ _hdItps :: ([Type])+ _hdIusedVars :: (Set String)+ _hdIvisitedSet :: (Set Identifier)+ _tlIallTpsFound :: Bool+ _tlIblockDecls :: DeclBlocks + _tlIcomments :: ([String])+ _tlIdecls :: Decls+ _tlIdeclsAbove :: ([Decl])+ _tlIdefinedInsts :: ([Identifier])+ _tlIexprs :: Exprs+ _tlItSigs :: ([Decl])+ _tlItps :: ([Type])+ _tlIusedVars :: (Set String)+ _tlIvisitedSet :: (Set Identifier)+ -- "GenerateCode.ag"(line 614, column 7)+ _lhsOblockDecls =+ ({-# LINE 614 "GenerateCode.ag" #-}+ _hdIbldBlocksFun _tlIblockDecls+ {-# LINE 6691 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 418, column 39)+ _lhsOallTpsFound =+ ({-# LINE 418 "GenerateCode.ag" #-}+ _hdIallTpsFound && _tlIallTpsFound+ {-# LINE 6696 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ _hdIcomments ++ _tlIcomments+ {-# LINE 6701 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 150, column 34)+ _lhsOdecls =+ ({-# LINE 150 "GenerateCode.ag" #-}+ _hdIdecls ++ _tlIdecls+ {-# LINE 6706 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 6711 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 327, column 34)+ _lhsOexprs =+ ({-# LINE 327 "GenerateCode.ag" #-}+ _hdIexprs ++ _tlIexprs+ {-# LINE 6716 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 356, column 33)+ _lhsOtSigs =+ ({-# LINE 356 "GenerateCode.ag" #-}+ _hdItSigs ++ _tlItSigs+ {-# LINE 6721 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 417, column 31)+ _lhsOtps =+ ({-# LINE 417 "GenerateCode.ag" #-}+ _hdItps ++ _tlItps+ {-# LINE 6726 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 345, column 37)+ _lhsOusedVars =+ ({-# LINE 345 "GenerateCode.ag" #-}+ _hdIusedVars `Set.union` _tlIusedVars+ {-# LINE 6731 "GenerateCode.hs" #-})+ -- copy rule (up)+ _lhsOdeclsAbove =+ ({-# LINE 600 "GenerateCode.ag" #-}+ _tlIdeclsAbove+ {-# LINE 6736 "GenerateCode.hs" #-})+ -- copy rule (up)+ _lhsOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _tlIvisitedSet+ {-# LINE 6741 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 6746 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 572 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 6751 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOchildren =+ ({-# LINE 252 "GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 6756 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 89 "GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 6761 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOdeclsAbove =+ ({-# LINE 600 "GenerateCode.ag" #-}+ _lhsIdeclsAbove+ {-# LINE 6766 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 6771 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOinstVisitNrs =+ ({-# LINE 552 "GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 6776 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 588 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 6781 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOnr =+ ({-# LINE 271 "GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 6786 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 6791 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 6796 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 6801 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 6806 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 6811 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 6816 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 6821 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 6826 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 6831 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 6836 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 6841 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 6846 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 6851 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 6856 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 6861 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 6866 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 6871 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOparamInstMap =+ ({-# LINE 101 "GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 6876 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 6881 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 6886 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 6891 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOterminals =+ ({-# LINE 90 "GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 6896 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 6901 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 6906 "GenerateCode.hs" #-})+ -- copy rule (down)+ _hdOwhat =+ ({-# LINE 863 "GenerateCode.ag" #-}+ _lhsIwhat+ {-# LINE 6911 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOallNts =+ ({-# LINE 127 "GenerateCode.ag" #-}+ _lhsIallNts+ {-# LINE 6916 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 572 "GenerateCode.ag" #-}+ _lhsIaroundMap+ {-# LINE 6921 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOchildren =+ ({-# LINE 252 "GenerateCode.ag" #-}+ _lhsIchildren+ {-# LINE 6926 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 89 "GenerateCode.ag" #-}+ _lhsIcon+ {-# LINE 6931 "GenerateCode.hs" #-})+ -- copy rule (chain)+ _tlOdeclsAbove =+ ({-# LINE 600 "GenerateCode.ag" #-}+ _hdIdeclsAbove+ {-# LINE 6936 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIinh+ {-# LINE 6941 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOinstVisitNrs =+ ({-# LINE 552 "GenerateCode.ag" #-}+ _lhsIinstVisitNrs+ {-# LINE 6946 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOlastExpr =+ ({-# LINE 598 "GenerateCode.ag" #-}+ _lhsIlastExpr+ {-# LINE 6951 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 588 "GenerateCode.ag" #-}+ _lhsImergeMap+ {-# LINE 6956 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOnr =+ ({-# LINE 271 "GenerateCode.ag" #-}+ _lhsInr+ {-# LINE 6961 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsInt+ {-# LINE 6966 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_case+ {-# LINE 6971 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_cata+ {-# LINE 6976 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_costcentre =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_costcentre+ {-# LINE 6981 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 48 "GenerateCode.ag" #-}+ _lhsIo_data+ {-# LINE 6986 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_linePragmas =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_linePragmas+ {-# LINE 6991 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_monadic =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_monadic+ {-# LINE 6996 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_newtypes+ {-# LINE 7001 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_pretty =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_pretty+ {-# LINE 7006 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_rename+ {-# LINE 7011 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sem+ {-# LINE 7016 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_sig+ {-# LINE 7021 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_splitsems =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_splitsems+ {-# LINE 7026 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_strictwrap =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_strictwrap+ {-# LINE 7031 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_traces =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_traces+ {-# LINE 7036 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 47 "GenerateCode.ag" #-}+ _lhsIo_unbox+ {-# LINE 7041 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOoptions =+ ({-# LINE 50 "GenerateCode.ag" #-}+ _lhsIoptions+ {-# LINE 7046 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOparamInstMap =+ ({-# LINE 101 "GenerateCode.ag" #-}+ _lhsIparamInstMap+ {-# LINE 7051 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOparamMap =+ ({-# LINE 95 "GenerateCode.ag" #-}+ _lhsIparamMap+ {-# LINE 7056 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 49 "GenerateCode.ag" #-}+ _lhsIprefix+ {-# LINE 7061 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 84 "GenerateCode.ag" #-}+ _lhsIsyn+ {-# LINE 7066 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOterminals =+ ({-# LINE 90 "GenerateCode.ag" #-}+ _lhsIterminals+ {-# LINE 7071 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOunfoldSemDom =+ ({-# LINE 742 "GenerateCode.ag" #-}+ _lhsIunfoldSemDom+ {-# LINE 7076 "GenerateCode.hs" #-})+ -- copy rule (chain)+ _tlOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _hdIvisitedSet+ {-# LINE 7081 "GenerateCode.hs" #-})+ -- copy rule (down)+ _tlOwhat =+ ({-# LINE 863 "GenerateCode.ag" #-}+ _lhsIwhat+ {-# LINE 7086 "GenerateCode.hs" #-})+ ( _hdIallTpsFound,_hdIbldBlocksFun,_hdIcomments,_hdIdecls,_hdIdeclsAbove,_hdIdefinedInsts,_hdIexprs,_hdItSigs,_hdItps,_hdIusedVars,_hdIvisitedSet) =+ hd_ _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 + ( _tlIallTpsFound,_tlIblockDecls,_tlIcomments,_tlIdecls,_tlIdeclsAbove,_tlIdefinedInsts,_tlIexprs,_tlItSigs,_tlItps,_tlIusedVars,_tlIvisitedSet) =+ tl_ _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 + in ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )+sem_Sequence_Nil :: T_Sequence +sem_Sequence_Nil =+ (T_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 ->+ (let _lhsOblockDecls :: DeclBlocks + _lhsOallTpsFound :: Bool+ _lhsOcomments :: ([String])+ _lhsOdecls :: Decls+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOexprs :: Exprs+ _lhsOtSigs :: ([Decl])+ _lhsOtps :: ([Type])+ _lhsOusedVars :: (Set String)+ _lhsOdeclsAbove :: ([Decl])+ _lhsOvisitedSet :: (Set Identifier)+ -- "GenerateCode.ag"(line 616, column 7)+ _lhsOblockDecls =+ ({-# LINE 616 "GenerateCode.ag" #-}+ DeclTerminator _lhsIdeclsAbove _lhsIlastExpr+ {-# LINE 7144 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 418, column 39)+ _lhsOallTpsFound =+ ({-# LINE 418 "GenerateCode.ag" #-}+ True+ {-# LINE 7149 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 861, column 52)+ _lhsOcomments =+ ({-# LINE 861 "GenerateCode.ag" #-}+ []+ {-# LINE 7154 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 150, column 34)+ _lhsOdecls =+ ({-# LINE 150 "GenerateCode.ag" #-}+ []+ {-# LINE 7159 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 254, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 254 "GenerateCode.ag" #-}+ []+ {-# LINE 7164 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 327, column 34)+ _lhsOexprs =+ ({-# LINE 327 "GenerateCode.ag" #-}+ []+ {-# LINE 7169 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 356, column 33)+ _lhsOtSigs =+ ({-# LINE 356 "GenerateCode.ag" #-}+ []+ {-# LINE 7174 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 417, column 31)+ _lhsOtps =+ ({-# LINE 417 "GenerateCode.ag" #-}+ []+ {-# LINE 7179 "GenerateCode.hs" #-})+ -- use rule "GenerateCode.ag"(line 345, column 37)+ _lhsOusedVars =+ ({-# LINE 345 "GenerateCode.ag" #-}+ Set.empty+ {-# LINE 7184 "GenerateCode.hs" #-})+ -- copy rule (chain)+ _lhsOdeclsAbove =+ ({-# LINE 600 "GenerateCode.ag" #-}+ _lhsIdeclsAbove+ {-# LINE 7189 "GenerateCode.hs" #-})+ -- copy rule (chain)+ _lhsOvisitedSet =+ ({-# LINE 140 "GenerateCode.ag" #-}+ _lhsIvisitedSet+ {-# LINE 7194 "GenerateCode.hs" #-}) in ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars,_lhsOvisitedSet))) )
src-derived/HsToken.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (HsToken.ag)+-- UUAGC 0.9.30 (HsToken.ag) module HsToken where {-# LINE 2 "HsToken.ag" #-}
src-derived/Interfaces.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (Interfaces.ag)+-- UUAGC 0.9.30 (Interfaces.ag) module Interfaces where {-# LINE 2 "Interfaces.ag" #-}
src-derived/InterfacesRules.hs view
@@ -1,1242 +1,1228 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.29 (InterfacesRules.lag)-module InterfacesRules where-{-# LINE 10 "InterfacesRules.lag" #-}--import Interfaces-import SequentialTypes-import CodeSyntax-import GrammarInfo--import qualified Data.Sequence as Seq-import Data.Sequence(Seq)-import qualified Data.Map as Map-import Data.Map(Map)-import qualified Data.Set as Set-import Data.Set(Set)-import Data.Tree(Tree(Node))-import Data.Graph(Graph, dfs, edges, buildG, transposeG)-import Data.Maybe (fromJust)-import Data.List (partition,transpose,(\\),nub,intersect, findIndex)-import Data.Array ((!),inRange,bounds,assocs)-import Data.Foldable(toList)--import Debug.Trace(trace)-{-# LINE 27 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 2 "./Interfaces.ag" #-}--import CommonTypes-import SequentialTypes-{-# LINE 33 "../src-derived/InterfacesRules.hs" #-}-{-# LINE 58 "InterfacesRules.lag" #-}--type VisitSS = [Vertex]-{-# LINE 37 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 93 "InterfacesRules.lag" #-}--gather :: Info -> [Vertex] -> [[Vertex]]-gather info = eqClasses comp- where comp a b = isEqualField (ruleTable info ! a) (ruleTable info ! b)-{-# LINE 44 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 134 "InterfacesRules.lag" #-}---- Only non-empty syn will ever be forced, because visits with empty syn are never performed--- Right hand side synthesized attributes always have a field-cv :: (Vertex -> CRule) -> Int -> Vertex -> ([Vertex],[Vertex]) -> (Vertex,ChildVisit)-cv look n v (inh,syn) = let fld = getField (look (head syn))- rnt = fromJust (getRhsNt (look (head syn)))- d = ChildVisit fld rnt n inh syn- in (v,d)-{-# LINE 55 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 157 "InterfacesRules.lag" #-}--ed v (inh,syn) = map (\i -> (i,v)) inh ++ map (\s -> (v,s)) syn-{-# LINE 60 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 244 "InterfacesRules.lag" #-}--postorder (Node a ts) = postorderF ts ++ [a]-postorderF = concatMap postorder-postOrd g = postorderF . dfs g-topSort' g = postOrd g-{-# LINE 68 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 323 "InterfacesRules.lag" #-}--type IntraVisit = [Vertex]-{-# LINE 73 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 345 "InterfacesRules.lag" #-}--swap (a,b) = (b,a)-{-# LINE 78 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 419 "InterfacesRules.lag" #-}--ccv :: Identifier -> NontermIdent -> Int -> CInterfaceMap -> CRule-ccv name nt n table- = CChildVisit name nt n inh syn last- where CInterface segs = Map.findWithDefault (error ("InterfacesRules::ccv::interfaces not in table for nt: " ++ show nt)) nt table- (seg:remain) = drop n segs- CSegment inh syn = seg - last = null remain-{-# LINE 89 "../src-derived/InterfacesRules.hs" #-}--- IRoot --------------------------------------------------------{-- visit 0:- inherited attributes:- dpr : [Edge]- info : Info- tdp : Graph- synthesized attributes:- edp : [Edge]- inters : CInterfaceMap- visits : CVisitsMap- alternatives:- alternative IRoot:- child inters : Interfaces - visit 0:- local newedges : _- local visitssGraph : _- local descr : _--}--- cata-sem_IRoot :: IRoot ->- T_IRoot -sem_IRoot !(IRoot _inters ) =- (sem_IRoot_IRoot (sem_Interfaces _inters ) )--- semantic domain-newtype T_IRoot = T_IRoot (([Edge]) ->- Info ->- Graph ->- ( ([Edge]),CInterfaceMap,CVisitsMap))-data Inh_IRoot = Inh_IRoot {dpr_Inh_IRoot :: !(([Edge])),info_Inh_IRoot :: !(Info),tdp_Inh_IRoot :: !(Graph)}-data Syn_IRoot = Syn_IRoot {edp_Syn_IRoot :: !(([Edge])),inters_Syn_IRoot :: !(CInterfaceMap),visits_Syn_IRoot :: !(CVisitsMap)}-wrap_IRoot :: T_IRoot ->- Inh_IRoot ->- Syn_IRoot -wrap_IRoot !(T_IRoot sem ) !(Inh_IRoot _lhsIdpr _lhsIinfo _lhsItdp ) =- (let ( !_lhsOedp,!_lhsOinters,!_lhsOvisits) =- (sem _lhsIdpr _lhsIinfo _lhsItdp )- in (Syn_IRoot _lhsOedp _lhsOinters _lhsOvisits ))-sem_IRoot_IRoot :: T_Interfaces ->- T_IRoot -sem_IRoot_IRoot !(T_Interfaces inters_ ) =- (T_IRoot (\ (!_lhsIdpr)- (!_lhsIinfo)- (!_lhsItdp) ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 136 "InterfacesRules.hs" #-})) of- { !_intersOinfo ->- (case (({-# LINE 85 "InterfacesRules.lag" #-}- snd (bounds _lhsItdp) + 1- {-# LINE 140 "InterfacesRules.hs" #-})) of- { !_intersOv ->- (case ((inters_ _intersOinfo _intersOv )) of- { ( !_intersIdescr,!_intersIfirstvisitvertices,!_intersInewedges,!_intersIv,!T_Interfaces_1 inters_1) ->- (case (({-# LINE 260 "InterfacesRules.lag" #-}- let terminals = [ v | (v,cr) <- assocs (ruleTable _lhsIinfo), not (getHasCode cr), isLocal cr ]- in _intersIfirstvisitvertices ++ terminals- {-# LINE 147 "InterfacesRules.hs" #-})) of- { !_intersOprev ->- (case (({-# LINE 71 "InterfacesRules.lag" #-}- toList _intersInewedges- {-# LINE 151 "InterfacesRules.hs" #-})) of- { !_newedges ->- (case (({-# LINE 72 "InterfacesRules.lag" #-}- let graph = buildG (0,_intersIv-1) es- es = _newedges ++ edges _lhsItdp- in transposeG graph- {-# LINE 157 "InterfacesRules.hs" #-})) of- { !_visitssGraph ->- (case (({-# LINE 218 "InterfacesRules.lag" #-}- _visitssGraph- {-# LINE 161 "InterfacesRules.hs" #-})) of- { !_intersOvssGraph ->- (case (({-# LINE 147 "InterfacesRules.lag" #-}- toList _intersIdescr- {-# LINE 165 "InterfacesRules.hs" #-})) of- { !_descr ->- (case (({-# LINE 127 "InterfacesRules.lag" #-}- Map.fromList _descr- {-# LINE 169 "InterfacesRules.hs" #-})) of- { !_intersOvisitDescr ->- (case ((inters_1 _intersOprev _intersOvisitDescr _intersOvssGraph )) of- { ( !_intersIinters,!T_Interfaces_2 inters_2) ->- (case (({-# LINE 380 "InterfacesRules.lag" #-}- _intersIinters- {-# LINE 175 "InterfacesRules.hs" #-})) of- { !_intersOallInters ->- (case (({-# LINE 343 "InterfacesRules.lag" #-}- buildG (0,_intersIv-1) (map swap (_lhsIdpr ++ _newedges))- {-# LINE 179 "InterfacesRules.hs" #-})) of- { !_intersOddp ->- (case ((inters_2 _intersOallInters _intersOddp )) of- { ( !_intersIedp,!_intersIvisits) ->- (case (({-# LINE 442 "InterfacesRules.lag" #-}- toList _intersIedp- {-# LINE 185 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 382 "InterfacesRules.lag" #-}- _intersIinters- {-# LINE 189 "InterfacesRules.hs" #-})) of- { !_lhsOinters ->- (case (({-# LINE 383 "InterfacesRules.lag" #-}- _intersIvisits- {-# LINE 193 "InterfacesRules.hs" #-})) of- { !_lhsOvisits ->- ( _lhsOedp,_lhsOinters,_lhsOvisits) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Interface ----------------------------------------------------{-- visit 0:- inherited attribute:- info : Info- chained attribute:- v : Vertex- synthesized attributes:- descr : Seq (Vertex,ChildVisit)- firstvisitvertices : [Vertex]- newedges : Seq Edge - visit 1:- inherited attributes:- prev : [Vertex]- visitDescr : Map Vertex ChildVisit- vssGraph : Graph- synthesized attributes:- inter : CInterface- nt : NontermIdent- visit 2:- inherited attributes:- allInters : CInterfaceMap- ddp : Graph- synthesized attributes:- edp : Seq Edge- visits : Map ConstructorIdent CVisits- alternatives:- alternative Interface:- child nt : {NontermIdent}- child cons : {[ConstructorIdent]}- child seg : Segments - visit 0:- local look : {Vertex -> CRule}- local v : _- local firstvisitvertices : _- local descr : _- local newedges : _--}--- cata-sem_Interface :: Interface ->- T_Interface -sem_Interface !(Interface _nt _cons _seg ) =- (sem_Interface_Interface _nt _cons (sem_Segments _seg ) )--- semantic domain-newtype T_Interface = T_Interface (Info ->- Vertex ->- ( (Seq (Vertex,ChildVisit)),([Vertex]),(Seq Edge ),Vertex,T_Interface_1 ))-newtype T_Interface_1 = T_Interface_1 (([Vertex]) ->- (Map Vertex ChildVisit) ->- Graph ->- ( CInterface,NontermIdent,T_Interface_2 ))-newtype T_Interface_2 = T_Interface_2 (CInterfaceMap ->- Graph ->- ( (Seq Edge),(Map ConstructorIdent CVisits)))-data Inh_Interface = Inh_Interface {allInters_Inh_Interface :: !(CInterfaceMap),ddp_Inh_Interface :: !(Graph),info_Inh_Interface :: !(Info),prev_Inh_Interface :: !(([Vertex])),v_Inh_Interface :: !(Vertex),visitDescr_Inh_Interface :: !((Map Vertex ChildVisit)),vssGraph_Inh_Interface :: !(Graph)}-data Syn_Interface = Syn_Interface {descr_Syn_Interface :: !((Seq (Vertex,ChildVisit))),edp_Syn_Interface :: !((Seq Edge)),firstvisitvertices_Syn_Interface :: !(([Vertex])),inter_Syn_Interface :: !(CInterface),newedges_Syn_Interface :: !((Seq Edge )),nt_Syn_Interface :: !(NontermIdent),v_Syn_Interface :: !(Vertex),visits_Syn_Interface :: !((Map ConstructorIdent CVisits))}-wrap_Interface :: T_Interface ->- Inh_Interface ->- Syn_Interface -wrap_Interface !(T_Interface sem ) !(Inh_Interface _lhsIallInters _lhsIddp _lhsIinfo _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =- (let ( !_lhsOdescr,!_lhsOfirstvisitvertices,!_lhsOnewedges,!_lhsOv,!T_Interface_1 sem_1) =- (sem _lhsIinfo _lhsIv )- ( !_lhsOinter,!_lhsOnt,!T_Interface_2 sem_2) =- (sem_1 _lhsIprev _lhsIvisitDescr _lhsIvssGraph )- ( !_lhsOedp,!_lhsOvisits) =- (sem_2 _lhsIallInters _lhsIddp )- in (Syn_Interface _lhsOdescr _lhsOedp _lhsOfirstvisitvertices _lhsOinter _lhsOnewedges _lhsOnt _lhsOv _lhsOvisits ))-sem_Interface_Interface :: NontermIdent ->- ([ConstructorIdent]) ->- T_Segments ->- T_Interface -sem_Interface_Interface !nt_ !cons_ !(T_Segments seg_ ) =- (T_Interface (\ (!_lhsIinfo)- (!_lhsIv) ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 272 "InterfacesRules.hs" #-})) of- { !_segOinfo ->- (case (({-# LINE 205 "InterfacesRules.lag" #-}- 0- {-# LINE 276 "InterfacesRules.hs" #-})) of- { !_segOn ->- (case (({-# LINE 195 "InterfacesRules.lag" #-}- \a -> ruleTable _lhsIinfo ! a- {-# LINE 280 "InterfacesRules.hs" #-})) of- { !_look ->- (case (({-# LINE 187 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 284 "InterfacesRules.hs" #-})) of- { !_segOv ->- (case ((seg_ _segOinfo _segOn _segOv )) of- { ( !_segIdescr,!_segIgroups,!_segInewedges,!_segInewvertices,!_segIv,!T_Segments_1 seg_1) ->- (case (({-# LINE 188 "InterfacesRules.lag" #-}- _segIv + length _segInewvertices- {-# LINE 290 "InterfacesRules.hs" #-})) of- { !_v ->- (case (({-# LINE 190 "InterfacesRules.lag" #-}- [_segIv .. _v-1]- {-# LINE 294 "InterfacesRules.hs" #-})) of- { !_firstvisitvertices ->- (case (({-# LINE 196 "InterfacesRules.lag" #-}- zipWith (cv _look (-1)) _firstvisitvertices _segIgroups- {-# LINE 298 "InterfacesRules.hs" #-})) of- { !_descr ->- (case (({-# LINE 197 "InterfacesRules.lag" #-}- _segIdescr Seq.>< Seq.fromList _descr- {-# LINE 302 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 258 "InterfacesRules.lag" #-}- _firstvisitvertices- {-# LINE 306 "InterfacesRules.hs" #-})) of- { !_lhsOfirstvisitvertices ->- (case (({-# LINE 191 "InterfacesRules.lag" #-}- zip _firstvisitvertices _segInewvertices- {-# LINE 310 "InterfacesRules.hs" #-})) of- { !_newedges ->- (case (({-# LINE 192 "InterfacesRules.lag" #-}- _segInewedges Seq.>< Seq.fromList _newedges- {-# LINE 314 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 189 "InterfacesRules.lag" #-}- _v- {-# LINE 318 "InterfacesRules.hs" #-})) of- { !_lhsOv ->- (case ((let sem_Interface_Interface_1 :: T_Interface_1 - sem_Interface_Interface_1 =- (T_Interface_1 (\ (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 327 "InterfacesRules.hs" #-})) of- { !_segOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 331 "InterfacesRules.hs" #-})) of- { !_segOvisitDescr ->- (case (({-# LINE 263 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 335 "InterfacesRules.hs" #-})) of- { !_segOprev ->- (case (({-# LINE 237 "InterfacesRules.lag" #-}- cons_- {-# LINE 339 "InterfacesRules.hs" #-})) of- { !_segOcons ->- (case ((seg_1 _segOcons _segOprev _segOvisitDescr _segOvssGraph )) of- { ( !_segIsegs,!T_Segments_2 seg_2) ->- (case (({-# LINE 395 "InterfacesRules.lag" #-}- CInterface _segIsegs- {-# LINE 345 "InterfacesRules.hs" #-})) of- { !_lhsOinter ->- (case (({-# LINE 391 "InterfacesRules.lag" #-}- nt_- {-# LINE 349 "InterfacesRules.hs" #-})) of- { !_lhsOnt ->- (case ((let sem_Interface_Interface_2 :: T_Interface_2 - sem_Interface_Interface_2 =- (T_Interface_2 (\ (!_lhsIallInters)- (!_lhsIddp) ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 357 "InterfacesRules.hs" #-})) of- { !_segOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 361 "InterfacesRules.hs" #-})) of- { !_segOallInters ->- (case (({-# LINE 351 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 365 "InterfacesRules.hs" #-})) of- { !_segOfromLhs ->- (case (({-# LINE 314 "InterfacesRules.lag" #-}- True- {-# LINE 369 "InterfacesRules.hs" #-})) of- { !_segOisFirst ->- (case ((seg_2 _segOallInters _segOddp _segOfromLhs _segOisFirst )) of- { ( !_segIcvisits,!_segIedp,!_segIfirstInh,!_segIhdIntravisits,!_segIprev) ->- (case (({-# LINE 437 "InterfacesRules.lag" #-}- _segIedp- {-# LINE 375 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 396 "InterfacesRules.lag" #-}- Map.fromList (zip cons_ (transpose _segIcvisits))- {-# LINE 379 "InterfacesRules.hs" #-})) of- { !_lhsOvisits ->- ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) })) )- in sem_Interface_Interface_2)) of- { ( !sem_Interface_2) ->- ( _lhsOinter,_lhsOnt,sem_Interface_2) }) }) }) }) }) }) }) })) )- in sem_Interface_Interface_1)) of- { ( !sem_Interface_1) ->- ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interface_1) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Interfaces ---------------------------------------------------{-- visit 0:- inherited attribute:- info : Info- chained attribute:- v : Vertex- synthesized attributes:- descr : Seq (Vertex,ChildVisit)- firstvisitvertices : [Vertex]- newedges : Seq Edge - visit 1:- inherited attributes:- prev : [Vertex]- visitDescr : Map Vertex ChildVisit- vssGraph : Graph- synthesized attribute:- inters : CInterfaceMap- visit 2:- inherited attributes:- allInters : CInterfaceMap- ddp : Graph- synthesized attributes:- edp : Seq Edge- visits : CVisitsMap- alternatives:- alternative Cons:- child hd : Interface - child tl : Interfaces - alternative Nil:--}--- cata-sem_Interfaces :: Interfaces ->- T_Interfaces -sem_Interfaces !list =- (Prelude.foldr sem_Interfaces_Cons sem_Interfaces_Nil (Prelude.map sem_Interface list) )--- semantic domain-newtype T_Interfaces = T_Interfaces (Info ->- Vertex ->- ( (Seq (Vertex,ChildVisit)),([Vertex]),(Seq Edge ),Vertex,T_Interfaces_1 ))-newtype T_Interfaces_1 = T_Interfaces_1 (([Vertex]) ->- (Map Vertex ChildVisit) ->- Graph ->- ( CInterfaceMap,T_Interfaces_2 ))-newtype T_Interfaces_2 = T_Interfaces_2 (CInterfaceMap ->- Graph ->- ( (Seq Edge),CVisitsMap))-data Inh_Interfaces = Inh_Interfaces {allInters_Inh_Interfaces :: !(CInterfaceMap),ddp_Inh_Interfaces :: !(Graph),info_Inh_Interfaces :: !(Info),prev_Inh_Interfaces :: !(([Vertex])),v_Inh_Interfaces :: !(Vertex),visitDescr_Inh_Interfaces :: !((Map Vertex ChildVisit)),vssGraph_Inh_Interfaces :: !(Graph)}-data Syn_Interfaces = Syn_Interfaces {descr_Syn_Interfaces :: !((Seq (Vertex,ChildVisit))),edp_Syn_Interfaces :: !((Seq Edge)),firstvisitvertices_Syn_Interfaces :: !(([Vertex])),inters_Syn_Interfaces :: !(CInterfaceMap),newedges_Syn_Interfaces :: !((Seq Edge )),v_Syn_Interfaces :: !(Vertex),visits_Syn_Interfaces :: !(CVisitsMap)}-wrap_Interfaces :: T_Interfaces ->- Inh_Interfaces ->- Syn_Interfaces -wrap_Interfaces !(T_Interfaces sem ) !(Inh_Interfaces _lhsIallInters _lhsIddp _lhsIinfo _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =- (let ( !_lhsOdescr,!_lhsOfirstvisitvertices,!_lhsOnewedges,!_lhsOv,!T_Interfaces_1 sem_1) =- (sem _lhsIinfo _lhsIv )- ( !_lhsOinters,!T_Interfaces_2 sem_2) =- (sem_1 _lhsIprev _lhsIvisitDescr _lhsIvssGraph )- ( !_lhsOedp,!_lhsOvisits) =- (sem_2 _lhsIallInters _lhsIddp )- in (Syn_Interfaces _lhsOdescr _lhsOedp _lhsOfirstvisitvertices _lhsOinters _lhsOnewedges _lhsOv _lhsOvisits ))-sem_Interfaces_Cons :: T_Interface ->- T_Interfaces ->- T_Interfaces -sem_Interfaces_Cons !(T_Interface hd_ ) !(T_Interfaces tl_ ) =- (T_Interfaces (\ (!_lhsIinfo)- (!_lhsIv) ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 456 "InterfacesRules.hs" #-})) of- { !_hdOv ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 460 "InterfacesRules.hs" #-})) of- { !_hdOinfo ->- (case ((hd_ _hdOinfo _hdOv )) of- { ( !_hdIdescr,!_hdIfirstvisitvertices,!_hdInewedges,!_hdIv,!T_Interface_1 hd_1) ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _hdIv- {-# LINE 466 "InterfacesRules.hs" #-})) of- { !_tlOv ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 470 "InterfacesRules.hs" #-})) of- { !_tlOinfo ->- (case ((tl_ _tlOinfo _tlOv )) of- { ( !_tlIdescr,!_tlIfirstvisitvertices,!_tlInewedges,!_tlIv,!T_Interfaces_1 tl_1) ->- (case (({-# LINE 130 "InterfacesRules.lag" #-}- _hdIdescr Seq.>< _tlIdescr- {-# LINE 476 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 258 "InterfacesRules.lag" #-}- _hdIfirstvisitvertices ++ _tlIfirstvisitvertices- {-# LINE 480 "InterfacesRules.hs" #-})) of- { !_lhsOfirstvisitvertices ->- (case (({-# LINE 129 "InterfacesRules.lag" #-}- _hdInewedges Seq.>< _tlInewedges- {-# LINE 484 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _tlIv- {-# LINE 488 "InterfacesRules.hs" #-})) of- { !_lhsOv ->- (case ((let sem_Interfaces_Cons_1 :: T_Interfaces_1 - sem_Interfaces_Cons_1 =- (T_Interfaces_1 (\ (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 497 "InterfacesRules.hs" #-})) of- { !_tlOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 501 "InterfacesRules.hs" #-})) of- { !_tlOvisitDescr ->- (case (({-# LINE 258 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 505 "InterfacesRules.hs" #-})) of- { !_tlOprev ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 509 "InterfacesRules.hs" #-})) of- { !_hdOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 513 "InterfacesRules.hs" #-})) of- { !_hdOvisitDescr ->- (case (({-# LINE 258 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 517 "InterfacesRules.hs" #-})) of- { !_hdOprev ->- (case ((tl_1 _tlOprev _tlOvisitDescr _tlOvssGraph )) of- { ( !_tlIinters,!T_Interfaces_2 tl_2) ->- (case ((hd_1 _hdOprev _hdOvisitDescr _hdOvssGraph )) of- { ( !_hdIinter,!_hdInt,!T_Interface_2 hd_2) ->- (case (({-# LINE 385 "InterfacesRules.lag" #-}- Map.insert _hdInt _hdIinter _tlIinters- {-# LINE 525 "InterfacesRules.hs" #-})) of- { !_lhsOinters ->- (case ((let sem_Interfaces_Cons_2 :: T_Interfaces_2 - sem_Interfaces_Cons_2 =- (T_Interfaces_2 (\ (!_lhsIallInters)- (!_lhsIddp) ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 533 "InterfacesRules.hs" #-})) of- { !_tlOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 537 "InterfacesRules.hs" #-})) of- { !_tlOallInters ->- (case ((tl_2 _tlOallInters _tlOddp )) of- { ( !_tlIedp,!_tlIvisits) ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 543 "InterfacesRules.hs" #-})) of- { !_hdOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 547 "InterfacesRules.hs" #-})) of- { !_hdOallInters ->- (case ((hd_2 _hdOallInters _hdOddp )) of- { ( !_hdIedp,!_hdIvisits) ->- (case (({-# LINE 437 "InterfacesRules.lag" #-}- _hdIedp Seq.>< _tlIedp- {-# LINE 553 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 386 "InterfacesRules.lag" #-}- Map.insert _hdInt _hdIvisits _tlIvisits- {-# LINE 557 "InterfacesRules.hs" #-})) of- { !_lhsOvisits ->- ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) }) })) )- in sem_Interfaces_Cons_2)) of- { ( !sem_Interfaces_2) ->- ( _lhsOinters,sem_Interfaces_2) }) }) }) }) }) }) }) }) }) })) )- in sem_Interfaces_Cons_1)) of- { ( !sem_Interfaces_1) ->- ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) }) }) }) }) }) }) })) )-sem_Interfaces_Nil :: T_Interfaces -sem_Interfaces_Nil =- (T_Interfaces (\ (!_lhsIinfo)- (!_lhsIv) ->- (case (({-# LINE 130 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 572 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 258 "InterfacesRules.lag" #-}- []- {-# LINE 576 "InterfacesRules.hs" #-})) of- { !_lhsOfirstvisitvertices ->- (case (({-# LINE 129 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 580 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 584 "InterfacesRules.hs" #-})) of- { !_lhsOv ->- (case ((let sem_Interfaces_Nil_1 :: T_Interfaces_1 - sem_Interfaces_Nil_1 =- (T_Interfaces_1 (\ (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 387 "InterfacesRules.lag" #-}- Map.empty- {-# LINE 593 "InterfacesRules.hs" #-})) of- { !_lhsOinters ->- (case ((let sem_Interfaces_Nil_2 :: T_Interfaces_2 - sem_Interfaces_Nil_2 =- (T_Interfaces_2 (\ (!_lhsIallInters)- (!_lhsIddp) ->- (case (({-# LINE 437 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 601 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 388 "InterfacesRules.lag" #-}- Map.empty- {-# LINE 605 "InterfacesRules.hs" #-})) of- { !_lhsOvisits ->- ( _lhsOedp,_lhsOvisits) }) })) )- in sem_Interfaces_Nil_2)) of- { ( !sem_Interfaces_2) ->- ( _lhsOinters,sem_Interfaces_2) }) })) )- in sem_Interfaces_Nil_1)) of- { ( !sem_Interfaces_1) ->- ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) })) )--- Segment ------------------------------------------------------{-- visit 0:- inherited attribute:- info : Info- chained attribute:- v : Vertex- visit 1:- inherited attributes:- n : Int- nextNewvertices : [Vertex]- synthesized attributes:- descr : Seq (Vertex,ChildVisit)- groups : [([Vertex],[Vertex])]- newedges : Seq Edge - newvertices : [Vertex]- visit 2:- inherited attributes:- cons : [ConstructorIdent]- visitDescr : Map Vertex ChildVisit- vssGraph : Graph- chained attribute:- prev : [Vertex]- synthesized attribute:- seg : CSegment- visit 3:- inherited attributes:- allInters : CInterfaceMap- ddp : Graph- fromLhs : [Vertex]- isFirst : Bool- nextInh : [Vertex]- nextIntravisits : [IntraVisit]- synthesized attributes:- cvisits : [CVisit]- edp : Seq Edge- inh : [Vertex]- intravisits : [IntraVisit]- visitss : [VisitSS]- alternatives:- alternative Segment:- child inh : {[Vertex]}- child syn : {[Vertex]}- visit 0:- local look : {Vertex -> CRule}- local occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}- local groups : {[([Vertex],[Vertex])]}- local v : {Int}- visit 1:- local newvertices : _- local visitedges : _- local attredges : _- intra v : {Int}- intra groups : {[([Vertex],[Vertex])]}- intra look : {Vertex -> CRule}- intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}- visit 2:- local synOccur : _- local vss : _- local visitss' : _- local visitss : {[[Vertex]]}- local defined : _- local _tup1 : {(Map Identifier Type,Map Identifier Type)}- local synmap : {Map Identifier Type}- local inhmap : {Map Identifier Type}- intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}- visit 3:- local computed : _- local fromLhs : _- local iv : _- local intravisits : _- intra visitss : {[[Vertex]]}- intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}- intra synmap : {Map Identifier Type}- intra inhmap : {Map Identifier Type}--}--- cata-sem_Segment :: Segment ->- T_Segment -sem_Segment !(Segment _inh _syn ) =- (sem_Segment_Segment _inh _syn )--- semantic domain-newtype T_Segment = T_Segment (Info ->- Vertex ->- ( Vertex,T_Segment_1 ))-newtype T_Segment_1 = T_Segment_1 (Int ->- ([Vertex]) ->- ( (Seq (Vertex,ChildVisit)),([([Vertex],[Vertex])]),(Seq Edge ),([Vertex]),T_Segment_2 ))-newtype T_Segment_2 = T_Segment_2 (([ConstructorIdent]) ->- ([Vertex]) ->- (Map Vertex ChildVisit) ->- Graph ->- ( ([Vertex]),CSegment,T_Segment_3 ))-newtype T_Segment_3 = T_Segment_3 (CInterfaceMap ->- Graph ->- ([Vertex]) ->- Bool ->- ([Vertex]) ->- ([IntraVisit]) ->- ( ([CVisit]),(Seq Edge),([Vertex]),([IntraVisit]),([VisitSS])))-data Inh_Segment = Inh_Segment {allInters_Inh_Segment :: !(CInterfaceMap),cons_Inh_Segment :: !(([ConstructorIdent])),ddp_Inh_Segment :: !(Graph),fromLhs_Inh_Segment :: !(([Vertex])),info_Inh_Segment :: !(Info),isFirst_Inh_Segment :: !(Bool),n_Inh_Segment :: !(Int),nextInh_Inh_Segment :: !(([Vertex])),nextIntravisits_Inh_Segment :: !(([IntraVisit])),nextNewvertices_Inh_Segment :: !(([Vertex])),prev_Inh_Segment :: !(([Vertex])),v_Inh_Segment :: !(Vertex),visitDescr_Inh_Segment :: !((Map Vertex ChildVisit)),vssGraph_Inh_Segment :: !(Graph)}-data Syn_Segment = Syn_Segment {cvisits_Syn_Segment :: !(([CVisit])),descr_Syn_Segment :: !((Seq (Vertex,ChildVisit))),edp_Syn_Segment :: !((Seq Edge)),groups_Syn_Segment :: !(([([Vertex],[Vertex])])),inh_Syn_Segment :: !(([Vertex])),intravisits_Syn_Segment :: !(([IntraVisit])),newedges_Syn_Segment :: !((Seq Edge )),newvertices_Syn_Segment :: !(([Vertex])),prev_Syn_Segment :: !(([Vertex])),seg_Syn_Segment :: !(CSegment),v_Syn_Segment :: !(Vertex),visitss_Syn_Segment :: !(([VisitSS]))}-wrap_Segment :: T_Segment ->- Inh_Segment ->- Syn_Segment -wrap_Segment !(T_Segment sem ) !(Inh_Segment _lhsIallInters _lhsIcons _lhsIddp _lhsIfromLhs _lhsIinfo _lhsIisFirst _lhsIn _lhsInextInh _lhsInextIntravisits _lhsInextNewvertices _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =- (let ( !_lhsOv,!T_Segment_1 sem_1) =- (sem _lhsIinfo _lhsIv )- ( !_lhsOdescr,!_lhsOgroups,!_lhsOnewedges,!_lhsOnewvertices,!T_Segment_2 sem_2) =- (sem_1 _lhsIn _lhsInextNewvertices )- ( !_lhsOprev,!_lhsOseg,!T_Segment_3 sem_3) =- (sem_2 _lhsIcons _lhsIprev _lhsIvisitDescr _lhsIvssGraph )- ( !_lhsOcvisits,!_lhsOedp,!_lhsOinh,!_lhsOintravisits,!_lhsOvisitss) =- (sem_3 _lhsIallInters _lhsIddp _lhsIfromLhs _lhsIisFirst _lhsInextInh _lhsInextIntravisits )- in (Syn_Segment _lhsOcvisits _lhsOdescr _lhsOedp _lhsOgroups _lhsOinh _lhsOintravisits _lhsOnewedges _lhsOnewvertices _lhsOprev _lhsOseg _lhsOv _lhsOvisitss ))-sem_Segment_Segment :: ([Vertex]) ->- ([Vertex]) ->- T_Segment -sem_Segment_Segment !inh_ !syn_ =- (T_Segment (\ (!_lhsIinfo)- (!_lhsIv) ->- (case (({-# LINE 106 "InterfacesRules.lag" #-}- \a -> ruleTable _lhsIinfo ! a- {-# LINE 737 "InterfacesRules.hs" #-})) of- { !_look ->- (case (({-# LINE 109 "InterfacesRules.lag" #-}- \p us -> [ a | u <- us- , a <- tdsToTdp _lhsIinfo ! u- , p (_look a)]- {-# LINE 743 "InterfacesRules.hs" #-})) of- { !_occurAs ->- (case (({-# LINE 113 "InterfacesRules.lag" #-}- let group as = gather _lhsIinfo (_occurAs isRhs as)- in map (partition (isInh . _look)) (group (inh_ ++ syn_))- {-# LINE 748 "InterfacesRules.hs" #-})) of- { !_groups ->- (case (({-# LINE 116 "InterfacesRules.lag" #-}- _lhsIv + length _groups- {-# LINE 752 "InterfacesRules.hs" #-})) of- { !_v ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _v- {-# LINE 756 "InterfacesRules.hs" #-})) of- { !_lhsOv ->- (case ((let sem_Segment_Segment_1 :: T_Segment_1 - sem_Segment_Segment_1 =- (T_Segment_1 (\ (!_lhsIn)- (!_lhsInextNewvertices) ->- (case (({-# LINE 117 "InterfacesRules.lag" #-}- [_lhsIv .. _v -1]- {-# LINE 764 "InterfacesRules.hs" #-})) of- { !_newvertices ->- (case (({-# LINE 132 "InterfacesRules.lag" #-}- Seq.fromList $ zipWith (cv _look _lhsIn) _newvertices _groups- {-# LINE 768 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 182 "InterfacesRules.lag" #-}- _groups- {-# LINE 772 "InterfacesRules.hs" #-})) of- { !_lhsOgroups ->- (case (({-# LINE 174 "InterfacesRules.lag" #-}- zip _newvertices _lhsInextNewvertices- {-# LINE 776 "InterfacesRules.hs" #-})) of- { !_visitedges ->- (case (({-# LINE 155 "InterfacesRules.lag" #-}- concat (zipWith ed _newvertices _groups)- {-# LINE 780 "InterfacesRules.hs" #-})) of- { !_attredges ->- (case (({-# LINE 175 "InterfacesRules.lag" #-}- Seq.fromList _attredges Seq.>< Seq.fromList _visitedges- {-# LINE 784 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 166 "InterfacesRules.lag" #-}- _newvertices- {-# LINE 788 "InterfacesRules.hs" #-})) of- { !_lhsOnewvertices ->- (case ((let sem_Segment_Segment_2 :: T_Segment_2 - sem_Segment_Segment_2 =- (T_Segment_2 (\ (!_lhsIcons)- (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 229 "InterfacesRules.lag" #-}- gather _lhsIinfo (_occurAs isLhs syn_)- {-# LINE 798 "InterfacesRules.hs" #-})) of- { !_synOccur ->- (case (({-# LINE 230 "InterfacesRules.lag" #-}- let hasCode v | inRange (bounds (ruleTable _lhsIinfo)) v = getHasCode (ruleTable _lhsIinfo ! v)- | otherwise = True- in if null syn_- then replicate (length _lhsIcons) []- else map (filter hasCode . topSort' _lhsIvssGraph) _synOccur- {-# LINE 806 "InterfacesRules.hs" #-})) of- { !_vss ->- (case (({-# LINE 270 "InterfacesRules.lag" #-}- map (\\ _lhsIprev) _vss- {-# LINE 810 "InterfacesRules.hs" #-})) of- { !_visitss' ->- (case (({-# LINE 284 "InterfacesRules.lag" #-}- let rem :: [(Identifier,Identifier,Maybe Type)] -> [Vertex] -> [Vertex]- rem prev [] = []- rem prev (v:vs)- | inRange (bounds table) v- = let cr = table ! v- addV = case findIndex cmp prev of- Just _ -> id- _ -> (v:)- cmp (fld,attr,tp) = getField cr == fld && getAttr cr == attr && sameNT (getType cr) tp- sameNT (Just (NT ntA _)) (Just (NT ntB _)) = ntA == ntB- sameNT _ _ = False- def = Map.elems (getDefines cr)- in addV (rem (def ++ prev) vs)- | otherwise = v:rem prev vs- table = ruleTable _lhsIinfo- in map (rem []) _visitss'- {-# LINE 829 "InterfacesRules.hs" #-})) of- { !_visitss ->- (case (({-# LINE 271 "InterfacesRules.lag" #-}- let defines v = case Map.lookup v _lhsIvisitDescr of- Nothing -> [v]- Just (ChildVisit _ _ _ inh _) -> v:inh- in concatMap (concatMap defines) _visitss- {-# LINE 836 "InterfacesRules.hs" #-})) of- { !_defined ->- (case (({-# LINE 275 "InterfacesRules.lag" #-}- _lhsIprev ++ _defined- {-# LINE 840 "InterfacesRules.hs" #-})) of- { !_lhsOprev ->- (case (({-# LINE 409 "InterfacesRules.lag" #-}- let makemap = Map.fromList . map findType- findType v = getNtaNameType (attrTable _lhsIinfo ! v)- in (makemap inh_,makemap syn_)- {-# LINE 846 "InterfacesRules.hs" #-})) of- { !__tup1 ->- (case (({-# LINE 409 "InterfacesRules.lag" #-}- __tup1- {-# LINE 850 "InterfacesRules.hs" #-})) of- { !(_,!_synmap) ->- (case (({-# LINE 409 "InterfacesRules.lag" #-}- __tup1- {-# LINE 854 "InterfacesRules.hs" #-})) of- { !(!_inhmap,_) ->- (case (({-# LINE 405 "InterfacesRules.lag" #-}- if False then undefined _lhsIvssGraph _lhsIvisitDescr _lhsIprev else CSegment _inhmap _synmap- {-# LINE 858 "InterfacesRules.hs" #-})) of- { !_lhsOseg ->- (case ((let sem_Segment_Segment_3 :: T_Segment_3 - sem_Segment_Segment_3 =- (T_Segment_3 (\ (!_lhsIallInters)- (!_lhsIddp)- (!_lhsIfromLhs)- (!_lhsIisFirst)- (!_lhsInextInh)- (!_lhsInextIntravisits) ->- (case (({-# LINE 357 "InterfacesRules.lag" #-}- let computes v = case Map.lookup v _lhsIvisitDescr of- Nothing -> Map.keys (getDefines (ruleTable _lhsIinfo ! v))- Just (ChildVisit _ _ _ _ syn) -> v:syn- in concatMap (concatMap computes) _visitss- {-# LINE 873 "InterfacesRules.hs" #-})) of- { !_computed ->- (case (({-# LINE 356 "InterfacesRules.lag" #-}- _occurAs isLhs inh_ ++ _lhsIfromLhs- {-# LINE 877 "InterfacesRules.hs" #-})) of- { !_fromLhs ->- (case (({-# LINE 362 "InterfacesRules.lag" #-}- \vs next ->- let needed = concatMap (_lhsIddp !) vs- in nub (needed ++ next) \\ (_fromLhs ++ _computed)- {-# LINE 883 "InterfacesRules.hs" #-})) of- { !_iv ->- (case (({-# LINE 361 "InterfacesRules.lag" #-}- zipWith _iv _visitss _lhsInextIntravisits- {-# LINE 887 "InterfacesRules.hs" #-})) of- { !_intravisits ->- (case (({-# LINE 412 "InterfacesRules.lag" #-}- let mkVisit vss intra = CVisit _inhmap _synmap (mkSequence vss) (mkSequence intra) True- mkSequence = map mkRule- mkRule v = case Map.lookup v _lhsIvisitDescr of- Nothing -> ruleTable _lhsIinfo ! v- Just (ChildVisit name nt n _ _) -> ccv name nt n _lhsIallInters- in zipWith mkVisit _visitss _intravisits- {-# LINE 896 "InterfacesRules.hs" #-})) of- { !_lhsOcvisits ->- (case (({-# LINE 439 "InterfacesRules.lag" #-}- Seq.fromList [(i,s) | i <- inh_, s <- syn_]- Seq.>< Seq.fromList [(s,i) | s <- syn_, i <- _lhsInextInh ]- {-# LINE 901 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 444 "InterfacesRules.lag" #-}- inh_- {-# LINE 905 "InterfacesRules.hs" #-})) of- { !_lhsOinh ->- (case (({-# LINE 327 "InterfacesRules.lag" #-}- _intravisits- {-# LINE 909 "InterfacesRules.hs" #-})) of- { !_lhsOintravisits ->- (case (({-# LINE 269 "InterfacesRules.lag" #-}- _visitss- {-# LINE 913 "InterfacesRules.hs" #-})) of- { !_lhsOvisitss ->- ( _lhsOcvisits,_lhsOedp,_lhsOinh,_lhsOintravisits,_lhsOvisitss) }) }) }) }) }) }) }) }) })) )- in sem_Segment_Segment_3)) of- { ( !sem_Segment_3) ->- ( _lhsOprev,_lhsOseg,sem_Segment_3) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Segment_Segment_2)) of- { ( !sem_Segment_2) ->- ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,sem_Segment_2) }) }) }) }) }) }) }) })) )- in sem_Segment_Segment_1)) of- { ( !sem_Segment_1) ->- ( _lhsOv,sem_Segment_1) }) }) }) }) }) })) )--- Segments -----------------------------------------------------{-- visit 0:- inherited attributes:- info : Info- n : Int- chained attribute:- v : Vertex- synthesized attributes:- descr : Seq (Vertex,ChildVisit)- groups : [([Vertex],[Vertex])]- newedges : Seq Edge - newvertices : [Vertex]- visit 1:- inherited attributes:- cons : [ConstructorIdent]- prev : [Vertex]- visitDescr : Map Vertex ChildVisit- vssGraph : Graph- synthesized attribute:- segs : CSegments- visit 2:- inherited attributes:- allInters : CInterfaceMap- ddp : Graph- fromLhs : [Vertex]- isFirst : Bool- synthesized attributes:- cvisits : [[CVisit]]- edp : Seq Edge- firstInh : [Vertex]- hdIntravisits : [IntraVisit]- prev : [Vertex]- alternatives:- alternative Cons:- child hd : Segment - child tl : Segments - alternative Nil:--}--- cata-sem_Segments :: Segments ->- T_Segments -sem_Segments !list =- (Prelude.foldr sem_Segments_Cons sem_Segments_Nil (Prelude.map sem_Segment list) )--- semantic domain-newtype T_Segments = T_Segments (Info ->- Int ->- Vertex ->- ( (Seq (Vertex,ChildVisit)),([([Vertex],[Vertex])]),(Seq Edge ),([Vertex]),Vertex,T_Segments_1 ))-newtype T_Segments_1 = T_Segments_1 (([ConstructorIdent]) ->- ([Vertex]) ->- (Map Vertex ChildVisit) ->- Graph ->- ( CSegments,T_Segments_2 ))-newtype T_Segments_2 = T_Segments_2 (CInterfaceMap ->- Graph ->- ([Vertex]) ->- Bool ->- ( ([[CVisit]]),(Seq Edge),([Vertex]),([IntraVisit]),([Vertex])))-data Inh_Segments = Inh_Segments {allInters_Inh_Segments :: !(CInterfaceMap),cons_Inh_Segments :: !(([ConstructorIdent])),ddp_Inh_Segments :: !(Graph),fromLhs_Inh_Segments :: !(([Vertex])),info_Inh_Segments :: !(Info),isFirst_Inh_Segments :: !(Bool),n_Inh_Segments :: !(Int),prev_Inh_Segments :: !(([Vertex])),v_Inh_Segments :: !(Vertex),visitDescr_Inh_Segments :: !((Map Vertex ChildVisit)),vssGraph_Inh_Segments :: !(Graph)}-data Syn_Segments = Syn_Segments {cvisits_Syn_Segments :: !(([[CVisit]])),descr_Syn_Segments :: !((Seq (Vertex,ChildVisit))),edp_Syn_Segments :: !((Seq Edge)),firstInh_Syn_Segments :: !(([Vertex])),groups_Syn_Segments :: !(([([Vertex],[Vertex])])),hdIntravisits_Syn_Segments :: !(([IntraVisit])),newedges_Syn_Segments :: !((Seq Edge )),newvertices_Syn_Segments :: !(([Vertex])),prev_Syn_Segments :: !(([Vertex])),segs_Syn_Segments :: !(CSegments),v_Syn_Segments :: !(Vertex)}-wrap_Segments :: T_Segments ->- Inh_Segments ->- Syn_Segments -wrap_Segments !(T_Segments sem ) !(Inh_Segments _lhsIallInters _lhsIcons _lhsIddp _lhsIfromLhs _lhsIinfo _lhsIisFirst _lhsIn _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =- (let ( !_lhsOdescr,!_lhsOgroups,!_lhsOnewedges,!_lhsOnewvertices,!_lhsOv,!T_Segments_1 sem_1) =- (sem _lhsIinfo _lhsIn _lhsIv )- ( !_lhsOsegs,!T_Segments_2 sem_2) =- (sem_1 _lhsIcons _lhsIprev _lhsIvisitDescr _lhsIvssGraph )- ( !_lhsOcvisits,!_lhsOedp,!_lhsOfirstInh,!_lhsOhdIntravisits,!_lhsOprev) =- (sem_2 _lhsIallInters _lhsIddp _lhsIfromLhs _lhsIisFirst )- in (Syn_Segments _lhsOcvisits _lhsOdescr _lhsOedp _lhsOfirstInh _lhsOgroups _lhsOhdIntravisits _lhsOnewedges _lhsOnewvertices _lhsOprev _lhsOsegs _lhsOv ))-sem_Segments_Cons :: T_Segment ->- T_Segments ->- T_Segments -sem_Segments_Cons !(T_Segment hd_ ) !(T_Segments tl_ ) =- (T_Segments (\ (!_lhsIinfo)- (!_lhsIn)- (!_lhsIv) ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 1006 "InterfacesRules.hs" #-})) of- { !_hdOv ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 1010 "InterfacesRules.hs" #-})) of- { !_hdOinfo ->- (case ((hd_ _hdOinfo _hdOv )) of- { ( !_hdIv,!T_Segment_1 hd_1) ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _hdIv- {-# LINE 1016 "InterfacesRules.hs" #-})) of- { !_tlOv ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 1020 "InterfacesRules.hs" #-})) of- { !_tlOinfo ->- (case (({-# LINE 203 "InterfacesRules.lag" #-}- _lhsIn- {-# LINE 1024 "InterfacesRules.hs" #-})) of- { !_hdOn ->- (case (({-# LINE 207 "InterfacesRules.lag" #-}- _lhsIn + 1- {-# LINE 1028 "InterfacesRules.hs" #-})) of- { !_tlOn ->- (case ((tl_ _tlOinfo _tlOn _tlOv )) of- { ( !_tlIdescr,!_tlIgroups,!_tlInewedges,!_tlInewvertices,!_tlIv,!T_Segments_1 tl_1) ->- (case (({-# LINE 169 "InterfacesRules.lag" #-}- _tlInewvertices- {-# LINE 1034 "InterfacesRules.hs" #-})) of- { !_hdOnextNewvertices ->- (case ((hd_1 _hdOn _hdOnextNewvertices )) of- { ( !_hdIdescr,!_hdIgroups,!_hdInewedges,!_hdInewvertices,!T_Segment_2 hd_2) ->- (case (({-# LINE 130 "InterfacesRules.lag" #-}- _hdIdescr Seq.>< _tlIdescr- {-# LINE 1040 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 184 "InterfacesRules.lag" #-}- _hdIgroups- {-# LINE 1044 "InterfacesRules.hs" #-})) of- { !_lhsOgroups ->- (case (({-# LINE 129 "InterfacesRules.lag" #-}- _hdInewedges Seq.>< _tlInewedges- {-# LINE 1048 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 170 "InterfacesRules.lag" #-}- _hdInewvertices- {-# LINE 1052 "InterfacesRules.hs" #-})) of- { !_lhsOnewvertices ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _tlIv- {-# LINE 1056 "InterfacesRules.hs" #-})) of- { !_lhsOv ->- (case ((let sem_Segments_Cons_1 :: T_Segments_1 - sem_Segments_Cons_1 =- (T_Segments_1 (\ (!_lhsIcons)- (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 1066 "InterfacesRules.hs" #-})) of- { !_tlOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 1070 "InterfacesRules.hs" #-})) of- { !_tlOvisitDescr ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 1074 "InterfacesRules.hs" #-})) of- { !_hdOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 1078 "InterfacesRules.hs" #-})) of- { !_hdOvisitDescr ->- (case (({-# LINE 263 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 1082 "InterfacesRules.hs" #-})) of- { !_hdOprev ->- (case (({-# LINE 235 "InterfacesRules.lag" #-}- _lhsIcons- {-# LINE 1086 "InterfacesRules.hs" #-})) of- { !_hdOcons ->- (case ((hd_2 _hdOcons _hdOprev _hdOvisitDescr _hdOvssGraph )) of- { ( !_hdIprev,!_hdIseg,!T_Segment_3 hd_3) ->- (case (({-# LINE 263 "InterfacesRules.lag" #-}- _hdIprev- {-# LINE 1092 "InterfacesRules.hs" #-})) of- { !_tlOprev ->- (case (({-# LINE 235 "InterfacesRules.lag" #-}- _lhsIcons- {-# LINE 1096 "InterfacesRules.hs" #-})) of- { !_tlOcons ->- (case ((tl_1 _tlOcons _tlOprev _tlOvisitDescr _tlOvssGraph )) of- { ( !_tlIsegs,!T_Segments_2 tl_2) ->- (case (({-# LINE 400 "InterfacesRules.lag" #-}- _hdIseg : _tlIsegs- {-# LINE 1102 "InterfacesRules.hs" #-})) of- { !_lhsOsegs ->- (case ((let sem_Segments_Cons_2 :: T_Segments_2 - sem_Segments_Cons_2 =- (T_Segments_2 (\ (!_lhsIallInters)- (!_lhsIddp)- (!_lhsIfromLhs)- (!_lhsIisFirst) ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 1112 "InterfacesRules.hs" #-})) of- { !_tlOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 1116 "InterfacesRules.hs" #-})) of- { !_tlOallInters ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 1120 "InterfacesRules.hs" #-})) of- { !_hdOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 1124 "InterfacesRules.hs" #-})) of- { !_hdOallInters ->- (case (({-# LINE 354 "InterfacesRules.lag" #-}- []- {-# LINE 1128 "InterfacesRules.hs" #-})) of- { !_tlOfromLhs ->- (case (({-# LINE 353 "InterfacesRules.lag" #-}- _lhsIfromLhs- {-# LINE 1132 "InterfacesRules.hs" #-})) of- { !_hdOfromLhs ->- (case (({-# LINE 316 "InterfacesRules.lag" #-}- False- {-# LINE 1136 "InterfacesRules.hs" #-})) of- { !_tlOisFirst ->- (case ((tl_2 _tlOallInters _tlOddp _tlOfromLhs _tlOisFirst )) of- { ( !_tlIcvisits,!_tlIedp,!_tlIfirstInh,!_tlIhdIntravisits,!_tlIprev) ->- (case (({-# LINE 329 "InterfacesRules.lag" #-}- _tlIhdIntravisits- {-# LINE 1142 "InterfacesRules.hs" #-})) of- { !_hdOnextIntravisits ->- (case (({-# LINE 312 "InterfacesRules.lag" #-}- _lhsIisFirst- {-# LINE 1146 "InterfacesRules.hs" #-})) of- { !_hdOisFirst ->- (case (({-# LINE 446 "InterfacesRules.lag" #-}- _tlIfirstInh- {-# LINE 1150 "InterfacesRules.hs" #-})) of- { !_hdOnextInh ->- (case ((hd_3 _hdOallInters _hdOddp _hdOfromLhs _hdOisFirst _hdOnextInh _hdOnextIntravisits )) of- { ( !_hdIcvisits,!_hdIedp,!_hdIinh,!_hdIintravisits,!_hdIvisitss) ->- (case (({-# LINE 399 "InterfacesRules.lag" #-}- _hdIcvisits : _tlIcvisits- {-# LINE 1156 "InterfacesRules.hs" #-})) of- { !_lhsOcvisits ->- (case (({-# LINE 437 "InterfacesRules.lag" #-}- _hdIedp Seq.>< _tlIedp- {-# LINE 1160 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 447 "InterfacesRules.lag" #-}- _hdIinh- {-# LINE 1164 "InterfacesRules.hs" #-})) of- { !_lhsOfirstInh ->- (case (({-# LINE 330 "InterfacesRules.lag" #-}- _hdIintravisits- {-# LINE 1168 "InterfacesRules.hs" #-})) of- { !_lhsOhdIntravisits ->- (case (({-# LINE 263 "InterfacesRules.lag" #-}- _tlIprev- {-# LINE 1172 "InterfacesRules.hs" #-})) of- { !_lhsOprev ->- ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Segments_Cons_2)) of- { ( !sem_Segments_2) ->- ( _lhsOsegs,sem_Segments_2) }) }) }) }) }) }) }) }) }) }) }) })) )- in sem_Segments_Cons_1)) of- { ( !sem_Segments_1) ->- ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,_lhsOv,sem_Segments_1) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Segments_Nil :: T_Segments -sem_Segments_Nil =- (T_Segments (\ (!_lhsIinfo)- (!_lhsIn)- (!_lhsIv) ->- (case (({-# LINE 130 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 1188 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 185 "InterfacesRules.lag" #-}- []- {-# LINE 1192 "InterfacesRules.hs" #-})) of- { !_lhsOgroups ->- (case (({-# LINE 129 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 1196 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 171 "InterfacesRules.lag" #-}- []- {-# LINE 1200 "InterfacesRules.hs" #-})) of- { !_lhsOnewvertices ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 1204 "InterfacesRules.hs" #-})) of- { !_lhsOv ->- (case ((let sem_Segments_Nil_1 :: T_Segments_1 - sem_Segments_Nil_1 =- (T_Segments_1 (\ (!_lhsIcons)- (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 401 "InterfacesRules.lag" #-}- []- {-# LINE 1214 "InterfacesRules.hs" #-})) of- { !_lhsOsegs ->- (case ((let sem_Segments_Nil_2 :: T_Segments_2 - sem_Segments_Nil_2 =- (T_Segments_2 (\ (!_lhsIallInters)- (!_lhsIddp)- (!_lhsIfromLhs)- (!_lhsIisFirst) ->- (case (({-# LINE 399 "InterfacesRules.lag" #-}- []- {-# LINE 1224 "InterfacesRules.hs" #-})) of- { !_lhsOcvisits ->- (case (({-# LINE 437 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 1228 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 448 "InterfacesRules.lag" #-}- []- {-# LINE 1232 "InterfacesRules.hs" #-})) of- { !_lhsOfirstInh ->- (case (({-# LINE 331 "InterfacesRules.lag" #-}- repeat []- {-# LINE 1236 "InterfacesRules.hs" #-})) of- { !_lhsOhdIntravisits ->- (case (({-# LINE 263 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 1240 "InterfacesRules.hs" #-})) of+-- UUAGC 0.9.30 (InterfacesRules.lag)+module InterfacesRules where+{-# LINE 10 "InterfacesRules.lag" #-}++import Interfaces+import SequentialTypes+import CodeSyntax+import GrammarInfo++import qualified Data.Sequence as Seq+import Data.Sequence(Seq)+import qualified Data.Map as Map+import Data.Map(Map)+import qualified Data.Set as Set+import Data.Set(Set)+import Data.Tree(Tree(Node))+import Data.Graph(Graph, dfs, edges, buildG, transposeG)+import Data.Maybe (fromJust)+import Data.List (partition,transpose,(\\),nub,intersect, findIndex)+import Data.Array ((!),inRange,bounds,assocs)+import Data.Foldable(toList)++import Debug.Trace(trace)+{-# LINE 27 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 2 "./Interfaces.ag" #-}++import CommonTypes+import SequentialTypes+{-# LINE 33 "../src-derived/InterfacesRules.hs" #-}+{-# LINE 58 "InterfacesRules.lag" #-}++type VisitSS = [Vertex]+{-# LINE 37 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 93 "InterfacesRules.lag" #-}++gather :: Info -> [Vertex] -> [[Vertex]]+gather info = eqClasses comp+ where comp a b = isEqualField (ruleTable info ! a) (ruleTable info ! b)+{-# LINE 44 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 134 "InterfacesRules.lag" #-}++-- Only non-empty syn will ever be forced, because visits with empty syn are never performed+-- Right hand side synthesized attributes always have a field+cv :: (Vertex -> CRule) -> Int -> Vertex -> ([Vertex],[Vertex]) -> (Vertex,ChildVisit)+cv look n v (inh,syn) = let fld = getField (look (head syn))+ rnt = fromJust (getRhsNt (look (head syn)))+ d = ChildVisit fld rnt n inh syn+ in (v,d)+{-# LINE 55 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 157 "InterfacesRules.lag" #-}++ed v (inh,syn) = map (\i -> (i,v)) inh ++ map (\s -> (v,s)) syn+{-# LINE 60 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 244 "InterfacesRules.lag" #-}++postorder (Node a ts) = postorderF ts ++ [a]+postorderF = concatMap postorder+postOrd g = postorderF . dfs g+topSort' g = postOrd g+{-# LINE 68 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 323 "InterfacesRules.lag" #-}++type IntraVisit = [Vertex]+{-# LINE 73 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 345 "InterfacesRules.lag" #-}++swap (a,b) = (b,a)+{-# LINE 78 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 419 "InterfacesRules.lag" #-}++ccv :: Identifier -> NontermIdent -> Int -> CInterfaceMap -> CRule+ccv name nt n table+ = CChildVisit name nt n inh syn last+ where CInterface segs = Map.findWithDefault (error ("InterfacesRules::ccv::interfaces not in table for nt: " ++ show nt)) nt table+ (seg:remain) = drop n segs+ CSegment inh syn = seg + last = null remain+{-# LINE 89 "../src-derived/InterfacesRules.hs" #-}+-- IRoot -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ dpr : [Edge]+ info : Info+ tdp : Graph+ synthesized attributes:+ edp : [Edge]+ inters : CInterfaceMap+ visits : CVisitsMap+ alternatives:+ alternative IRoot:+ child inters : Interfaces + visit 0:+ local newedges : _+ local visitssGraph : _+ local descr : _+-}+-- cata+sem_IRoot :: IRoot ->+ T_IRoot +sem_IRoot !(IRoot _inters ) =+ (sem_IRoot_IRoot (sem_Interfaces _inters ) )+-- semantic domain+newtype T_IRoot = T_IRoot (([Edge]) ->+ Info ->+ Graph ->+ ( ([Edge]),CInterfaceMap,CVisitsMap))+data Inh_IRoot = Inh_IRoot {dpr_Inh_IRoot :: !(([Edge])),info_Inh_IRoot :: !(Info),tdp_Inh_IRoot :: !(Graph)}+data Syn_IRoot = Syn_IRoot {edp_Syn_IRoot :: !(([Edge])),inters_Syn_IRoot :: !(CInterfaceMap),visits_Syn_IRoot :: !(CVisitsMap)}+wrap_IRoot :: T_IRoot ->+ Inh_IRoot ->+ Syn_IRoot +wrap_IRoot !(T_IRoot sem ) !(Inh_IRoot _lhsIdpr _lhsIinfo _lhsItdp ) =+ (let ( !_lhsOedp,!_lhsOinters,!_lhsOvisits) = sem _lhsIdpr _lhsIinfo _lhsItdp + in (Syn_IRoot _lhsOedp _lhsOinters _lhsOvisits ))+sem_IRoot_IRoot :: T_Interfaces ->+ T_IRoot +sem_IRoot_IRoot !(T_Interfaces inters_ ) =+ (T_IRoot (\ (!_lhsIdpr)+ (!_lhsIinfo)+ (!_lhsItdp) ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 135 "InterfacesRules.hs" #-})) of+ { !_intersOinfo ->+ (case (({-# LINE 85 "InterfacesRules.lag" #-}+ snd (bounds _lhsItdp) + 1+ {-# LINE 139 "InterfacesRules.hs" #-})) of+ { !_intersOv ->+ (case (inters_ _intersOinfo _intersOv ) of+ { ( !_intersIdescr,!_intersIfirstvisitvertices,!_intersInewedges,!_intersIv,!T_Interfaces_1 inters_1) ->+ (case (({-# LINE 260 "InterfacesRules.lag" #-}+ let terminals = [ v | (v,cr) <- assocs (ruleTable _lhsIinfo), not (getHasCode cr), isLocal cr ]+ in _intersIfirstvisitvertices ++ terminals+ {-# LINE 146 "InterfacesRules.hs" #-})) of+ { !_intersOprev ->+ (case (({-# LINE 71 "InterfacesRules.lag" #-}+ toList _intersInewedges+ {-# LINE 150 "InterfacesRules.hs" #-})) of+ { !_newedges ->+ (case (({-# LINE 72 "InterfacesRules.lag" #-}+ let graph = buildG (0,_intersIv-1) es+ es = _newedges ++ edges _lhsItdp+ in transposeG graph+ {-# LINE 156 "InterfacesRules.hs" #-})) of+ { !_visitssGraph ->+ (case (({-# LINE 218 "InterfacesRules.lag" #-}+ _visitssGraph+ {-# LINE 160 "InterfacesRules.hs" #-})) of+ { !_intersOvssGraph ->+ (case (({-# LINE 147 "InterfacesRules.lag" #-}+ toList _intersIdescr+ {-# LINE 164 "InterfacesRules.hs" #-})) of+ { !_descr ->+ (case (({-# LINE 127 "InterfacesRules.lag" #-}+ Map.fromList _descr+ {-# LINE 168 "InterfacesRules.hs" #-})) of+ { !_intersOvisitDescr ->+ (case (inters_1 _intersOprev _intersOvisitDescr _intersOvssGraph ) of+ { ( !_intersIinters,!T_Interfaces_2 inters_2) ->+ (case (({-# LINE 380 "InterfacesRules.lag" #-}+ _intersIinters+ {-# LINE 174 "InterfacesRules.hs" #-})) of+ { !_intersOallInters ->+ (case (({-# LINE 343 "InterfacesRules.lag" #-}+ buildG (0,_intersIv-1) (map swap (_lhsIdpr ++ _newedges))+ {-# LINE 178 "InterfacesRules.hs" #-})) of+ { !_intersOddp ->+ (case (inters_2 _intersOallInters _intersOddp ) of+ { ( !_intersIedp,!_intersIvisits) ->+ (case (({-# LINE 442 "InterfacesRules.lag" #-}+ toList _intersIedp+ {-# LINE 184 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 382 "InterfacesRules.lag" #-}+ _intersIinters+ {-# LINE 188 "InterfacesRules.hs" #-})) of+ { !_lhsOinters ->+ (case (({-# LINE 383 "InterfacesRules.lag" #-}+ _intersIvisits+ {-# LINE 192 "InterfacesRules.hs" #-})) of+ { !_lhsOvisits ->+ ( _lhsOedp,_lhsOinters,_lhsOvisits) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Interface ---------------------------------------------------+{-+ visit 0:+ inherited attribute:+ info : Info+ chained attribute:+ v : Vertex+ synthesized attributes:+ descr : Seq (Vertex,ChildVisit)+ firstvisitvertices : [Vertex]+ newedges : Seq Edge + visit 1:+ inherited attributes:+ prev : [Vertex]+ visitDescr : Map Vertex ChildVisit+ vssGraph : Graph+ synthesized attributes:+ inter : CInterface+ nt : NontermIdent+ visit 2:+ inherited attributes:+ allInters : CInterfaceMap+ ddp : Graph+ synthesized attributes:+ edp : Seq Edge+ visits : Map ConstructorIdent CVisits+ alternatives:+ alternative Interface:+ child nt : {NontermIdent}+ child cons : {[ConstructorIdent]}+ child seg : Segments + visit 0:+ local look : {Vertex -> CRule}+ local v : _+ local firstvisitvertices : _+ local descr : _+ local newedges : _+-}+-- cata+sem_Interface :: Interface ->+ T_Interface +sem_Interface !(Interface _nt _cons _seg ) =+ (sem_Interface_Interface _nt _cons (sem_Segments _seg ) )+-- semantic domain+newtype T_Interface = T_Interface (Info ->+ Vertex ->+ ( (Seq (Vertex,ChildVisit)),([Vertex]),(Seq Edge ),Vertex,T_Interface_1 ))+newtype T_Interface_1 = T_Interface_1 (([Vertex]) ->+ (Map Vertex ChildVisit) ->+ Graph ->+ ( CInterface,NontermIdent,T_Interface_2 ))+newtype T_Interface_2 = T_Interface_2 (CInterfaceMap ->+ Graph ->+ ( (Seq Edge),(Map ConstructorIdent CVisits)))+data Inh_Interface = Inh_Interface {allInters_Inh_Interface :: !(CInterfaceMap),ddp_Inh_Interface :: !(Graph),info_Inh_Interface :: !(Info),prev_Inh_Interface :: !(([Vertex])),v_Inh_Interface :: !(Vertex),visitDescr_Inh_Interface :: !((Map Vertex ChildVisit)),vssGraph_Inh_Interface :: !(Graph)}+data Syn_Interface = Syn_Interface {descr_Syn_Interface :: !((Seq (Vertex,ChildVisit))),edp_Syn_Interface :: !((Seq Edge)),firstvisitvertices_Syn_Interface :: !(([Vertex])),inter_Syn_Interface :: !(CInterface),newedges_Syn_Interface :: !((Seq Edge )),nt_Syn_Interface :: !(NontermIdent),v_Syn_Interface :: !(Vertex),visits_Syn_Interface :: !((Map ConstructorIdent CVisits))}+wrap_Interface :: T_Interface ->+ Inh_Interface ->+ Syn_Interface +wrap_Interface !(T_Interface sem ) !(Inh_Interface _lhsIallInters _lhsIddp _lhsIinfo _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =+ (let ( !_lhsOdescr,!_lhsOfirstvisitvertices,!_lhsOnewedges,!_lhsOv,!T_Interface_1 sem_1) = sem _lhsIinfo _lhsIv + ( !_lhsOinter,!_lhsOnt,!T_Interface_2 sem_2) = sem_1 _lhsIprev _lhsIvisitDescr _lhsIvssGraph + ( !_lhsOedp,!_lhsOvisits) = sem_2 _lhsIallInters _lhsIddp + in (Syn_Interface _lhsOdescr _lhsOedp _lhsOfirstvisitvertices _lhsOinter _lhsOnewedges _lhsOnt _lhsOv _lhsOvisits ))+sem_Interface_Interface :: NontermIdent ->+ ([ConstructorIdent]) ->+ T_Segments ->+ T_Interface +sem_Interface_Interface !nt_ !cons_ !(T_Segments seg_ ) =+ (T_Interface (\ (!_lhsIinfo)+ (!_lhsIv) ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 268 "InterfacesRules.hs" #-})) of+ { !_segOinfo ->+ (case (({-# LINE 205 "InterfacesRules.lag" #-}+ 0+ {-# LINE 272 "InterfacesRules.hs" #-})) of+ { !_segOn ->+ (case (({-# LINE 195 "InterfacesRules.lag" #-}+ \a -> ruleTable _lhsIinfo ! a+ {-# LINE 276 "InterfacesRules.hs" #-})) of+ { !_look ->+ (case (({-# LINE 187 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 280 "InterfacesRules.hs" #-})) of+ { !_segOv ->+ (case (seg_ _segOinfo _segOn _segOv ) of+ { ( !_segIdescr,!_segIgroups,!_segInewedges,!_segInewvertices,!_segIv,!T_Segments_1 seg_1) ->+ (case (({-# LINE 188 "InterfacesRules.lag" #-}+ _segIv + length _segInewvertices+ {-# LINE 286 "InterfacesRules.hs" #-})) of+ { !_v ->+ (case (({-# LINE 190 "InterfacesRules.lag" #-}+ [_segIv .. _v-1]+ {-# LINE 290 "InterfacesRules.hs" #-})) of+ { !_firstvisitvertices ->+ (case (({-# LINE 196 "InterfacesRules.lag" #-}+ zipWith (cv _look (-1)) _firstvisitvertices _segIgroups+ {-# LINE 294 "InterfacesRules.hs" #-})) of+ { !_descr ->+ (case (({-# LINE 197 "InterfacesRules.lag" #-}+ _segIdescr Seq.>< Seq.fromList _descr+ {-# LINE 298 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ _firstvisitvertices+ {-# LINE 302 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstvisitvertices ->+ (case (({-# LINE 191 "InterfacesRules.lag" #-}+ zip _firstvisitvertices _segInewvertices+ {-# LINE 306 "InterfacesRules.hs" #-})) of+ { !_newedges ->+ (case (({-# LINE 192 "InterfacesRules.lag" #-}+ _segInewedges Seq.>< Seq.fromList _newedges+ {-# LINE 310 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 189 "InterfacesRules.lag" #-}+ _v+ {-# LINE 314 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Interface_Interface_1 :: T_Interface_1 + sem_Interface_Interface_1 =+ (T_Interface_1 (\ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 323 "InterfacesRules.hs" #-})) of+ { !_segOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 327 "InterfacesRules.hs" #-})) of+ { !_segOvisitDescr ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 331 "InterfacesRules.hs" #-})) of+ { !_segOprev ->+ (case (({-# LINE 237 "InterfacesRules.lag" #-}+ cons_+ {-# LINE 335 "InterfacesRules.hs" #-})) of+ { !_segOcons ->+ (case (seg_1 _segOcons _segOprev _segOvisitDescr _segOvssGraph ) of+ { ( !_segIsegs,!T_Segments_2 seg_2) ->+ (case (({-# LINE 395 "InterfacesRules.lag" #-}+ CInterface _segIsegs+ {-# LINE 341 "InterfacesRules.hs" #-})) of+ { !_lhsOinter ->+ (case (({-# LINE 391 "InterfacesRules.lag" #-}+ nt_+ {-# LINE 345 "InterfacesRules.hs" #-})) of+ { !_lhsOnt ->+ (case ((let sem_Interface_Interface_2 :: T_Interface_2 + sem_Interface_Interface_2 =+ (T_Interface_2 (\ (!_lhsIallInters)+ (!_lhsIddp) ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 353 "InterfacesRules.hs" #-})) of+ { !_segOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 357 "InterfacesRules.hs" #-})) of+ { !_segOallInters ->+ (case (({-# LINE 351 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 361 "InterfacesRules.hs" #-})) of+ { !_segOfromLhs ->+ (case (({-# LINE 314 "InterfacesRules.lag" #-}+ True+ {-# LINE 365 "InterfacesRules.hs" #-})) of+ { !_segOisFirst ->+ (case (seg_2 _segOallInters _segOddp _segOfromLhs _segOisFirst ) of+ { ( !_segIcvisits,!_segIedp,!_segIfirstInh,!_segIhdIntravisits,!_segIprev) ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ _segIedp+ {-# LINE 371 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 396 "InterfacesRules.lag" #-}+ Map.fromList (zip cons_ (transpose _segIcvisits))+ {-# LINE 375 "InterfacesRules.hs" #-})) of+ { !_lhsOvisits ->+ ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) })) )+ in sem_Interface_Interface_2)) of+ { ( !sem_Interface_2) ->+ ( _lhsOinter,_lhsOnt,sem_Interface_2) }) }) }) }) }) }) }) })) )+ in sem_Interface_Interface_1)) of+ { ( !sem_Interface_1) ->+ ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interface_1) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Interfaces --------------------------------------------------+{-+ visit 0:+ inherited attribute:+ info : Info+ chained attribute:+ v : Vertex+ synthesized attributes:+ descr : Seq (Vertex,ChildVisit)+ firstvisitvertices : [Vertex]+ newedges : Seq Edge + visit 1:+ inherited attributes:+ prev : [Vertex]+ visitDescr : Map Vertex ChildVisit+ vssGraph : Graph+ synthesized attribute:+ inters : CInterfaceMap+ visit 2:+ inherited attributes:+ allInters : CInterfaceMap+ ddp : Graph+ synthesized attributes:+ edp : Seq Edge+ visits : CVisitsMap+ alternatives:+ alternative Cons:+ child hd : Interface + child tl : Interfaces + alternative Nil:+-}+-- cata+sem_Interfaces :: Interfaces ->+ T_Interfaces +sem_Interfaces !list =+ (Prelude.foldr sem_Interfaces_Cons sem_Interfaces_Nil (Prelude.map sem_Interface list) )+-- semantic domain+newtype T_Interfaces = T_Interfaces (Info ->+ Vertex ->+ ( (Seq (Vertex,ChildVisit)),([Vertex]),(Seq Edge ),Vertex,T_Interfaces_1 ))+newtype T_Interfaces_1 = T_Interfaces_1 (([Vertex]) ->+ (Map Vertex ChildVisit) ->+ Graph ->+ ( CInterfaceMap,T_Interfaces_2 ))+newtype T_Interfaces_2 = T_Interfaces_2 (CInterfaceMap ->+ Graph ->+ ( (Seq Edge),CVisitsMap))+data Inh_Interfaces = Inh_Interfaces {allInters_Inh_Interfaces :: !(CInterfaceMap),ddp_Inh_Interfaces :: !(Graph),info_Inh_Interfaces :: !(Info),prev_Inh_Interfaces :: !(([Vertex])),v_Inh_Interfaces :: !(Vertex),visitDescr_Inh_Interfaces :: !((Map Vertex ChildVisit)),vssGraph_Inh_Interfaces :: !(Graph)}+data Syn_Interfaces = Syn_Interfaces {descr_Syn_Interfaces :: !((Seq (Vertex,ChildVisit))),edp_Syn_Interfaces :: !((Seq Edge)),firstvisitvertices_Syn_Interfaces :: !(([Vertex])),inters_Syn_Interfaces :: !(CInterfaceMap),newedges_Syn_Interfaces :: !((Seq Edge )),v_Syn_Interfaces :: !(Vertex),visits_Syn_Interfaces :: !(CVisitsMap)}+wrap_Interfaces :: T_Interfaces ->+ Inh_Interfaces ->+ Syn_Interfaces +wrap_Interfaces !(T_Interfaces sem ) !(Inh_Interfaces _lhsIallInters _lhsIddp _lhsIinfo _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =+ (let ( !_lhsOdescr,!_lhsOfirstvisitvertices,!_lhsOnewedges,!_lhsOv,!T_Interfaces_1 sem_1) = sem _lhsIinfo _lhsIv + ( !_lhsOinters,!T_Interfaces_2 sem_2) = sem_1 _lhsIprev _lhsIvisitDescr _lhsIvssGraph + ( !_lhsOedp,!_lhsOvisits) = sem_2 _lhsIallInters _lhsIddp + in (Syn_Interfaces _lhsOdescr _lhsOedp _lhsOfirstvisitvertices _lhsOinters _lhsOnewedges _lhsOv _lhsOvisits ))+sem_Interfaces_Cons :: T_Interface ->+ T_Interfaces ->+ T_Interfaces +sem_Interfaces_Cons !(T_Interface hd_ ) !(T_Interfaces tl_ ) =+ (T_Interfaces (\ (!_lhsIinfo)+ (!_lhsIv) ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 449 "InterfacesRules.hs" #-})) of+ { !_hdOv ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 453 "InterfacesRules.hs" #-})) of+ { !_hdOinfo ->+ (case (hd_ _hdOinfo _hdOv ) of+ { ( !_hdIdescr,!_hdIfirstvisitvertices,!_hdInewedges,!_hdIv,!T_Interface_1 hd_1) ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _hdIv+ {-# LINE 459 "InterfacesRules.hs" #-})) of+ { !_tlOv ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 463 "InterfacesRules.hs" #-})) of+ { !_tlOinfo ->+ (case (tl_ _tlOinfo _tlOv ) of+ { ( !_tlIdescr,!_tlIfirstvisitvertices,!_tlInewedges,!_tlIv,!T_Interfaces_1 tl_1) ->+ (case (({-# LINE 130 "InterfacesRules.lag" #-}+ _hdIdescr Seq.>< _tlIdescr+ {-# LINE 469 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ _hdIfirstvisitvertices ++ _tlIfirstvisitvertices+ {-# LINE 473 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstvisitvertices ->+ (case (({-# LINE 129 "InterfacesRules.lag" #-}+ _hdInewedges Seq.>< _tlInewedges+ {-# LINE 477 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _tlIv+ {-# LINE 481 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Interfaces_Cons_1 :: T_Interfaces_1 + sem_Interfaces_Cons_1 =+ (T_Interfaces_1 (\ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 490 "InterfacesRules.hs" #-})) of+ { !_tlOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 494 "InterfacesRules.hs" #-})) of+ { !_tlOvisitDescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 498 "InterfacesRules.hs" #-})) of+ { !_tlOprev ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 502 "InterfacesRules.hs" #-})) of+ { !_hdOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 506 "InterfacesRules.hs" #-})) of+ { !_hdOvisitDescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 510 "InterfacesRules.hs" #-})) of+ { !_hdOprev ->+ (case (tl_1 _tlOprev _tlOvisitDescr _tlOvssGraph ) of+ { ( !_tlIinters,!T_Interfaces_2 tl_2) ->+ (case (hd_1 _hdOprev _hdOvisitDescr _hdOvssGraph ) of+ { ( !_hdIinter,!_hdInt,!T_Interface_2 hd_2) ->+ (case (({-# LINE 385 "InterfacesRules.lag" #-}+ Map.insert _hdInt _hdIinter _tlIinters+ {-# LINE 518 "InterfacesRules.hs" #-})) of+ { !_lhsOinters ->+ (case ((let sem_Interfaces_Cons_2 :: T_Interfaces_2 + sem_Interfaces_Cons_2 =+ (T_Interfaces_2 (\ (!_lhsIallInters)+ (!_lhsIddp) ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 526 "InterfacesRules.hs" #-})) of+ { !_tlOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 530 "InterfacesRules.hs" #-})) of+ { !_tlOallInters ->+ (case (tl_2 _tlOallInters _tlOddp ) of+ { ( !_tlIedp,!_tlIvisits) ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 536 "InterfacesRules.hs" #-})) of+ { !_hdOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 540 "InterfacesRules.hs" #-})) of+ { !_hdOallInters ->+ (case (hd_2 _hdOallInters _hdOddp ) of+ { ( !_hdIedp,!_hdIvisits) ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ _hdIedp Seq.>< _tlIedp+ {-# LINE 546 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 386 "InterfacesRules.lag" #-}+ Map.insert _hdInt _hdIvisits _tlIvisits+ {-# LINE 550 "InterfacesRules.hs" #-})) of+ { !_lhsOvisits ->+ ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) }) })) )+ in sem_Interfaces_Cons_2)) of+ { ( !sem_Interfaces_2) ->+ ( _lhsOinters,sem_Interfaces_2) }) }) }) }) }) }) }) }) }) })) )+ in sem_Interfaces_Cons_1)) of+ { ( !sem_Interfaces_1) ->+ ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) }) }) }) }) }) }) })) )+sem_Interfaces_Nil :: T_Interfaces +sem_Interfaces_Nil =+ (T_Interfaces (\ (!_lhsIinfo)+ (!_lhsIv) ->+ (case (({-# LINE 130 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 565 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ []+ {-# LINE 569 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstvisitvertices ->+ (case (({-# LINE 129 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 573 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 577 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Interfaces_Nil_1 :: T_Interfaces_1 + sem_Interfaces_Nil_1 =+ (T_Interfaces_1 (\ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 387 "InterfacesRules.lag" #-}+ Map.empty+ {-# LINE 586 "InterfacesRules.hs" #-})) of+ { !_lhsOinters ->+ (case ((let sem_Interfaces_Nil_2 :: T_Interfaces_2 + sem_Interfaces_Nil_2 =+ (T_Interfaces_2 (\ (!_lhsIallInters)+ (!_lhsIddp) ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 594 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 388 "InterfacesRules.lag" #-}+ Map.empty+ {-# LINE 598 "InterfacesRules.hs" #-})) of+ { !_lhsOvisits ->+ ( _lhsOedp,_lhsOvisits) }) })) )+ in sem_Interfaces_Nil_2)) of+ { ( !sem_Interfaces_2) ->+ ( _lhsOinters,sem_Interfaces_2) }) })) )+ in sem_Interfaces_Nil_1)) of+ { ( !sem_Interfaces_1) ->+ ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) })) )+-- Segment -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ info : Info+ chained attribute:+ v : Vertex+ visit 1:+ inherited attributes:+ n : Int+ nextNewvertices : [Vertex]+ synthesized attributes:+ descr : Seq (Vertex,ChildVisit)+ groups : [([Vertex],[Vertex])]+ newedges : Seq Edge + newvertices : [Vertex]+ visit 2:+ inherited attributes:+ cons : [ConstructorIdent]+ visitDescr : Map Vertex ChildVisit+ vssGraph : Graph+ chained attribute:+ prev : [Vertex]+ synthesized attribute:+ seg : CSegment+ visit 3:+ inherited attributes:+ allInters : CInterfaceMap+ ddp : Graph+ fromLhs : [Vertex]+ isFirst : Bool+ nextInh : [Vertex]+ nextIntravisits : [IntraVisit]+ synthesized attributes:+ cvisits : [CVisit]+ edp : Seq Edge+ inh : [Vertex]+ intravisits : [IntraVisit]+ visitss : [VisitSS]+ alternatives:+ alternative Segment:+ child inh : {[Vertex]}+ child syn : {[Vertex]}+ visit 0:+ local look : {Vertex -> CRule}+ local occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}+ local groups : {[([Vertex],[Vertex])]}+ local v : {Int}+ visit 1:+ local newvertices : _+ local visitedges : _+ local attredges : _+ intra v : {Int}+ intra groups : {[([Vertex],[Vertex])]}+ intra look : {Vertex -> CRule}+ intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}+ visit 2:+ local synOccur : _+ local vss : _+ local visitss' : _+ local visitss : {[[Vertex]]}+ local defined : _+ local _tup1 : {(Map Identifier Type,Map Identifier Type)}+ local synmap : {Map Identifier Type}+ local inhmap : {Map Identifier Type}+ intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}+ visit 3:+ local computed : _+ local fromLhs : _+ local iv : _+ local intravisits : _+ intra visitss : {[[Vertex]]}+ intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}+ intra synmap : {Map Identifier Type}+ intra inhmap : {Map Identifier Type}+-}+-- cata+sem_Segment :: Segment ->+ T_Segment +sem_Segment !(Segment _inh _syn ) =+ (sem_Segment_Segment _inh _syn )+-- semantic domain+newtype T_Segment = T_Segment (Info ->+ Vertex ->+ ( Vertex,T_Segment_1 ))+newtype T_Segment_1 = T_Segment_1 (Int ->+ ([Vertex]) ->+ ( (Seq (Vertex,ChildVisit)),([([Vertex],[Vertex])]),(Seq Edge ),([Vertex]),T_Segment_2 ))+newtype T_Segment_2 = T_Segment_2 (([ConstructorIdent]) ->+ ([Vertex]) ->+ (Map Vertex ChildVisit) ->+ Graph ->+ ( ([Vertex]),CSegment,T_Segment_3 ))+newtype T_Segment_3 = T_Segment_3 (CInterfaceMap ->+ Graph ->+ ([Vertex]) ->+ Bool ->+ ([Vertex]) ->+ ([IntraVisit]) ->+ ( ([CVisit]),(Seq Edge),([Vertex]),([IntraVisit]),([VisitSS])))+data Inh_Segment = Inh_Segment {allInters_Inh_Segment :: !(CInterfaceMap),cons_Inh_Segment :: !(([ConstructorIdent])),ddp_Inh_Segment :: !(Graph),fromLhs_Inh_Segment :: !(([Vertex])),info_Inh_Segment :: !(Info),isFirst_Inh_Segment :: !(Bool),n_Inh_Segment :: !(Int),nextInh_Inh_Segment :: !(([Vertex])),nextIntravisits_Inh_Segment :: !(([IntraVisit])),nextNewvertices_Inh_Segment :: !(([Vertex])),prev_Inh_Segment :: !(([Vertex])),v_Inh_Segment :: !(Vertex),visitDescr_Inh_Segment :: !((Map Vertex ChildVisit)),vssGraph_Inh_Segment :: !(Graph)}+data Syn_Segment = Syn_Segment {cvisits_Syn_Segment :: !(([CVisit])),descr_Syn_Segment :: !((Seq (Vertex,ChildVisit))),edp_Syn_Segment :: !((Seq Edge)),groups_Syn_Segment :: !(([([Vertex],[Vertex])])),inh_Syn_Segment :: !(([Vertex])),intravisits_Syn_Segment :: !(([IntraVisit])),newedges_Syn_Segment :: !((Seq Edge )),newvertices_Syn_Segment :: !(([Vertex])),prev_Syn_Segment :: !(([Vertex])),seg_Syn_Segment :: !(CSegment),v_Syn_Segment :: !(Vertex),visitss_Syn_Segment :: !(([VisitSS]))}+wrap_Segment :: T_Segment ->+ Inh_Segment ->+ Syn_Segment +wrap_Segment !(T_Segment sem ) !(Inh_Segment _lhsIallInters _lhsIcons _lhsIddp _lhsIfromLhs _lhsIinfo _lhsIisFirst _lhsIn _lhsInextInh _lhsInextIntravisits _lhsInextNewvertices _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =+ (let ( !_lhsOv,!T_Segment_1 sem_1) = sem _lhsIinfo _lhsIv + ( !_lhsOdescr,!_lhsOgroups,!_lhsOnewedges,!_lhsOnewvertices,!T_Segment_2 sem_2) = sem_1 _lhsIn _lhsInextNewvertices + ( !_lhsOprev,!_lhsOseg,!T_Segment_3 sem_3) = sem_2 _lhsIcons _lhsIprev _lhsIvisitDescr _lhsIvssGraph + ( !_lhsOcvisits,!_lhsOedp,!_lhsOinh,!_lhsOintravisits,!_lhsOvisitss) = sem_3 _lhsIallInters _lhsIddp _lhsIfromLhs _lhsIisFirst _lhsInextInh _lhsInextIntravisits + in (Syn_Segment _lhsOcvisits _lhsOdescr _lhsOedp _lhsOgroups _lhsOinh _lhsOintravisits _lhsOnewedges _lhsOnewvertices _lhsOprev _lhsOseg _lhsOv _lhsOvisitss ))+sem_Segment_Segment :: ([Vertex]) ->+ ([Vertex]) ->+ T_Segment +sem_Segment_Segment !inh_ !syn_ =+ (T_Segment (\ (!_lhsIinfo)+ (!_lhsIv) ->+ (case (({-# LINE 106 "InterfacesRules.lag" #-}+ \a -> ruleTable _lhsIinfo ! a+ {-# LINE 726 "InterfacesRules.hs" #-})) of+ { !_look ->+ (case (({-# LINE 109 "InterfacesRules.lag" #-}+ \p us -> [ a | u <- us+ , a <- tdsToTdp _lhsIinfo ! u+ , p (_look a)]+ {-# LINE 732 "InterfacesRules.hs" #-})) of+ { !_occurAs ->+ (case (({-# LINE 113 "InterfacesRules.lag" #-}+ let group as = gather _lhsIinfo (_occurAs isRhs as)+ in map (partition (isInh . _look)) (group (inh_ ++ syn_))+ {-# LINE 737 "InterfacesRules.hs" #-})) of+ { !_groups ->+ (case (({-# LINE 116 "InterfacesRules.lag" #-}+ _lhsIv + length _groups+ {-# LINE 741 "InterfacesRules.hs" #-})) of+ { !_v ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _v+ {-# LINE 745 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Segment_Segment_1 :: T_Segment_1 + sem_Segment_Segment_1 =+ (T_Segment_1 (\ (!_lhsIn)+ (!_lhsInextNewvertices) ->+ (case (({-# LINE 117 "InterfacesRules.lag" #-}+ [_lhsIv .. _v -1]+ {-# LINE 753 "InterfacesRules.hs" #-})) of+ { !_newvertices ->+ (case (({-# LINE 132 "InterfacesRules.lag" #-}+ Seq.fromList $ zipWith (cv _look _lhsIn) _newvertices _groups+ {-# LINE 757 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 182 "InterfacesRules.lag" #-}+ _groups+ {-# LINE 761 "InterfacesRules.hs" #-})) of+ { !_lhsOgroups ->+ (case (({-# LINE 174 "InterfacesRules.lag" #-}+ zip _newvertices _lhsInextNewvertices+ {-# LINE 765 "InterfacesRules.hs" #-})) of+ { !_visitedges ->+ (case (({-# LINE 155 "InterfacesRules.lag" #-}+ concat (zipWith ed _newvertices _groups)+ {-# LINE 769 "InterfacesRules.hs" #-})) of+ { !_attredges ->+ (case (({-# LINE 175 "InterfacesRules.lag" #-}+ Seq.fromList _attredges Seq.>< Seq.fromList _visitedges+ {-# LINE 773 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 166 "InterfacesRules.lag" #-}+ _newvertices+ {-# LINE 777 "InterfacesRules.hs" #-})) of+ { !_lhsOnewvertices ->+ (case ((let sem_Segment_Segment_2 :: T_Segment_2 + sem_Segment_Segment_2 =+ (T_Segment_2 (\ (!_lhsIcons)+ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 229 "InterfacesRules.lag" #-}+ gather _lhsIinfo (_occurAs isLhs syn_)+ {-# LINE 787 "InterfacesRules.hs" #-})) of+ { !_synOccur ->+ (case (({-# LINE 230 "InterfacesRules.lag" #-}+ let hasCode v | inRange (bounds (ruleTable _lhsIinfo)) v = getHasCode (ruleTable _lhsIinfo ! v)+ | otherwise = True+ in if null syn_+ then replicate (length _lhsIcons) []+ else map (filter hasCode . topSort' _lhsIvssGraph) _synOccur+ {-# LINE 795 "InterfacesRules.hs" #-})) of+ { !_vss ->+ (case (({-# LINE 270 "InterfacesRules.lag" #-}+ map (\\ _lhsIprev) _vss+ {-# LINE 799 "InterfacesRules.hs" #-})) of+ { !_visitss' ->+ (case (({-# LINE 284 "InterfacesRules.lag" #-}+ let rem :: [(Identifier,Identifier,Maybe Type)] -> [Vertex] -> [Vertex]+ rem prev [] = []+ rem prev (v:vs)+ | inRange (bounds table) v+ = let cr = table ! v+ addV = case findIndex cmp prev of+ Just _ -> id+ _ -> (v:)+ cmp (fld,attr,tp) = getField cr == fld && getAttr cr == attr && sameNT (getType cr) tp+ sameNT (Just (NT ntA _)) (Just (NT ntB _)) = ntA == ntB+ sameNT _ _ = False+ def = Map.elems (getDefines cr)+ in addV (rem (def ++ prev) vs)+ | otherwise = v:rem prev vs+ table = ruleTable _lhsIinfo+ in map (rem []) _visitss'+ {-# LINE 818 "InterfacesRules.hs" #-})) of+ { !_visitss ->+ (case (({-# LINE 271 "InterfacesRules.lag" #-}+ let defines v = case Map.lookup v _lhsIvisitDescr of+ Nothing -> [v]+ Just (ChildVisit _ _ _ inh _) -> v:inh+ in concatMap (concatMap defines) _visitss+ {-# LINE 825 "InterfacesRules.hs" #-})) of+ { !_defined ->+ (case (({-# LINE 275 "InterfacesRules.lag" #-}+ _lhsIprev ++ _defined+ {-# LINE 829 "InterfacesRules.hs" #-})) of+ { !_lhsOprev ->+ (case (({-# LINE 409 "InterfacesRules.lag" #-}+ let makemap = Map.fromList . map findType+ findType v = getNtaNameType (attrTable _lhsIinfo ! v)+ in (makemap inh_,makemap syn_)+ {-# LINE 835 "InterfacesRules.hs" #-})) of+ { !__tup1 ->+ (case (({-# LINE 409 "InterfacesRules.lag" #-}+ __tup1+ {-# LINE 839 "InterfacesRules.hs" #-})) of+ { !(_,!_synmap) ->+ (case (({-# LINE 409 "InterfacesRules.lag" #-}+ __tup1+ {-# LINE 843 "InterfacesRules.hs" #-})) of+ { !(!_inhmap,_) ->+ (case (({-# LINE 405 "InterfacesRules.lag" #-}+ if False then undefined _lhsIvssGraph _lhsIvisitDescr _lhsIprev else CSegment _inhmap _synmap+ {-# LINE 847 "InterfacesRules.hs" #-})) of+ { !_lhsOseg ->+ (case ((let sem_Segment_Segment_3 :: T_Segment_3 + sem_Segment_Segment_3 =+ (T_Segment_3 (\ (!_lhsIallInters)+ (!_lhsIddp)+ (!_lhsIfromLhs)+ (!_lhsIisFirst)+ (!_lhsInextInh)+ (!_lhsInextIntravisits) ->+ (case (({-# LINE 357 "InterfacesRules.lag" #-}+ let computes v = case Map.lookup v _lhsIvisitDescr of+ Nothing -> Map.keys (getDefines (ruleTable _lhsIinfo ! v))+ Just (ChildVisit _ _ _ _ syn) -> v:syn+ in concatMap (concatMap computes) _visitss+ {-# LINE 862 "InterfacesRules.hs" #-})) of+ { !_computed ->+ (case (({-# LINE 356 "InterfacesRules.lag" #-}+ _occurAs isLhs inh_ ++ _lhsIfromLhs+ {-# LINE 866 "InterfacesRules.hs" #-})) of+ { !_fromLhs ->+ (case (({-# LINE 362 "InterfacesRules.lag" #-}+ \vs next ->+ let needed = concatMap (_lhsIddp !) vs+ in nub (needed ++ next) \\ (_fromLhs ++ _computed)+ {-# LINE 872 "InterfacesRules.hs" #-})) of+ { !_iv ->+ (case (({-# LINE 361 "InterfacesRules.lag" #-}+ zipWith _iv _visitss _lhsInextIntravisits+ {-# LINE 876 "InterfacesRules.hs" #-})) of+ { !_intravisits ->+ (case (({-# LINE 412 "InterfacesRules.lag" #-}+ let mkVisit vss intra = CVisit _inhmap _synmap (mkSequence vss) (mkSequence intra) True+ mkSequence = map mkRule+ mkRule v = case Map.lookup v _lhsIvisitDescr of+ Nothing -> ruleTable _lhsIinfo ! v+ Just (ChildVisit name nt n _ _) -> ccv name nt n _lhsIallInters+ in zipWith mkVisit _visitss _intravisits+ {-# LINE 885 "InterfacesRules.hs" #-})) of+ { !_lhsOcvisits ->+ (case (({-# LINE 439 "InterfacesRules.lag" #-}+ Seq.fromList [(i,s) | i <- inh_, s <- syn_]+ Seq.>< Seq.fromList [(s,i) | s <- syn_, i <- _lhsInextInh ]+ {-# LINE 890 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 444 "InterfacesRules.lag" #-}+ inh_+ {-# LINE 894 "InterfacesRules.hs" #-})) of+ { !_lhsOinh ->+ (case (({-# LINE 327 "InterfacesRules.lag" #-}+ _intravisits+ {-# LINE 898 "InterfacesRules.hs" #-})) of+ { !_lhsOintravisits ->+ (case (({-# LINE 269 "InterfacesRules.lag" #-}+ _visitss+ {-# LINE 902 "InterfacesRules.hs" #-})) of+ { !_lhsOvisitss ->+ ( _lhsOcvisits,_lhsOedp,_lhsOinh,_lhsOintravisits,_lhsOvisitss) }) }) }) }) }) }) }) }) })) )+ in sem_Segment_Segment_3)) of+ { ( !sem_Segment_3) ->+ ( _lhsOprev,_lhsOseg,sem_Segment_3) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Segment_Segment_2)) of+ { ( !sem_Segment_2) ->+ ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,sem_Segment_2) }) }) }) }) }) }) }) })) )+ in sem_Segment_Segment_1)) of+ { ( !sem_Segment_1) ->+ ( _lhsOv,sem_Segment_1) }) }) }) }) }) })) )+-- Segments ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ info : Info+ n : Int+ chained attribute:+ v : Vertex+ synthesized attributes:+ descr : Seq (Vertex,ChildVisit)+ groups : [([Vertex],[Vertex])]+ newedges : Seq Edge + newvertices : [Vertex]+ visit 1:+ inherited attributes:+ cons : [ConstructorIdent]+ prev : [Vertex]+ visitDescr : Map Vertex ChildVisit+ vssGraph : Graph+ synthesized attribute:+ segs : CSegments+ visit 2:+ inherited attributes:+ allInters : CInterfaceMap+ ddp : Graph+ fromLhs : [Vertex]+ isFirst : Bool+ synthesized attributes:+ cvisits : [[CVisit]]+ edp : Seq Edge+ firstInh : [Vertex]+ hdIntravisits : [IntraVisit]+ prev : [Vertex]+ alternatives:+ alternative Cons:+ child hd : Segment + child tl : Segments + alternative Nil:+-}+-- cata+sem_Segments :: Segments ->+ T_Segments +sem_Segments !list =+ (Prelude.foldr sem_Segments_Cons sem_Segments_Nil (Prelude.map sem_Segment list) )+-- semantic domain+newtype T_Segments = T_Segments (Info ->+ Int ->+ Vertex ->+ ( (Seq (Vertex,ChildVisit)),([([Vertex],[Vertex])]),(Seq Edge ),([Vertex]),Vertex,T_Segments_1 ))+newtype T_Segments_1 = T_Segments_1 (([ConstructorIdent]) ->+ ([Vertex]) ->+ (Map Vertex ChildVisit) ->+ Graph ->+ ( CSegments,T_Segments_2 ))+newtype T_Segments_2 = T_Segments_2 (CInterfaceMap ->+ Graph ->+ ([Vertex]) ->+ Bool ->+ ( ([[CVisit]]),(Seq Edge),([Vertex]),([IntraVisit]),([Vertex])))+data Inh_Segments = Inh_Segments {allInters_Inh_Segments :: !(CInterfaceMap),cons_Inh_Segments :: !(([ConstructorIdent])),ddp_Inh_Segments :: !(Graph),fromLhs_Inh_Segments :: !(([Vertex])),info_Inh_Segments :: !(Info),isFirst_Inh_Segments :: !(Bool),n_Inh_Segments :: !(Int),prev_Inh_Segments :: !(([Vertex])),v_Inh_Segments :: !(Vertex),visitDescr_Inh_Segments :: !((Map Vertex ChildVisit)),vssGraph_Inh_Segments :: !(Graph)}+data Syn_Segments = Syn_Segments {cvisits_Syn_Segments :: !(([[CVisit]])),descr_Syn_Segments :: !((Seq (Vertex,ChildVisit))),edp_Syn_Segments :: !((Seq Edge)),firstInh_Syn_Segments :: !(([Vertex])),groups_Syn_Segments :: !(([([Vertex],[Vertex])])),hdIntravisits_Syn_Segments :: !(([IntraVisit])),newedges_Syn_Segments :: !((Seq Edge )),newvertices_Syn_Segments :: !(([Vertex])),prev_Syn_Segments :: !(([Vertex])),segs_Syn_Segments :: !(CSegments),v_Syn_Segments :: !(Vertex)}+wrap_Segments :: T_Segments ->+ Inh_Segments ->+ Syn_Segments +wrap_Segments !(T_Segments sem ) !(Inh_Segments _lhsIallInters _lhsIcons _lhsIddp _lhsIfromLhs _lhsIinfo _lhsIisFirst _lhsIn _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =+ (let ( !_lhsOdescr,!_lhsOgroups,!_lhsOnewedges,!_lhsOnewvertices,!_lhsOv,!T_Segments_1 sem_1) = sem _lhsIinfo _lhsIn _lhsIv + ( !_lhsOsegs,!T_Segments_2 sem_2) = sem_1 _lhsIcons _lhsIprev _lhsIvisitDescr _lhsIvssGraph + ( !_lhsOcvisits,!_lhsOedp,!_lhsOfirstInh,!_lhsOhdIntravisits,!_lhsOprev) = sem_2 _lhsIallInters _lhsIddp _lhsIfromLhs _lhsIisFirst + in (Syn_Segments _lhsOcvisits _lhsOdescr _lhsOedp _lhsOfirstInh _lhsOgroups _lhsOhdIntravisits _lhsOnewedges _lhsOnewvertices _lhsOprev _lhsOsegs _lhsOv ))+sem_Segments_Cons :: T_Segment ->+ T_Segments ->+ T_Segments +sem_Segments_Cons !(T_Segment hd_ ) !(T_Segments tl_ ) =+ (T_Segments (\ (!_lhsIinfo)+ (!_lhsIn)+ (!_lhsIv) ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 992 "InterfacesRules.hs" #-})) of+ { !_hdOv ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 996 "InterfacesRules.hs" #-})) of+ { !_hdOinfo ->+ (case (hd_ _hdOinfo _hdOv ) of+ { ( !_hdIv,!T_Segment_1 hd_1) ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _hdIv+ {-# LINE 1002 "InterfacesRules.hs" #-})) of+ { !_tlOv ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 1006 "InterfacesRules.hs" #-})) of+ { !_tlOinfo ->+ (case (({-# LINE 203 "InterfacesRules.lag" #-}+ _lhsIn+ {-# LINE 1010 "InterfacesRules.hs" #-})) of+ { !_hdOn ->+ (case (({-# LINE 207 "InterfacesRules.lag" #-}+ _lhsIn + 1+ {-# LINE 1014 "InterfacesRules.hs" #-})) of+ { !_tlOn ->+ (case (tl_ _tlOinfo _tlOn _tlOv ) of+ { ( !_tlIdescr,!_tlIgroups,!_tlInewedges,!_tlInewvertices,!_tlIv,!T_Segments_1 tl_1) ->+ (case (({-# LINE 169 "InterfacesRules.lag" #-}+ _tlInewvertices+ {-# LINE 1020 "InterfacesRules.hs" #-})) of+ { !_hdOnextNewvertices ->+ (case (hd_1 _hdOn _hdOnextNewvertices ) of+ { ( !_hdIdescr,!_hdIgroups,!_hdInewedges,!_hdInewvertices,!T_Segment_2 hd_2) ->+ (case (({-# LINE 130 "InterfacesRules.lag" #-}+ _hdIdescr Seq.>< _tlIdescr+ {-# LINE 1026 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 184 "InterfacesRules.lag" #-}+ _hdIgroups+ {-# LINE 1030 "InterfacesRules.hs" #-})) of+ { !_lhsOgroups ->+ (case (({-# LINE 129 "InterfacesRules.lag" #-}+ _hdInewedges Seq.>< _tlInewedges+ {-# LINE 1034 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 170 "InterfacesRules.lag" #-}+ _hdInewvertices+ {-# LINE 1038 "InterfacesRules.hs" #-})) of+ { !_lhsOnewvertices ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _tlIv+ {-# LINE 1042 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Segments_Cons_1 :: T_Segments_1 + sem_Segments_Cons_1 =+ (T_Segments_1 (\ (!_lhsIcons)+ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 1052 "InterfacesRules.hs" #-})) of+ { !_tlOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 1056 "InterfacesRules.hs" #-})) of+ { !_tlOvisitDescr ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 1060 "InterfacesRules.hs" #-})) of+ { !_hdOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 1064 "InterfacesRules.hs" #-})) of+ { !_hdOvisitDescr ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 1068 "InterfacesRules.hs" #-})) of+ { !_hdOprev ->+ (case (({-# LINE 235 "InterfacesRules.lag" #-}+ _lhsIcons+ {-# LINE 1072 "InterfacesRules.hs" #-})) of+ { !_hdOcons ->+ (case (hd_2 _hdOcons _hdOprev _hdOvisitDescr _hdOvssGraph ) of+ { ( !_hdIprev,!_hdIseg,!T_Segment_3 hd_3) ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _hdIprev+ {-# LINE 1078 "InterfacesRules.hs" #-})) of+ { !_tlOprev ->+ (case (({-# LINE 235 "InterfacesRules.lag" #-}+ _lhsIcons+ {-# LINE 1082 "InterfacesRules.hs" #-})) of+ { !_tlOcons ->+ (case (tl_1 _tlOcons _tlOprev _tlOvisitDescr _tlOvssGraph ) of+ { ( !_tlIsegs,!T_Segments_2 tl_2) ->+ (case (({-# LINE 400 "InterfacesRules.lag" #-}+ _hdIseg : _tlIsegs+ {-# LINE 1088 "InterfacesRules.hs" #-})) of+ { !_lhsOsegs ->+ (case ((let sem_Segments_Cons_2 :: T_Segments_2 + sem_Segments_Cons_2 =+ (T_Segments_2 (\ (!_lhsIallInters)+ (!_lhsIddp)+ (!_lhsIfromLhs)+ (!_lhsIisFirst) ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 1098 "InterfacesRules.hs" #-})) of+ { !_tlOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 1102 "InterfacesRules.hs" #-})) of+ { !_tlOallInters ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 1106 "InterfacesRules.hs" #-})) of+ { !_hdOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 1110 "InterfacesRules.hs" #-})) of+ { !_hdOallInters ->+ (case (({-# LINE 354 "InterfacesRules.lag" #-}+ []+ {-# LINE 1114 "InterfacesRules.hs" #-})) of+ { !_tlOfromLhs ->+ (case (({-# LINE 353 "InterfacesRules.lag" #-}+ _lhsIfromLhs+ {-# LINE 1118 "InterfacesRules.hs" #-})) of+ { !_hdOfromLhs ->+ (case (({-# LINE 316 "InterfacesRules.lag" #-}+ False+ {-# LINE 1122 "InterfacesRules.hs" #-})) of+ { !_tlOisFirst ->+ (case (tl_2 _tlOallInters _tlOddp _tlOfromLhs _tlOisFirst ) of+ { ( !_tlIcvisits,!_tlIedp,!_tlIfirstInh,!_tlIhdIntravisits,!_tlIprev) ->+ (case (({-# LINE 329 "InterfacesRules.lag" #-}+ _tlIhdIntravisits+ {-# LINE 1128 "InterfacesRules.hs" #-})) of+ { !_hdOnextIntravisits ->+ (case (({-# LINE 312 "InterfacesRules.lag" #-}+ _lhsIisFirst+ {-# LINE 1132 "InterfacesRules.hs" #-})) of+ { !_hdOisFirst ->+ (case (({-# LINE 446 "InterfacesRules.lag" #-}+ _tlIfirstInh+ {-# LINE 1136 "InterfacesRules.hs" #-})) of+ { !_hdOnextInh ->+ (case (hd_3 _hdOallInters _hdOddp _hdOfromLhs _hdOisFirst _hdOnextInh _hdOnextIntravisits ) of+ { ( !_hdIcvisits,!_hdIedp,!_hdIinh,!_hdIintravisits,!_hdIvisitss) ->+ (case (({-# LINE 399 "InterfacesRules.lag" #-}+ _hdIcvisits : _tlIcvisits+ {-# LINE 1142 "InterfacesRules.hs" #-})) of+ { !_lhsOcvisits ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ _hdIedp Seq.>< _tlIedp+ {-# LINE 1146 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 447 "InterfacesRules.lag" #-}+ _hdIinh+ {-# LINE 1150 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstInh ->+ (case (({-# LINE 330 "InterfacesRules.lag" #-}+ _hdIintravisits+ {-# LINE 1154 "InterfacesRules.hs" #-})) of+ { !_lhsOhdIntravisits ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _tlIprev+ {-# LINE 1158 "InterfacesRules.hs" #-})) of+ { !_lhsOprev ->+ ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Segments_Cons_2)) of+ { ( !sem_Segments_2) ->+ ( _lhsOsegs,sem_Segments_2) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Segments_Cons_1)) of+ { ( !sem_Segments_1) ->+ ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,_lhsOv,sem_Segments_1) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Segments_Nil :: T_Segments +sem_Segments_Nil =+ (T_Segments (\ (!_lhsIinfo)+ (!_lhsIn)+ (!_lhsIv) ->+ (case (({-# LINE 130 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 1174 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 185 "InterfacesRules.lag" #-}+ []+ {-# LINE 1178 "InterfacesRules.hs" #-})) of+ { !_lhsOgroups ->+ (case (({-# LINE 129 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 1182 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 171 "InterfacesRules.lag" #-}+ []+ {-# LINE 1186 "InterfacesRules.hs" #-})) of+ { !_lhsOnewvertices ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 1190 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Segments_Nil_1 :: T_Segments_1 + sem_Segments_Nil_1 =+ (T_Segments_1 (\ (!_lhsIcons)+ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 401 "InterfacesRules.lag" #-}+ []+ {-# LINE 1200 "InterfacesRules.hs" #-})) of+ { !_lhsOsegs ->+ (case ((let sem_Segments_Nil_2 :: T_Segments_2 + sem_Segments_Nil_2 =+ (T_Segments_2 (\ (!_lhsIallInters)+ (!_lhsIddp)+ (!_lhsIfromLhs)+ (!_lhsIisFirst) ->+ (case (({-# LINE 399 "InterfacesRules.lag" #-}+ []+ {-# LINE 1210 "InterfacesRules.hs" #-})) of+ { !_lhsOcvisits ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 1214 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 448 "InterfacesRules.lag" #-}+ []+ {-# LINE 1218 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstInh ->+ (case (({-# LINE 331 "InterfacesRules.lag" #-}+ repeat []+ {-# LINE 1222 "InterfacesRules.hs" #-})) of+ { !_lhsOhdIntravisits ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 1226 "InterfacesRules.hs" #-})) of { !_lhsOprev -> ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) })) ) in sem_Segments_Nil_2)) of
src-derived/Order.hs view
@@ -1,5026 +1,5012 @@ --- UUAGC 0.9.29 (Order.ag)-module Order where-{-# LINE 9 "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 Maybe-{-# LINE 42 "../src-derived/Order.hs" #-}--{-# LINE 2 "./Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 49 "../src-derived/Order.hs" #-}--{-# LINE 2 "./Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 55 "../src-derived/Order.hs" #-}--{-# LINE 2 "./AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import CommonTypes-{-# LINE 65 "../src-derived/Order.hs" #-}-{-# LINE 46 "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 76 "../src-derived/Order.hs" #-}--{-# LINE 71 "Order.ag" #-}--startsWith :: String -> String -> Bool-startsWith k h = k == take (length k) h-{-# LINE 82 "../src-derived/Order.hs" #-}--{-# LINE 138 "Order.ag" #-}--getNtName :: Type -> NontermIdent-getNtName (NT nt _) = maybe nt id (deforestedNt nt)-getNtName _ = nullIdent-{-# LINE 89 "../src-derived/Order.hs" #-}--{-# LINE 166 "Order.ag" #-}--data AltAttr = AltAttr Identifier Identifier Bool - deriving (Eq, Ord, Show)-{-# LINE 95 "../src-derived/Order.hs" #-}--{-# LINE 238 "Order.ag" #-}--substSelf nt tp- = case tp of- NT n tps | n == _SELF -> NT nt tps- _ -> tp- -haskellTupel :: [Type] -> Maybe Type-haskellTupel ts = Just ( Haskell ( '(' : (concat (intersperse "," (map show ts))) ++ ")" ))-{-# LINE 106 "../src-derived/Order.hs" #-}--{-# LINE 687 "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 226 "../src-derived/Order.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,Maybe (Maybe Type))]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- inh : Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- o_unbox : Bool- syn : Attributes- synthesized attributes:- attributes : [(Identifier,Attributes,Attributes)]- collectChildrenInhs : Map Identifier Attributes - collectChildrenSyns : Map Identifier Attributes - errors : Seq Error- field : (Identifier,Type,Maybe (Maybe Type))- gathAltAttrs : [AltAttr]- gathRules : Seq CRule- inhs : Seq (Identifier,Attributes)- nts : Seq (Identifier,NontermIdent)- singlevisits : [CRule]- terminals : [Identifier]- alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child inh : {Attributes}- child syn : {Attributes}- child virtual : {Maybe (Maybe Type)}- visit 0:- local maptolocal : _- local gathRules : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child (Child _name _tp _inh _syn _virtual ) =- (sem_Child_Child _name _tp _inh _syn _virtual )--- semantic domain-newtype T_Child = T_Child (([(Identifier,Type,Maybe (Maybe Type))]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- Attributes ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Bool ->- Attributes ->- ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),((Identifier,Type,Maybe (Maybe Type))),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))-data Inh_Child = Inh_Child {allfields_Inh_Child :: !(([(Identifier,Type,Maybe (Maybe Type))])),allnts_Inh_Child :: !(([Identifier])),attrs_Inh_Child :: !(([(Identifier,Identifier)])),con_Inh_Child :: !(Identifier),inh_Inh_Child :: !(Attributes),mergeMap_Inh_Child :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Child :: !(Identifier),o_unbox_Inh_Child :: !(Bool),syn_Inh_Child :: !(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,Maybe (Maybe Type)))),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]))}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child (T_Child sem ) (Inh_Child _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn ) =- (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) =- (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn )- in (Syn_Child _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals ))-sem_Child_Child :: Identifier ->- Type ->- Attributes ->- Attributes ->- (Maybe (Maybe Type)) ->- T_Child -sem_Child_Child name_ tp_ inh_ syn_ virtual_ =- (T_Child (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsImergeMap- _lhsInt- _lhsIo_unbox- _lhsIsyn ->- (let _lhsOgathAltAttrs :: ([AltAttr])- _lhsOnts :: (Seq (Identifier,NontermIdent))- _lhsOinhs :: (Seq (Identifier,Attributes))- _lhsOcollectChildrenSyns :: (Map Identifier Attributes )- _lhsOcollectChildrenInhs :: (Map Identifier Attributes )- _lhsOsinglevisits :: ([CRule])- _lhsOterminals :: ([Identifier])- _lhsOattributes :: ([(Identifier,Attributes,Attributes)])- _lhsOfield :: ((Identifier,Type,Maybe (Maybe Type)))- _lhsOerrors :: (Seq Error)- _lhsOgathRules :: (Seq CRule)- -- "Order.ag"(line 177, column 13)- _maptolocal =- ({-# LINE 177 "Order.ag" #-}- case tp_ of- NT nt _ -> Map.null syn_- _ -> True- {-# LINE 321 "Order.hs" #-})- -- "Order.ag"(line 180, column 13)- _lhsOgathAltAttrs =- ({-# LINE 180 "Order.ag" #-}- if _maptolocal- then [ AltAttr _LOC name_ True ]- else [ AltAttr name_ syn True | syn <- Map.keys syn_ ]- {-# LINE 328 "Order.hs" #-})- -- "Order.ag"(line 195, column 13)- _lhsOnts =- ({-# LINE 195 "Order.ag" #-}- Seq.singleton (name_,getNtName tp_)- {-# LINE 333 "Order.hs" #-})- -- "Order.ag"(line 196, column 13)- _lhsOinhs =- ({-# LINE 196 "Order.ag" #-}- Seq.singleton (name_,inh_)- {-# LINE 338 "Order.hs" #-})- -- "Order.ag"(line 212, column 13)- _gathRules =- ({-# LINE 212 "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 345 "Order.hs" #-})- -- "Order.ag"(line 346, column 12)- _lhsOcollectChildrenSyns =- ({-# LINE 346 "Order.ag" #-}- Map.singleton name_ syn_- {-# LINE 350 "Order.hs" #-})- -- "Order.ag"(line 347, column 12)- _lhsOcollectChildrenInhs =- ({-# LINE 347 "Order.ag" #-}- Map.singleton name_ inh_- {-# LINE 355 "Order.hs" #-})- -- "Order.ag"(line 613, column 11)- _lhsOsinglevisits =- ({-# LINE 613 "Order.ag" #-}- if _maptolocal- then []- else [CChildVisit name_ (getNtName tp_) 0 inh_ syn_ True]- {-# LINE 362 "Order.hs" #-})- -- "Order.ag"(line 638, column 11)- _lhsOterminals =- ({-# LINE 638 "Order.ag" #-}- if _maptolocal- then [name_]- else []- {-# LINE 369 "Order.hs" #-})- -- "Order.ag"(line 667, column 11)- _lhsOattributes =- ({-# LINE 667 "Order.ag" #-}- [(name_, inh_, syn_)]- {-# LINE 374 "Order.hs" #-})- -- "Order.ag"(line 671, column 11)- _lhsOfield =- ({-# LINE 671 "Order.ag" #-}- (name_, tp_, virtual_)- {-# LINE 379 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- Seq.empty- {-# LINE 384 "Order.hs" #-})- -- use rule "Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "Order.ag" #-}- _gathRules- {-# LINE 389 "Order.hs" #-})- in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )--- Children -----------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,Maybe (Maybe Type))]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- inh : Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- o_unbox : Bool- syn : Attributes- synthesized attributes:- attributes : [(Identifier,Attributes,Attributes)]- collectChildrenInhs : Map Identifier Attributes - collectChildrenSyns : Map Identifier Attributes - errors : Seq Error- fields : [(Identifier,Type,Maybe (Maybe Type))]- gathAltAttrs : [AltAttr]- gathRules : Seq CRule- inhs : Seq (Identifier,Attributes)- nts : Seq (Identifier,NontermIdent)- singlevisits : [CRule]- terminals : [Identifier]- alternatives:- alternative Cons:- child hd : Child - child tl : Children - alternative Nil:--}--- cata-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 (([(Identifier,Type,Maybe (Maybe Type))]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- Attributes ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- Bool ->- Attributes ->- ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),([(Identifier,Type,Maybe (Maybe Type))]),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))-data Inh_Children = Inh_Children {allfields_Inh_Children :: !(([(Identifier,Type,Maybe (Maybe Type))])),allnts_Inh_Children :: !(([Identifier])),attrs_Inh_Children :: !(([(Identifier,Identifier)])),con_Inh_Children :: !(Identifier),inh_Inh_Children :: !(Attributes),mergeMap_Inh_Children :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Children :: !(Identifier),o_unbox_Inh_Children :: !(Bool),syn_Inh_Children :: !(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,Maybe (Maybe Type))])),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]))}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children (T_Children sem ) (Inh_Children _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn ) =- (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) =- (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn )- in (Syn_Children _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons (T_Child hd_ ) (T_Children tl_ ) =- (T_Children (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsImergeMap- _lhsInt- _lhsIo_unbox- _lhsIsyn ->- (let _lhsOfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _lhsOattributes :: ([(Identifier,Attributes,Attributes)])- _lhsOcollectChildrenInhs :: (Map Identifier Attributes )- _lhsOcollectChildrenSyns :: (Map Identifier Attributes )- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinhs :: (Seq (Identifier,Attributes))- _lhsOnts :: (Seq (Identifier,NontermIdent))- _lhsOsinglevisits :: ([CRule])- _lhsOterminals :: ([Identifier])- _hdOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _hdOallnts :: ([Identifier])- _hdOattrs :: ([(Identifier,Identifier)])- _hdOcon :: Identifier- _hdOinh :: Attributes- _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _hdOnt :: Identifier- _hdOo_unbox :: Bool- _hdOsyn :: Attributes- _tlOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _tlOallnts :: ([Identifier])- _tlOattrs :: ([(Identifier,Identifier)])- _tlOcon :: Identifier- _tlOinh :: Attributes- _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _tlOnt :: Identifier- _tlOo_unbox :: Bool- _tlOsyn :: Attributes- _hdIattributes :: ([(Identifier,Attributes,Attributes)])- _hdIcollectChildrenInhs :: (Map Identifier Attributes )- _hdIcollectChildrenSyns :: (Map Identifier Attributes )- _hdIerrors :: (Seq Error)- _hdIfield :: ((Identifier,Type,Maybe (Maybe Type)))- _hdIgathAltAttrs :: ([AltAttr])- _hdIgathRules :: (Seq CRule)- _hdIinhs :: (Seq (Identifier,Attributes))- _hdInts :: (Seq (Identifier,NontermIdent))- _hdIsinglevisits :: ([CRule])- _hdIterminals :: ([Identifier])- _tlIattributes :: ([(Identifier,Attributes,Attributes)])- _tlIcollectChildrenInhs :: (Map Identifier Attributes )- _tlIcollectChildrenSyns :: (Map Identifier Attributes )- _tlIerrors :: (Seq Error)- _tlIfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _tlIgathAltAttrs :: ([AltAttr])- _tlIgathRules :: (Seq CRule)- _tlIinhs :: (Seq (Identifier,Attributes))- _tlInts :: (Seq (Identifier,NontermIdent))- _tlIsinglevisits :: ([CRule])- _tlIterminals :: ([Identifier])- -- "Order.ag"(line 674, column 11)- _lhsOfields =- ({-# LINE 674 "Order.ag" #-}- _hdIfield : _tlIfields- {-# LINE 515 "Order.hs" #-})- -- use rule "Order.ag"(line 665, column 32)- _lhsOattributes =- ({-# LINE 665 "Order.ag" #-}- _hdIattributes ++ _tlIattributes- {-# LINE 520 "Order.hs" #-})- -- use rule "Order.ag"(line 344, column 68)- _lhsOcollectChildrenInhs =- ({-# LINE 344 "Order.ag" #-}- _hdIcollectChildrenInhs `Map.union` _tlIcollectChildrenInhs- {-# LINE 525 "Order.hs" #-})- -- use rule "Order.ag"(line 344, column 68)- _lhsOcollectChildrenSyns =- ({-# LINE 344 "Order.ag" #-}- _hdIcollectChildrenSyns `Map.union` _tlIcollectChildrenSyns- {-# LINE 530 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 535 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- _hdIgathAltAttrs ++ _tlIgathAltAttrs- {-# LINE 540 "Order.hs" #-})- -- use rule "Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "Order.ag" #-}- _hdIgathRules Seq.>< _tlIgathRules- {-# LINE 545 "Order.hs" #-})- -- use rule "Order.ag"(line 193, column 20)- _lhsOinhs =- ({-# LINE 193 "Order.ag" #-}- _hdIinhs Seq.>< _tlIinhs- {-# LINE 550 "Order.hs" #-})- -- use rule "Order.ag"(line 192, column 19)- _lhsOnts =- ({-# LINE 192 "Order.ag" #-}- _hdInts Seq.>< _tlInts- {-# LINE 555 "Order.hs" #-})- -- use rule "Order.ag"(line 611, column 40)- _lhsOsinglevisits =- ({-# LINE 611 "Order.ag" #-}- _hdIsinglevisits ++ _tlIsinglevisits- {-# LINE 560 "Order.hs" #-})- -- use rule "Order.ag"(line 636, column 38)- _lhsOterminals =- ({-# LINE 636 "Order.ag" #-}- _hdIterminals ++ _tlIterminals- {-# LINE 565 "Order.hs" #-})- -- copy rule (down)- _hdOallfields =- ({-# LINE 654 "Order.ag" #-}- _lhsIallfields- {-# LINE 570 "Order.hs" #-})- -- copy rule (down)- _hdOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 575 "Order.hs" #-})- -- copy rule (down)- _hdOattrs =- ({-# LINE 654 "Order.ag" #-}- _lhsIattrs- {-# LINE 580 "Order.hs" #-})- -- copy rule (down)- _hdOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 585 "Order.hs" #-})- -- copy rule (down)- _hdOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 590 "Order.hs" #-})- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 362 "Order.ag" #-}- _lhsImergeMap- {-# LINE 595 "Order.hs" #-})- -- copy rule (down)- _hdOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 600 "Order.hs" #-})- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 119 "Order.ag" #-}- _lhsIo_unbox- {-# LINE 605 "Order.hs" #-})- -- copy rule (down)- _hdOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 610 "Order.hs" #-})- -- copy rule (down)- _tlOallfields =- ({-# LINE 654 "Order.ag" #-}- _lhsIallfields- {-# LINE 615 "Order.hs" #-})- -- copy rule (down)- _tlOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 620 "Order.hs" #-})- -- copy rule (down)- _tlOattrs =- ({-# LINE 654 "Order.ag" #-}- _lhsIattrs- {-# LINE 625 "Order.hs" #-})- -- copy rule (down)- _tlOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 630 "Order.hs" #-})- -- copy rule (down)- _tlOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 635 "Order.hs" #-})- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 362 "Order.ag" #-}- _lhsImergeMap- {-# LINE 640 "Order.hs" #-})- -- copy rule (down)- _tlOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 645 "Order.hs" #-})- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 119 "Order.ag" #-}- _lhsIo_unbox- {-# LINE 650 "Order.hs" #-})- -- copy rule (down)- _tlOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 655 "Order.hs" #-})- ( _hdIattributes,_hdIcollectChildrenInhs,_hdIcollectChildrenSyns,_hdIerrors,_hdIfield,_hdIgathAltAttrs,_hdIgathRules,_hdIinhs,_hdInts,_hdIsinglevisits,_hdIterminals) =- (hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOmergeMap _hdOnt _hdOo_unbox _hdOsyn )- ( _tlIattributes,_tlIcollectChildrenInhs,_tlIcollectChildrenSyns,_tlIerrors,_tlIfields,_tlIgathAltAttrs,_tlIgathRules,_tlIinhs,_tlInts,_tlIsinglevisits,_tlIterminals) =- (tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOmergeMap _tlOnt _tlOo_unbox _tlOsyn )- in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsIinh- _lhsImergeMap- _lhsInt- _lhsIo_unbox- _lhsIsyn ->- (let _lhsOfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _lhsOattributes :: ([(Identifier,Attributes,Attributes)])- _lhsOcollectChildrenInhs :: (Map Identifier Attributes )- _lhsOcollectChildrenSyns :: (Map Identifier Attributes )- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinhs :: (Seq (Identifier,Attributes))- _lhsOnts :: (Seq (Identifier,NontermIdent))- _lhsOsinglevisits :: ([CRule])- _lhsOterminals :: ([Identifier])- -- "Order.ag"(line 675, column 11)- _lhsOfields =- ({-# LINE 675 "Order.ag" #-}- []- {-# LINE 687 "Order.hs" #-})- -- use rule "Order.ag"(line 665, column 32)- _lhsOattributes =- ({-# LINE 665 "Order.ag" #-}- []- {-# LINE 692 "Order.hs" #-})- -- use rule "Order.ag"(line 344, column 68)- _lhsOcollectChildrenInhs =- ({-# LINE 344 "Order.ag" #-}- Map.empty- {-# LINE 697 "Order.hs" #-})- -- use rule "Order.ag"(line 344, column 68)- _lhsOcollectChildrenSyns =- ({-# LINE 344 "Order.ag" #-}- Map.empty- {-# LINE 702 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- Seq.empty- {-# LINE 707 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- []- {-# LINE 712 "Order.hs" #-})- -- use rule "Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "Order.ag" #-}- Seq.empty- {-# LINE 717 "Order.hs" #-})- -- use rule "Order.ag"(line 193, column 20)- _lhsOinhs =- ({-# LINE 193 "Order.ag" #-}- Seq.empty- {-# LINE 722 "Order.hs" #-})- -- use rule "Order.ag"(line 192, column 19)- _lhsOnts =- ({-# LINE 192 "Order.ag" #-}- Seq.empty- {-# LINE 727 "Order.hs" #-})- -- use rule "Order.ag"(line 611, column 40)- _lhsOsinglevisits =- ({-# LINE 611 "Order.ag" #-}- []- {-# LINE 732 "Order.hs" #-})- -- use rule "Order.ag"(line 636, column 38)- _lhsOterminals =- ({-# LINE 636 "Order.ag" #-}- []- {-# LINE 737 "Order.hs" #-})- in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )--- Expression ---------------------------------------------------{-- visit 0:- inherited attributes:- allfields : [(Identifier,Type,Maybe (Maybe Type))]- allnts : [Identifier]- attrs : [(Identifier,Identifier)]- con : Identifier- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- synthesized attributes:- allRhsVars : Set (Identifier,Identifier)- copy : SELF - errors : Seq Error- textLines : [String]- usedAttrs : [(Identifier,Identifier)]- usedFields : [Identifier]- usedLocals : [Identifier]- alternatives:- alternative Expression:- child pos : {Pos}- child tks : {[HsToken]}- visit 0:- local _tup1 : _- local errors : _- local textLines : _- local usedAttrs : _- local usedLocals : _- local usedFields : _- local copy : _--}--- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression (Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )--- semantic domain-newtype T_Expression = T_Expression (([(Identifier,Type,Maybe (Maybe Type))]) ->- ([Identifier]) ->- ([(Identifier,Identifier)]) ->- Identifier ->- (Map Identifier (Identifier,[Identifier])) ->- Identifier ->- ( (Set (Identifier,Identifier)),Expression ,(Seq Error),([String]),([(Identifier,Identifier)]),([Identifier]),([Identifier])))-data Inh_Expression = Inh_Expression {allfields_Inh_Expression :: !(([(Identifier,Type,Maybe (Maybe Type))])),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]))}-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression (T_Expression sem ) (Inh_Expression _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt ) =- (let ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) =- (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt )- in (Syn_Expression _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals ))-sem_Expression_Expression :: Pos ->- ([HsToken]) ->- T_Expression -sem_Expression_Expression pos_ tks_ =- (T_Expression (\ _lhsIallfields- _lhsIallnts- _lhsIattrs- _lhsIcon- _lhsImergeMap- _lhsInt ->- (let _lhsOallRhsVars :: (Set (Identifier,Identifier))- _lhsOcopy :: Expression - _lhsOerrors :: (Seq Error)- _lhsOtextLines :: ([String])- _lhsOusedAttrs :: ([(Identifier,Identifier)])- _lhsOusedFields :: ([Identifier])- _lhsOusedLocals :: ([Identifier])- -- "Order.ag"(line 464, column 21)- __tup1 =- ({-# LINE 464 "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- { errors_Syn_HsTokensRoot = errors- , 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 (errors,textLines,usedAttrs',usedLocals,usedFields)- {-# LINE 834 "Order.hs" #-})- -- "Order.ag"(line 464, column 21)- (_errors,_,_,_,_) =- ({-# LINE 464 "Order.ag" #-}- __tup1- {-# LINE 839 "Order.hs" #-})- -- "Order.ag"(line 464, column 21)- (_,_textLines,_,_,_) =- ({-# LINE 464 "Order.ag" #-}- __tup1- {-# LINE 844 "Order.hs" #-})- -- "Order.ag"(line 464, column 21)- (_,_,_usedAttrs,_,_) =- ({-# LINE 464 "Order.ag" #-}- __tup1- {-# LINE 849 "Order.hs" #-})- -- "Order.ag"(line 464, column 21)- (_,_,_,_usedLocals,_) =- ({-# LINE 464 "Order.ag" #-}- __tup1- {-# LINE 854 "Order.hs" #-})- -- "Order.ag"(line 464, column 21)- (_,_,_,_,_usedFields) =- ({-# LINE 464 "Order.ag" #-}- __tup1- {-# LINE 859 "Order.hs" #-})- -- "Order.ag"(line 488, column 17)- _lhsOallRhsVars =- ({-# LINE 488 "Order.ag" #-}- Set.fromList _usedAttrs- `Set.union`- Set.fromList [ (_LOC, l) | l <- _usedLocals ]- `Set.union`- Set.fromList [ (_FIELD, fld) | fld <- _usedFields ]- {-# LINE 868 "Order.hs" #-})- -- self rule- _copy =- ({-# LINE 457 "Order.ag" #-}- Expression pos_ tks_- {-# LINE 873 "Order.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 457 "Order.ag" #-}- _copy- {-# LINE 878 "Order.hs" #-})- -- copy rule (from local)- _lhsOerrors =- ({-# LINE 452 "Order.ag" #-}- _errors- {-# LINE 883 "Order.hs" #-})- -- copy rule (from local)- _lhsOtextLines =- ({-# LINE 456 "Order.ag" #-}- _textLines- {-# LINE 888 "Order.hs" #-})- -- copy rule (from local)- _lhsOusedAttrs =- ({-# LINE 454 "Order.ag" #-}- _usedAttrs- {-# LINE 893 "Order.hs" #-})- -- copy rule (from local)- _lhsOusedFields =- ({-# LINE 455 "Order.ag" #-}- _usedFields- {-# LINE 898 "Order.hs" #-})- -- copy rule (from local)- _lhsOusedLocals =- ({-# LINE 453 "Order.ag" #-}- _usedLocals- {-# LINE 903 "Order.hs" #-})- in ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- errors : Seq Error- nAutoRules : Int- nExplicitRules : Int- output : CGrammar- alternatives:- alternative Grammar:- child typeSyns : {TypeSyns}- child useMap : {UseMap}- child derivings : {Derivings}- child wrappers : {Set NontermIdent}- child nonts : Nonterminals - child pragmas : {PragmaMap}- child manualAttrOrderMap : {AttrOrderMap}- child paramMap : {ParamMap}- child contextMap : {ContextMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}- visit 0:- local o_dovisit : _- local ruleTable : _- local attrTable : _- local attrVertex : _- local tdpToTds : _- local tdsToTdp : _- local directDep : _- local instDep : _- local aroundDep : _- local mergeDep : _- local info : _- local _tup2 : _- local cInterfaceMap : _- local cVisitsMap : _- local cyclesErrors : _- local aroundMap : _- local mergeMap : _--}--- cata-sem_Grammar :: Grammar ->- T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =- (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )--- semantic domain-newtype T_Grammar = T_Grammar (Options ->- ( (Seq Error),Int,Int,CGrammar))-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)}-wrap_Grammar :: T_Grammar ->- Inh_Grammar ->- Syn_Grammar -wrap_Grammar (T_Grammar sem ) (Inh_Grammar _lhsIoptions ) =- (let ( _lhsOerrors,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOoutput) =- (sem _lhsIoptions )- in (Syn_Grammar _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput ))-sem_Grammar_Grammar :: TypeSyns ->- UseMap ->- Derivings ->- (Set NontermIdent) ->- T_Nonterminals ->- PragmaMap ->- AttrOrderMap ->- ParamMap ->- ContextMap ->- UniqueMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->- T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =- (T_Grammar (\ _lhsIoptions ->- (let _nontsOo_cata :: Bool- _nontsOo_data :: Bool- _nontsOo_sig :: Bool- _nontsOo_sem :: Bool- _nontsOo_rename :: Bool- _nontsOo_newtypes :: Bool- _nontsOo_wantvisit :: Bool- _nontsOo_unbox :: Bool- _nontsOo_case :: Bool- _nontsOprefix :: String- _nontsOvcount :: Int- _nontsOmanualAttrDepMap :: AttrOrderMap- _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))- _nontsOacount :: Int- _lhsOerrors :: (Seq Error)- _lhsOoutput :: CGrammar- _nontsOallnts :: ([Identifier])- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _nontsOcInterfaceMap :: CInterfaceMap- _nontsOcVisitsMap :: CVisitsMap- _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))- _nontsOo_dovisit :: Bool- _nontsIacount :: Int- _nontsIadditionalDep :: (Seq Edge)- _nontsIaranges :: (Seq (Int,Int,Int))- _nontsIaroundDep :: (Seq Edge)- _nontsIcNonterminals :: CNonterminals- _nontsIdirectDep :: (Seq Edge)- _nontsIerrors :: (Seq Error)- _nontsIinstDep :: (Seq Edge)- _nontsImergeDep :: (Seq Edge)- _nontsInAutoRules :: Int- _nontsInExplicitRules :: Int- _nontsInonts :: ([(NontermIdent,[ConstructorIdent])])- _nontsIntattrs :: (Seq (Vertex,NTAttr))- _nontsIrules :: (Seq (Vertex,CRule))- _nontsIvcount :: Int- -- "Order.ag"(line 123, column 17)- _o_dovisit =- ({-# LINE 123 "Order.ag" #-}- visit _lhsIoptions && null _cyclesErrors- {-# LINE 1024 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOo_cata =- ({-# LINE 124 "Order.ag" #-}- folds _lhsIoptions- {-# LINE 1029 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOo_data =- ({-# LINE 125 "Order.ag" #-}- dataTypes _lhsIoptions- {-# LINE 1034 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOo_sig =- ({-# LINE 126 "Order.ag" #-}- typeSigs _lhsIoptions- {-# LINE 1039 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOo_sem =- ({-# LINE 127 "Order.ag" #-}- semfuns _lhsIoptions- {-# LINE 1044 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOo_rename =- ({-# LINE 128 "Order.ag" #-}- rename _lhsIoptions- {-# LINE 1049 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOo_newtypes =- ({-# LINE 129 "Order.ag" #-}- newtypes _lhsIoptions- {-# LINE 1054 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOo_wantvisit =- ({-# LINE 130 "Order.ag" #-}- visit _lhsIoptions- {-# LINE 1059 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOo_unbox =- ({-# LINE 131 "Order.ag" #-}- unbox _lhsIoptions- {-# LINE 1064 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOo_case =- ({-# LINE 132 "Order.ag" #-}- cases _lhsIoptions- {-# LINE 1069 "Order.hs" #-})- -- "Order.ag"(line 124, column 17)- _nontsOprefix =- ({-# LINE 133 "Order.ag" #-}- prefix _lhsIoptions- {-# LINE 1074 "Order.hs" #-})- -- "Order.ag"(line 261, column 15)- _nontsOvcount =- ({-# LINE 261 "Order.ag" #-}- 0- {-# LINE 1079 "Order.hs" #-})- -- "Order.ag"(line 287, column 7)- _nontsOmanualAttrDepMap =- ({-# LINE 287 "Order.ag" #-}- manualAttrOrderMap_- {-# LINE 1084 "Order.hs" #-})- -- "Order.ag"(line 416, column 14)- _nontsOaroundMap =- ({-# LINE 416 "Order.ag" #-}- aroundsMap_- {-# LINE 1089 "Order.hs" #-})- -- "Order.ag"(line 503, column 13)- _nontsOacount =- ({-# LINE 503 "Order.ag" #-}- 0- {-# LINE 1094 "Order.hs" #-})- -- "Order.ag"(line 541, column 13)- _ruleTable =- ({-# LINE 541 "Order.ag" #-}- Array.array (0,_nontsIvcount-1) (toList _nontsIrules)- {-# LINE 1099 "Order.hs" #-})- -- "Order.ag"(line 542, column 13)- _attrTable =- ({-# LINE 542 "Order.ag" #-}- Array.array (0,_nontsIacount-1) (toList _nontsIntattrs)- {-# LINE 1104 "Order.hs" #-})- -- "Order.ag"(line 543, column 13)- _attrVertex =- ({-# LINE 543 "Order.ag" #-}- Map.fromList (map swap (toList _nontsIntattrs))- {-# LINE 1109 "Order.hs" #-})- -- "Order.ag"(line 544, column 13)- _tdpToTds =- ({-# LINE 544 "Order.ag" #-}- [ (s, maybe (-1) (\v -> findWithErr1 "Grammar.tdpToTds" v _attrVertex) (ntattr cr))- | (s,cr) <- toList _nontsIrules]- {-# LINE 1115 "Order.hs" #-})- -- "Order.ag"(line 546, column 13)- _tdsToTdp =- ({-# LINE 546 "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 1123 "Order.hs" #-})- -- "Order.ag"(line 550, column 13)- _directDep =- ({-# LINE 550 "Order.ag" #-}- toList (_nontsIdirectDep Seq.>< _nontsIadditionalDep)- {-# LINE 1128 "Order.hs" #-})- -- "Order.ag"(line 551, column 13)- _instDep =- ({-# LINE 551 "Order.ag" #-}- toList _nontsIinstDep- {-# LINE 1133 "Order.hs" #-})- -- "Order.ag"(line 552, column 13)- _aroundDep =- ({-# LINE 552 "Order.ag" #-}- toList _nontsIaroundDep- {-# LINE 1138 "Order.hs" #-})- -- "Order.ag"(line 553, column 13)- _mergeDep =- ({-# LINE 553 "Order.ag" #-}- toList _nontsImergeDep- {-# LINE 1143 "Order.hs" #-})- -- "Order.ag"(line 554, column 13)- _info =- ({-# LINE 554 "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 1157 "Order.hs" #-})- -- "Order.ag"(line 565, column 17)- __tup2 =- ({-# LINE 565 "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 1182 "Order.hs" #-})- -- "Order.ag"(line 565, column 17)- (_cInterfaceMap,_,_) =- ({-# LINE 565 "Order.ag" #-}- __tup2- {-# LINE 1187 "Order.hs" #-})- -- "Order.ag"(line 565, column 17)- (_,_cVisitsMap,_) =- ({-# LINE 565 "Order.ag" #-}- __tup2- {-# LINE 1192 "Order.hs" #-})- -- "Order.ag"(line 565, column 17)- (_,_,_cyclesErrors) =- ({-# LINE 565 "Order.ag" #-}- __tup2- {-# LINE 1197 "Order.hs" #-})- -- "Order.ag"(line 587, column 13)- _lhsOerrors =- ({-# LINE 587 "Order.ag" #-}- (if withCycle _lhsIoptions then Seq.fromList _cyclesErrors else Seq.empty)- Seq.>< _nontsIerrors- {-# LINE 1203 "Order.hs" #-})- -- "Order.ag"(line 619, column 15)- _lhsOoutput =- ({-# LINE 619 "Order.ag" #-}- CGrammar typeSyns_ derivings_ wrappers_ _nontsIcNonterminals pragmas_ paramMap_ contextMap_ _aroundMap _mergeMap _o_dovisit- {-# LINE 1208 "Order.hs" #-})- -- "Order.ag"(line 632, column 14)- _aroundMap =- ({-# LINE 632 "Order.ag" #-}- Map.map (Map.map Map.keysSet) aroundsMap_- {-# LINE 1213 "Order.hs" #-})- -- "Order.ag"(line 633, column 14)- _mergeMap =- ({-# LINE 633 "Order.ag" #-}- Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_- {-# LINE 1218 "Order.hs" #-})- -- "Order.ag"(line 650, column 13)- _nontsOallnts =- ({-# LINE 650 "Order.ag" #-}- map fst (_nontsInonts)- {-# LINE 1223 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "Order.ag" #-}- _nontsInAutoRules- {-# LINE 1228 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "Order.ag" #-}- _nontsInExplicitRules- {-# LINE 1233 "Order.hs" #-})- -- copy rule (from local)- _nontsOcInterfaceMap =- ({-# LINE 594 "Order.ag" #-}- _cInterfaceMap- {-# LINE 1238 "Order.hs" #-})- -- copy rule (from local)- _nontsOcVisitsMap =- ({-# LINE 601 "Order.ag" #-}- _cVisitsMap- {-# LINE 1243 "Order.hs" #-})- -- copy rule (from local)- _nontsOmergeMap =- ({-# LINE 354 "Order.ag" #-}- _mergeMap- {-# LINE 1248 "Order.hs" #-})- -- copy rule (from local)- _nontsOo_dovisit =- ({-# LINE 116 "Order.ag" #-}- _o_dovisit- {-# LINE 1253 "Order.hs" #-})- ( _nontsIacount,_nontsIadditionalDep,_nontsIaranges,_nontsIaroundDep,_nontsIcNonterminals,_nontsIdirectDep,_nontsIerrors,_nontsIinstDep,_nontsImergeDep,_nontsInAutoRules,_nontsInExplicitRules,_nontsInonts,_nontsIntattrs,_nontsIrules,_nontsIvcount) =- (nonts_ _nontsOacount _nontsOallnts _nontsOaroundMap _nontsOcInterfaceMap _nontsOcVisitsMap _nontsOmanualAttrDepMap _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_data _nontsOo_dovisit _nontsOo_newtypes _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_unbox _nontsOo_wantvisit _nontsOprefix _nontsOvcount )- in ( _lhsOerrors,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOoutput))) )--- Nonterminal --------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- cInterfaceMap : CInterfaceMap- cVisitsMap : CVisitsMap- manualAttrDepMap : AttrOrderMap- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- o_case : Bool- o_cata : Bool- o_data : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_unbox : Bool- o_wantvisit : Bool- prefix : String- chained attributes:- acount : Int- vcount : Int- synthesized attributes:- additionalDep : Seq Edge- aranges : Seq (Int,Int,Int)- aroundDep : Seq Edge- cNonterminal : CNonterminal- directDep : Seq Edge- errors : Seq Error- instDep : Seq Edge- mergeDep : Seq Edge- nAutoRules : Int- nExplicitRules : Int- nonts : [(NontermIdent,[ConstructorIdent])]- ntattrs : Seq (Vertex,NTAttr)- rules : Seq (Vertex,CRule)- alternatives:- alternative Nonterminal:- child nt : {NontermIdent}- child params : {[Identifier]}- child inh : {Attributes}- child syn : {Attributes}- child prods : Productions - visit 0:- local mergeMap : _- local aroundMap : _- local ntattrs : _- local cInter : _--}--- cata-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 (Int ->- ([Identifier]) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- CInterfaceMap ->- CVisitsMap ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- Int ->- ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminal,(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),Int))-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),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),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)),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))),vcount_Syn_Nonterminal :: !(Int)}-wrap_Nonterminal :: T_Nonterminal ->- Inh_Nonterminal ->- Syn_Nonterminal -wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIvcount ) =- (let ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount) =- (sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIvcount )- in (Syn_Nonterminal _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOvcount ))-sem_Nonterminal_Nonterminal :: NontermIdent ->- ([Identifier]) ->- Attributes ->- Attributes ->- T_Productions ->- T_Nonterminal -sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_ ) =- (T_Nonterminal (\ _lhsIacount- _lhsIallnts- _lhsIaroundMap- _lhsIcInterfaceMap- _lhsIcVisitsMap- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsIo_case- _lhsIo_cata- _lhsIo_data- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIvcount ->- (let _prodsOnt :: Identifier- _prodsOinh :: Attributes- _prodsOsyn :: Attributes- _lhsOntattrs :: (Seq (Vertex,NTAttr))- _lhsOacount :: Int- _lhsOaranges :: (Seq (Int,Int,Int))- _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])- _lhsOcNonterminal :: CNonterminal- _lhsOadditionalDep :: (Seq Edge)- _lhsOaroundDep :: (Seq Edge)- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOvcount :: Int- _prodsOallnts :: ([Identifier])- _prodsOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))- _prodsOcVisitsMap :: CVisitsMap- _prodsOmanualAttrDepMap :: AttrOrderMap- _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- _prodsOo_case :: Bool- _prodsOo_cata :: Bool- _prodsOo_dovisit :: Bool- _prodsOo_newtypes :: Bool- _prodsOo_rename :: Bool- _prodsOo_sem :: Bool- _prodsOo_sig :: Bool- _prodsOo_unbox :: Bool- _prodsOo_wantvisit :: Bool- _prodsOprefix :: String- _prodsOvcount :: Int- _prodsIadditionalDep :: (Seq Edge)- _prodsIaroundDep :: (Seq Edge)- _prodsIcProductions :: CProductions- _prodsIcons :: ([ConstructorIdent])- _prodsIdirectDep :: (Seq Edge)- _prodsIerrors :: (Seq Error)- _prodsIinstDep :: (Seq Edge)- _prodsImergeDep :: (Seq Edge)- _prodsInAutoRules :: Int- _prodsInExplicitRules :: Int- _prodsIrules :: (Seq (Vertex,CRule))- _prodsIvcount :: Int- -- "Order.ag"(line 97, column 17)- _prodsOnt =- ({-# LINE 97 "Order.ag" #-}- nt_- {-# LINE 1419 "Order.hs" #-})- -- "Order.ag"(line 100, column 17)- _prodsOinh =- ({-# LINE 100 "Order.ag" #-}- inh_- {-# LINE 1424 "Order.hs" #-})- -- "Order.ag"(line 101, column 17)- _prodsOsyn =- ({-# LINE 101 "Order.ag" #-}- syn_- {-# LINE 1429 "Order.hs" #-})- -- "Order.ag"(line 359, column 32)- _mergeMap =- ({-# LINE 359 "Order.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergeMap- {-# LINE 1434 "Order.hs" #-})- -- "Order.ag"(line 412, column 32)- _aroundMap =- ({-# LINE 412 "Order.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundMap- {-# LINE 1439 "Order.hs" #-})- -- "Order.ag"(line 506, column 17)- _ntattrs =- ({-# LINE 506 "Order.ag" #-}- [ NTAInh nt_ inh tp | (inh,tp) <- Map.assocs inh_ ]- ++ [NTASyn nt_ syn tp | (syn,tp) <- Map.assocs syn_ ]- {-# LINE 1445 "Order.hs" #-})- -- "Order.ag"(line 508, column 17)- _lhsOntattrs =- ({-# LINE 508 "Order.ag" #-}- Seq.fromList (zip [_lhsIacount ..] _ntattrs)- {-# LINE 1450 "Order.hs" #-})- -- "Order.ag"(line 509, column 17)- _lhsOacount =- ({-# LINE 509 "Order.ag" #-}- _lhsIacount + Map.size inh_ + Map.size syn_- {-# LINE 1455 "Order.hs" #-})- -- "Order.ag"(line 510, column 17)- _lhsOaranges =- ({-# LINE 510 "Order.ag" #-}- Seq.singleton- (_lhsIacount- ,_lhsIacount + Map.size inh_- ,_lhsIacount + Map.size syn_ + Map.size inh_ - 1)- {-# LINE 1463 "Order.hs" #-})- -- "Order.ag"(line 519, column 19)- _lhsOnonts =- ({-# LINE 519 "Order.ag" #-}- [(nt_,_prodsIcons)]- {-# LINE 1468 "Order.hs" #-})- -- "Order.ag"(line 596, column 19)- _cInter =- ({-# LINE 596 "Order.ag" #-}- if _lhsIo_dovisit- then findWithErr1 "Nonterminal.cInter" nt_ _lhsIcInterfaceMap- else CInterface [CSegment inh_ syn_]- {-# LINE 1475 "Order.hs" #-})- -- "Order.ag"(line 624, column 19)- _lhsOcNonterminal =- ({-# LINE 624 "Order.ag" #-}- CNonterminal nt_ params_ inh_ syn_ _prodsIcProductions _cInter- {-# LINE 1480 "Order.hs" #-})- -- use rule "Order.ag"(line 283, column 60)- _lhsOadditionalDep =- ({-# LINE 283 "Order.ag" #-}- _prodsIadditionalDep- {-# LINE 1485 "Order.hs" #-})- -- use rule "Order.ag"(line 404, column 24)- _lhsOaroundDep =- ({-# LINE 404 "Order.ag" #-}- _prodsIaroundDep- {-# LINE 1490 "Order.hs" #-})- -- use rule "Order.ag"(line 269, column 33)- _lhsOdirectDep =- ({-# LINE 269 "Order.ag" #-}- _prodsIdirectDep- {-# LINE 1495 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _prodsIerrors- {-# LINE 1500 "Order.hs" #-})- -- use rule "Order.ag"(line 312, column 31)- _lhsOinstDep =- ({-# LINE 312 "Order.ag" #-}- _prodsIinstDep- {-# LINE 1505 "Order.hs" #-})- -- use rule "Order.ag"(line 367, column 18)- _lhsOmergeDep =- ({-# LINE 367 "Order.ag" #-}- _prodsImergeDep- {-# LINE 1510 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "Order.ag" #-}- _prodsInAutoRules- {-# LINE 1515 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "Order.ag" #-}- _prodsInExplicitRules- {-# LINE 1520 "Order.hs" #-})- -- use rule "Order.ag"(line 259, column 18)- _lhsOrules =- ({-# LINE 259 "Order.ag" #-}- _prodsIrules- {-# LINE 1525 "Order.hs" #-})- -- copy rule (up)- _lhsOvcount =- ({-# LINE 258 "Order.ag" #-}- _prodsIvcount- {-# LINE 1530 "Order.hs" #-})- -- copy rule (down)- _prodsOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 1535 "Order.hs" #-})- -- copy rule (from local)- _prodsOaroundMap =- ({-# LINE 410 "Order.ag" #-}- _aroundMap- {-# LINE 1540 "Order.hs" #-})- -- copy rule (down)- _prodsOcVisitsMap =- ({-# LINE 601 "Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 1545 "Order.hs" #-})- -- copy rule (down)- _prodsOmanualAttrDepMap =- ({-# LINE 283 "Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 1550 "Order.hs" #-})- -- copy rule (from local)- _prodsOmergeMap =- ({-# LINE 357 "Order.ag" #-}- _mergeMap- {-# LINE 1555 "Order.hs" #-})- -- copy rule (down)- _prodsOo_case =- ({-# LINE 117 "Order.ag" #-}- _lhsIo_case- {-# LINE 1560 "Order.hs" #-})- -- copy rule (down)- _prodsOo_cata =- ({-# LINE 111 "Order.ag" #-}- _lhsIo_cata- {-# LINE 1565 "Order.hs" #-})- -- copy rule (down)- _prodsOo_dovisit =- ({-# LINE 116 "Order.ag" #-}- _lhsIo_dovisit- {-# LINE 1570 "Order.hs" #-})- -- copy rule (down)- _prodsOo_newtypes =- ({-# LINE 110 "Order.ag" #-}- _lhsIo_newtypes- {-# LINE 1575 "Order.hs" #-})- -- copy rule (down)- _prodsOo_rename =- ({-# LINE 114 "Order.ag" #-}- _lhsIo_rename- {-# LINE 1580 "Order.hs" #-})- -- copy rule (down)- _prodsOo_sem =- ({-# LINE 113 "Order.ag" #-}- _lhsIo_sem- {-# LINE 1585 "Order.hs" #-})- -- copy rule (down)- _prodsOo_sig =- ({-# LINE 112 "Order.ag" #-}- _lhsIo_sig- {-# LINE 1590 "Order.hs" #-})- -- copy rule (down)- _prodsOo_unbox =- ({-# LINE 119 "Order.ag" #-}- _lhsIo_unbox- {-# LINE 1595 "Order.hs" #-})- -- copy rule (down)- _prodsOo_wantvisit =- ({-# LINE 115 "Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 1600 "Order.hs" #-})- -- copy rule (down)- _prodsOprefix =- ({-# LINE 118 "Order.ag" #-}- _lhsIprefix- {-# LINE 1605 "Order.hs" #-})- -- copy rule (down)- _prodsOvcount =- ({-# LINE 258 "Order.ag" #-}- _lhsIvcount- {-# LINE 1610 "Order.hs" #-})- ( _prodsIadditionalDep,_prodsIaroundDep,_prodsIcProductions,_prodsIcons,_prodsIdirectDep,_prodsIerrors,_prodsIinstDep,_prodsImergeDep,_prodsInAutoRules,_prodsInExplicitRules,_prodsIrules,_prodsIvcount) =- (prods_ _prodsOallnts _prodsOaroundMap _prodsOcVisitsMap _prodsOinh _prodsOmanualAttrDepMap _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_dovisit _prodsOo_newtypes _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_unbox _prodsOo_wantvisit _prodsOprefix _prodsOsyn _prodsOvcount )- in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount))) )--- Nonterminals -------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- cInterfaceMap : CInterfaceMap- cVisitsMap : CVisitsMap- manualAttrDepMap : AttrOrderMap- mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- o_case : Bool- o_cata : Bool- o_data : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_unbox : Bool- o_wantvisit : Bool- prefix : String- chained attributes:- acount : Int- vcount : Int- synthesized attributes:- additionalDep : Seq Edge- aranges : Seq (Int,Int,Int)- aroundDep : Seq Edge- cNonterminals : CNonterminals- directDep : Seq Edge- errors : Seq Error- instDep : Seq Edge- mergeDep : Seq Edge- nAutoRules : Int- nExplicitRules : Int- nonts : [(NontermIdent,[ConstructorIdent])]- ntattrs : Seq (Vertex,NTAttr)- rules : Seq (Vertex,CRule)- alternatives:- alternative Cons:- child hd : Nonterminal - child tl : Nonterminals - alternative Nil:--}--- cata-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 (Int ->- ([Identifier]) ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- CInterfaceMap ->- CVisitsMap ->- AttrOrderMap ->- (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- Int ->- ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminals,(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),Int))-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),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),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)),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))),vcount_Syn_Nonterminals :: !(Int)}-wrap_Nonterminals :: T_Nonterminals ->- Inh_Nonterminals ->- Syn_Nonterminals -wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIvcount ) =- (let ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount) =- (sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIvcount )- in (Syn_Nonterminals _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOvcount ))-sem_Nonterminals_Cons :: T_Nonterminal ->- T_Nonterminals ->- T_Nonterminals -sem_Nonterminals_Cons (T_Nonterminal hd_ ) (T_Nonterminals tl_ ) =- (T_Nonterminals (\ _lhsIacount- _lhsIallnts- _lhsIaroundMap- _lhsIcInterfaceMap- _lhsIcVisitsMap- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsIo_case- _lhsIo_cata- _lhsIo_data- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIvcount ->- (let _lhsOcNonterminals :: CNonterminals- _lhsOadditionalDep :: (Seq Edge)- _lhsOaranges :: (Seq (Int,Int,Int))- _lhsOaroundDep :: (Seq Edge)- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])- _lhsOntattrs :: (Seq (Vertex,NTAttr))- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOacount :: Int- _lhsOvcount :: Int- _hdOacount :: Int- _hdOallnts :: ([Identifier])- _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))- _hdOcInterfaceMap :: CInterfaceMap- _hdOcVisitsMap :: CVisitsMap- _hdOmanualAttrDepMap :: AttrOrderMap- _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_data :: Bool- _hdOo_dovisit :: Bool- _hdOo_newtypes :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_unbox :: Bool- _hdOo_wantvisit :: Bool- _hdOprefix :: String- _hdOvcount :: Int- _tlOacount :: Int- _tlOallnts :: ([Identifier])- _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))- _tlOcInterfaceMap :: CInterfaceMap- _tlOcVisitsMap :: CVisitsMap- _tlOmanualAttrDepMap :: AttrOrderMap- _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_data :: Bool- _tlOo_dovisit :: Bool- _tlOo_newtypes :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_unbox :: Bool- _tlOo_wantvisit :: Bool- _tlOprefix :: String- _tlOvcount :: Int- _hdIacount :: Int- _hdIadditionalDep :: (Seq Edge)- _hdIaranges :: (Seq (Int,Int,Int))- _hdIaroundDep :: (Seq Edge)- _hdIcNonterminal :: CNonterminal- _hdIdirectDep :: (Seq Edge)- _hdIerrors :: (Seq Error)- _hdIinstDep :: (Seq Edge)- _hdImergeDep :: (Seq Edge)- _hdInAutoRules :: Int- _hdInExplicitRules :: Int- _hdInonts :: ([(NontermIdent,[ConstructorIdent])])- _hdIntattrs :: (Seq (Vertex,NTAttr))- _hdIrules :: (Seq (Vertex,CRule))- _hdIvcount :: Int- _tlIacount :: Int- _tlIadditionalDep :: (Seq Edge)- _tlIaranges :: (Seq (Int,Int,Int))- _tlIaroundDep :: (Seq Edge)- _tlIcNonterminals :: CNonterminals- _tlIdirectDep :: (Seq Edge)- _tlIerrors :: (Seq Error)- _tlIinstDep :: (Seq Edge)- _tlImergeDep :: (Seq Edge)- _tlInAutoRules :: Int- _tlInExplicitRules :: Int- _tlInonts :: ([(NontermIdent,[ConstructorIdent])])- _tlIntattrs :: (Seq (Vertex,NTAttr))- _tlIrules :: (Seq (Vertex,CRule))- _tlIvcount :: Int- -- "Order.ag"(line 621, column 12)- _lhsOcNonterminals =- ({-# LINE 621 "Order.ag" #-}- _hdIcNonterminal : _tlIcNonterminals- {-# LINE 1803 "Order.hs" #-})- -- use rule "Order.ag"(line 283, column 60)- _lhsOadditionalDep =- ({-# LINE 283 "Order.ag" #-}- _hdIadditionalDep Seq.>< _tlIadditionalDep- {-# LINE 1808 "Order.hs" #-})- -- use rule "Order.ag"(line 500, column 36)- _lhsOaranges =- ({-# LINE 500 "Order.ag" #-}- _hdIaranges Seq.>< _tlIaranges- {-# LINE 1813 "Order.hs" #-})- -- use rule "Order.ag"(line 404, column 24)- _lhsOaroundDep =- ({-# LINE 404 "Order.ag" #-}- _hdIaroundDep Seq.>< _tlIaroundDep- {-# LINE 1818 "Order.hs" #-})- -- use rule "Order.ag"(line 269, column 33)- _lhsOdirectDep =- ({-# LINE 269 "Order.ag" #-}- _hdIdirectDep Seq.>< _tlIdirectDep- {-# LINE 1823 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 1828 "Order.hs" #-})- -- use rule "Order.ag"(line 312, column 31)- _lhsOinstDep =- ({-# LINE 312 "Order.ag" #-}- _hdIinstDep Seq.>< _tlIinstDep- {-# LINE 1833 "Order.hs" #-})- -- use rule "Order.ag"(line 367, column 18)- _lhsOmergeDep =- ({-# LINE 367 "Order.ag" #-}- _hdImergeDep Seq.>< _tlImergeDep- {-# LINE 1838 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "Order.ag" #-}- _hdInAutoRules + _tlInAutoRules- {-# LINE 1843 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "Order.ag" #-}- _hdInExplicitRules + _tlInExplicitRules- {-# LINE 1848 "Order.hs" #-})- -- use rule "Order.ag"(line 517, column 43)- _lhsOnonts =- ({-# LINE 517 "Order.ag" #-}- _hdInonts ++ _tlInonts- {-# LINE 1853 "Order.hs" #-})- -- use rule "Order.ag"(line 499, column 35)- _lhsOntattrs =- ({-# LINE 499 "Order.ag" #-}- _hdIntattrs Seq.>< _tlIntattrs- {-# LINE 1858 "Order.hs" #-})- -- use rule "Order.ag"(line 259, column 18)- _lhsOrules =- ({-# LINE 259 "Order.ag" #-}- _hdIrules Seq.>< _tlIrules- {-# LINE 1863 "Order.hs" #-})- -- copy rule (up)- _lhsOacount =- ({-# LINE 499 "Order.ag" #-}- _tlIacount- {-# LINE 1868 "Order.hs" #-})- -- copy rule (up)- _lhsOvcount =- ({-# LINE 258 "Order.ag" #-}- _tlIvcount- {-# LINE 1873 "Order.hs" #-})- -- copy rule (down)- _hdOacount =- ({-# LINE 499 "Order.ag" #-}- _lhsIacount- {-# LINE 1878 "Order.hs" #-})- -- copy rule (down)- _hdOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 1883 "Order.hs" #-})- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 407 "Order.ag" #-}- _lhsIaroundMap- {-# LINE 1888 "Order.hs" #-})- -- copy rule (down)- _hdOcInterfaceMap =- ({-# LINE 594 "Order.ag" #-}- _lhsIcInterfaceMap- {-# LINE 1893 "Order.hs" #-})- -- copy rule (down)- _hdOcVisitsMap =- ({-# LINE 601 "Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 1898 "Order.hs" #-})- -- copy rule (down)- _hdOmanualAttrDepMap =- ({-# LINE 283 "Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 1903 "Order.hs" #-})- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 354 "Order.ag" #-}- _lhsImergeMap- {-# LINE 1908 "Order.hs" #-})- -- copy rule (down)- _hdOo_case =- ({-# LINE 117 "Order.ag" #-}- _lhsIo_case- {-# LINE 1913 "Order.hs" #-})- -- copy rule (down)- _hdOo_cata =- ({-# LINE 111 "Order.ag" #-}- _lhsIo_cata- {-# LINE 1918 "Order.hs" #-})- -- copy rule (down)- _hdOo_data =- ({-# LINE 120 "Order.ag" #-}- _lhsIo_data- {-# LINE 1923 "Order.hs" #-})- -- copy rule (down)- _hdOo_dovisit =- ({-# LINE 116 "Order.ag" #-}- _lhsIo_dovisit- {-# LINE 1928 "Order.hs" #-})- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 110 "Order.ag" #-}- _lhsIo_newtypes- {-# LINE 1933 "Order.hs" #-})- -- copy rule (down)- _hdOo_rename =- ({-# LINE 114 "Order.ag" #-}- _lhsIo_rename- {-# LINE 1938 "Order.hs" #-})- -- copy rule (down)- _hdOo_sem =- ({-# LINE 113 "Order.ag" #-}- _lhsIo_sem- {-# LINE 1943 "Order.hs" #-})- -- copy rule (down)- _hdOo_sig =- ({-# LINE 112 "Order.ag" #-}- _lhsIo_sig- {-# LINE 1948 "Order.hs" #-})- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 119 "Order.ag" #-}- _lhsIo_unbox- {-# LINE 1953 "Order.hs" #-})- -- copy rule (down)- _hdOo_wantvisit =- ({-# LINE 115 "Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 1958 "Order.hs" #-})- -- copy rule (down)- _hdOprefix =- ({-# LINE 118 "Order.ag" #-}- _lhsIprefix- {-# LINE 1963 "Order.hs" #-})- -- copy rule (down)- _hdOvcount =- ({-# LINE 258 "Order.ag" #-}- _lhsIvcount- {-# LINE 1968 "Order.hs" #-})- -- copy rule (chain)- _tlOacount =- ({-# LINE 499 "Order.ag" #-}- _hdIacount- {-# LINE 1973 "Order.hs" #-})- -- copy rule (down)- _tlOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 1978 "Order.hs" #-})- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 407 "Order.ag" #-}- _lhsIaroundMap- {-# LINE 1983 "Order.hs" #-})- -- copy rule (down)- _tlOcInterfaceMap =- ({-# LINE 594 "Order.ag" #-}- _lhsIcInterfaceMap- {-# LINE 1988 "Order.hs" #-})- -- copy rule (down)- _tlOcVisitsMap =- ({-# LINE 601 "Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 1993 "Order.hs" #-})- -- copy rule (down)- _tlOmanualAttrDepMap =- ({-# LINE 283 "Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 1998 "Order.hs" #-})- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 354 "Order.ag" #-}- _lhsImergeMap- {-# LINE 2003 "Order.hs" #-})- -- copy rule (down)- _tlOo_case =- ({-# LINE 117 "Order.ag" #-}- _lhsIo_case- {-# LINE 2008 "Order.hs" #-})- -- copy rule (down)- _tlOo_cata =- ({-# LINE 111 "Order.ag" #-}- _lhsIo_cata- {-# LINE 2013 "Order.hs" #-})- -- copy rule (down)- _tlOo_data =- ({-# LINE 120 "Order.ag" #-}- _lhsIo_data- {-# LINE 2018 "Order.hs" #-})- -- copy rule (down)- _tlOo_dovisit =- ({-# LINE 116 "Order.ag" #-}- _lhsIo_dovisit- {-# LINE 2023 "Order.hs" #-})- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 110 "Order.ag" #-}- _lhsIo_newtypes- {-# LINE 2028 "Order.hs" #-})- -- copy rule (down)- _tlOo_rename =- ({-# LINE 114 "Order.ag" #-}- _lhsIo_rename- {-# LINE 2033 "Order.hs" #-})- -- copy rule (down)- _tlOo_sem =- ({-# LINE 113 "Order.ag" #-}- _lhsIo_sem- {-# LINE 2038 "Order.hs" #-})- -- copy rule (down)- _tlOo_sig =- ({-# LINE 112 "Order.ag" #-}- _lhsIo_sig- {-# LINE 2043 "Order.hs" #-})- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 119 "Order.ag" #-}- _lhsIo_unbox- {-# LINE 2048 "Order.hs" #-})- -- copy rule (down)- _tlOo_wantvisit =- ({-# LINE 115 "Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 2053 "Order.hs" #-})- -- copy rule (down)- _tlOprefix =- ({-# LINE 118 "Order.ag" #-}- _lhsIprefix- {-# LINE 2058 "Order.hs" #-})- -- copy rule (chain)- _tlOvcount =- ({-# LINE 258 "Order.ag" #-}- _hdIvcount- {-# LINE 2063 "Order.hs" #-})- ( _hdIacount,_hdIadditionalDep,_hdIaranges,_hdIaroundDep,_hdIcNonterminal,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdImergeDep,_hdInAutoRules,_hdInExplicitRules,_hdInonts,_hdIntattrs,_hdIrules,_hdIvcount) =- (hd_ _hdOacount _hdOallnts _hdOaroundMap _hdOcInterfaceMap _hdOcVisitsMap _hdOmanualAttrDepMap _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_data _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOvcount )- ( _tlIacount,_tlIadditionalDep,_tlIaranges,_tlIaroundDep,_tlIcNonterminals,_tlIdirectDep,_tlIerrors,_tlIinstDep,_tlImergeDep,_tlInAutoRules,_tlInExplicitRules,_tlInonts,_tlIntattrs,_tlIrules,_tlIvcount) =- (tl_ _tlOacount _tlOallnts _tlOaroundMap _tlOcInterfaceMap _tlOcVisitsMap _tlOmanualAttrDepMap _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_data _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOvcount )- in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount))) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil =- (T_Nonterminals (\ _lhsIacount- _lhsIallnts- _lhsIaroundMap- _lhsIcInterfaceMap- _lhsIcVisitsMap- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsIo_case- _lhsIo_cata- _lhsIo_data- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIvcount ->- (let _lhsOcNonterminals :: CNonterminals- _lhsOadditionalDep :: (Seq Edge)- _lhsOaranges :: (Seq (Int,Int,Int))- _lhsOaroundDep :: (Seq Edge)- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])- _lhsOntattrs :: (Seq (Vertex,NTAttr))- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOacount :: Int- _lhsOvcount :: Int- -- "Order.ag"(line 622, column 12)- _lhsOcNonterminals =- ({-# LINE 622 "Order.ag" #-}- []- {-# LINE 2109 "Order.hs" #-})- -- use rule "Order.ag"(line 283, column 60)- _lhsOadditionalDep =- ({-# LINE 283 "Order.ag" #-}- Seq.empty- {-# LINE 2114 "Order.hs" #-})- -- use rule "Order.ag"(line 500, column 36)- _lhsOaranges =- ({-# LINE 500 "Order.ag" #-}- Seq.empty- {-# LINE 2119 "Order.hs" #-})- -- use rule "Order.ag"(line 404, column 24)- _lhsOaroundDep =- ({-# LINE 404 "Order.ag" #-}- Seq.empty- {-# LINE 2124 "Order.hs" #-})- -- use rule "Order.ag"(line 269, column 33)- _lhsOdirectDep =- ({-# LINE 269 "Order.ag" #-}- Seq.empty- {-# LINE 2129 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- Seq.empty- {-# LINE 2134 "Order.hs" #-})- -- use rule "Order.ag"(line 312, column 31)- _lhsOinstDep =- ({-# LINE 312 "Order.ag" #-}- Seq.empty- {-# LINE 2139 "Order.hs" #-})- -- use rule "Order.ag"(line 367, column 18)- _lhsOmergeDep =- ({-# LINE 367 "Order.ag" #-}- Seq.empty- {-# LINE 2144 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "Order.ag" #-}- 0- {-# LINE 2149 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "Order.ag" #-}- 0- {-# LINE 2154 "Order.hs" #-})- -- use rule "Order.ag"(line 517, column 43)- _lhsOnonts =- ({-# LINE 517 "Order.ag" #-}- []- {-# LINE 2159 "Order.hs" #-})- -- use rule "Order.ag"(line 499, column 35)- _lhsOntattrs =- ({-# LINE 499 "Order.ag" #-}- Seq.empty- {-# LINE 2164 "Order.hs" #-})- -- use rule "Order.ag"(line 259, column 18)- _lhsOrules =- ({-# LINE 259 "Order.ag" #-}- Seq.empty- {-# LINE 2169 "Order.hs" #-})- -- copy rule (chain)- _lhsOacount =- ({-# LINE 499 "Order.ag" #-}- _lhsIacount- {-# LINE 2174 "Order.hs" #-})- -- copy rule (chain)- _lhsOvcount =- ({-# LINE 258 "Order.ag" #-}- _lhsIvcount- {-# LINE 2179 "Order.hs" #-})- in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount))) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attributes:- allTypeSigs : Map Identifier Type- altAttrs : Map AltAttr Vertex- con : Identifier- inh : Attributes- nt : Identifier- syn : Attributes- synthesized attributes:- copy : SELF - errors : Seq Error- gathAltAttrs : [AltAttr]- instVars : [Identifier]- locVars : [Identifier]- patternAttrs : [(Identifier,Identifier,Bool,Patterns)]- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - child parts : Patterns - visit 0:- local copy : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local copy : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local copy : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern (Alias _field _attr _pat _parts ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )-sem_Pattern (Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern (Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern (Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern (Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern ((Map Identifier Type) ->- (Map AltAttr Vertex) ->- Identifier ->- Attributes ->- Identifier ->- Attributes ->- ( Pattern ,(Seq Error),([AltAttr]),([Identifier]),([Identifier]),([(Identifier,Identifier,Bool,Patterns)])))-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,Patterns)]))}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn ) =- (let ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs) =- (sem _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn )- in (Syn_Pattern _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Patterns ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOgathAltAttrs :: ([AltAttr])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOlocVars :: ([Identifier])- _lhsOinstVars :: ([Identifier])- _lhsOerrors :: (Seq Error)- _lhsOcopy :: Pattern - _patOallTypeSigs :: (Map Identifier Type)- _patOaltAttrs :: (Map AltAttr Vertex)- _patOcon :: Identifier- _patOinh :: Attributes- _patOnt :: Identifier- _patOsyn :: Attributes- _partsOallTypeSigs :: (Map Identifier Type)- _partsOaltAttrs :: (Map AltAttr Vertex)- _partsOcon :: Identifier- _partsOinh :: Attributes- _partsOnt :: Identifier- _partsOsyn :: Attributes- _patIcopy :: Pattern - _patIerrors :: (Seq Error)- _patIgathAltAttrs :: ([AltAttr])- _patIinstVars :: ([Identifier])- _patIlocVars :: ([Identifier])- _patIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _partsIcopy :: Patterns - _partsIerrors :: (Seq Error)- _partsIgathAltAttrs :: ([AltAttr])- _partsIinstVars :: ([Identifier])- _partsIlocVars :: ([Identifier])- _partsIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- -- "Order.ag"(line 184, column 12)- _lhsOgathAltAttrs =- ({-# LINE 184 "Order.ag" #-}- [AltAttr field_ attr_ (field_ == _LOC || field_ == _INST)]- {-# LINE 2301 "Order.hs" #-})- -- "Order.ag"(line 252, column 12)- _lhsOpatternAttrs =- ({-# LINE 252 "Order.ag" #-}- [(field_,attr_,(field_ == _LOC || field_ == _INST),_partsIcopy)]- {-# LINE 2306 "Order.hs" #-})- -- "Order.ag"(line 680, column 14)- _lhsOlocVars =- ({-# LINE 680 "Order.ag" #-}- if field_ == _LOC- then [attr_]- else []- {-# LINE 2313 "Order.hs" #-})- -- "Order.ag"(line 683, column 14)- _lhsOinstVars =- ({-# LINE 683 "Order.ag" #-}- if field_ == _INST- then [attr_]- else []- {-# LINE 2320 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _patIerrors Seq.>< _partsIerrors- {-# LINE 2325 "Order.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 2330 "Order.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2335 "Order.hs" #-})- -- copy rule (down)- _patOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2340 "Order.hs" #-})- -- copy rule (down)- _patOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2345 "Order.hs" #-})- -- copy rule (down)- _patOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 2350 "Order.hs" #-})- -- copy rule (down)- _patOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 2355 "Order.hs" #-})- -- copy rule (down)- _patOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 2360 "Order.hs" #-})- -- copy rule (down)- _patOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 2365 "Order.hs" #-})- -- copy rule (down)- _partsOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2370 "Order.hs" #-})- -- copy rule (down)- _partsOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2375 "Order.hs" #-})- -- copy rule (down)- _partsOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 2380 "Order.hs" #-})- -- copy rule (down)- _partsOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 2385 "Order.hs" #-})- -- copy rule (down)- _partsOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 2390 "Order.hs" #-})- -- copy rule (down)- _partsOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 2395 "Order.hs" #-})- ( _patIcopy,_patIerrors,_patIgathAltAttrs,_patIinstVars,_patIlocVars,_patIpatternAttrs) =- (pat_ _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn )- ( _partsIcopy,_partsIerrors,_partsIgathAltAttrs,_partsIinstVars,_partsIlocVars,_partsIpatternAttrs) =- (parts_ _partsOallTypeSigs _partsOaltAttrs _partsOcon _partsOinh _partsOnt _partsOsyn )- in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Pattern - _patsOallTypeSigs :: (Map Identifier Type)- _patsOaltAttrs :: (Map AltAttr Vertex)- _patsOcon :: Identifier- _patsOinh :: Attributes- _patsOnt :: Identifier- _patsOsyn :: Attributes- _patsIcopy :: Patterns - _patsIerrors :: (Seq Error)- _patsIgathAltAttrs :: ([AltAttr])- _patsIinstVars :: ([Identifier])- _patsIlocVars :: ([Identifier])- _patsIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _patsIerrors- {-# LINE 2433 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- _patsIgathAltAttrs- {-# LINE 2438 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "Order.ag" #-}- _patsIinstVars- {-# LINE 2443 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "Order.ag" #-}- _patsIlocVars- {-# LINE 2448 "Order.hs" #-})- -- use rule "Order.ag"(line 249, column 42)- _lhsOpatternAttrs =- ({-# LINE 249 "Order.ag" #-}- _patsIpatternAttrs- {-# LINE 2453 "Order.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 2458 "Order.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2463 "Order.hs" #-})- -- copy rule (down)- _patsOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2468 "Order.hs" #-})- -- copy rule (down)- _patsOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2473 "Order.hs" #-})- -- copy rule (down)- _patsOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 2478 "Order.hs" #-})- -- copy rule (down)- _patsOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 2483 "Order.hs" #-})- -- copy rule (down)- _patsOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 2488 "Order.hs" #-})- -- copy rule (down)- _patsOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 2493 "Order.hs" #-})- ( _patsIcopy,_patsIerrors,_patsIgathAltAttrs,_patsIinstVars,_patsIlocVars,_patsIpatternAttrs) =- (pats_ _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn )- in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Pattern - _patOallTypeSigs :: (Map Identifier Type)- _patOaltAttrs :: (Map AltAttr Vertex)- _patOcon :: Identifier- _patOinh :: Attributes- _patOnt :: Identifier- _patOsyn :: Attributes- _patIcopy :: Pattern - _patIerrors :: (Seq Error)- _patIgathAltAttrs :: ([AltAttr])- _patIinstVars :: ([Identifier])- _patIlocVars :: ([Identifier])- _patIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _patIerrors- {-# LINE 2528 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- _patIgathAltAttrs- {-# LINE 2533 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "Order.ag" #-}- _patIinstVars- {-# LINE 2538 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "Order.ag" #-}- _patIlocVars- {-# LINE 2543 "Order.hs" #-})- -- use rule "Order.ag"(line 249, column 42)- _lhsOpatternAttrs =- ({-# LINE 249 "Order.ag" #-}- _patIpatternAttrs- {-# LINE 2548 "Order.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 2553 "Order.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2558 "Order.hs" #-})- -- copy rule (down)- _patOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2563 "Order.hs" #-})- -- copy rule (down)- _patOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2568 "Order.hs" #-})- -- copy rule (down)- _patOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 2573 "Order.hs" #-})- -- copy rule (down)- _patOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 2578 "Order.hs" #-})- -- copy rule (down)- _patOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 2583 "Order.hs" #-})- -- copy rule (down)- _patOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 2588 "Order.hs" #-})- ( _patIcopy,_patIerrors,_patIgathAltAttrs,_patIinstVars,_patIlocVars,_patIpatternAttrs) =- (pat_ _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn )- in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Pattern - _patsOallTypeSigs :: (Map Identifier Type)- _patsOaltAttrs :: (Map AltAttr Vertex)- _patsOcon :: Identifier- _patsOinh :: Attributes- _patsOnt :: Identifier- _patsOsyn :: Attributes- _patsIcopy :: Patterns - _patsIerrors :: (Seq Error)- _patsIgathAltAttrs :: ([AltAttr])- _patsIinstVars :: ([Identifier])- _patsIlocVars :: ([Identifier])- _patsIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _patsIerrors- {-# LINE 2624 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- _patsIgathAltAttrs- {-# LINE 2629 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "Order.ag" #-}- _patsIinstVars- {-# LINE 2634 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "Order.ag" #-}- _patsIlocVars- {-# LINE 2639 "Order.hs" #-})- -- use rule "Order.ag"(line 249, column 42)- _lhsOpatternAttrs =- ({-# LINE 249 "Order.ag" #-}- _patsIpatternAttrs- {-# LINE 2644 "Order.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 2649 "Order.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2654 "Order.hs" #-})- -- copy rule (down)- _patsOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2659 "Order.hs" #-})- -- copy rule (down)- _patsOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2664 "Order.hs" #-})- -- copy rule (down)- _patsOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 2669 "Order.hs" #-})- -- copy rule (down)- _patsOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 2674 "Order.hs" #-})- -- copy rule (down)- _patsOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 2679 "Order.hs" #-})- -- copy rule (down)- _patsOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 2684 "Order.hs" #-})- ( _patsIcopy,_patsIerrors,_patsIgathAltAttrs,_patsIinstVars,_patsIlocVars,_patsIpatternAttrs) =- (pats_ _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn )- in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =- (T_Pattern (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Pattern - -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- Seq.empty- {-# LINE 2707 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- []- {-# LINE 2712 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "Order.ag" #-}- []- {-# LINE 2717 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "Order.ag" #-}- []- {-# LINE 2722 "Order.hs" #-})- -- use rule "Order.ag"(line 249, column 42)- _lhsOpatternAttrs =- ({-# LINE 249 "Order.ag" #-}- []- {-# LINE 2727 "Order.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Underscore pos_- {-# LINE 2732 "Order.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2737 "Order.hs" #-})- in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attributes:- allTypeSigs : Map Identifier Type- altAttrs : Map AltAttr Vertex- con : Identifier- inh : Attributes- nt : Identifier- syn : Attributes- synthesized attributes:- copy : SELF - errors : Seq Error- gathAltAttrs : [AltAttr]- instVars : [Identifier]- locVars : [Identifier]- patternAttrs : [(Identifier,Identifier,Bool,Patterns)]- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-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 ((Map Identifier Type) ->- (Map AltAttr Vertex) ->- Identifier ->- Attributes ->- Identifier ->- Attributes ->- ( Patterns ,(Seq Error),([AltAttr]),([Identifier]),([Identifier]),([(Identifier,Identifier,Bool,Patterns)])))-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,Patterns)]))}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn ) =- (let ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs) =- (sem _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn )- in (Syn_Patterns _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Patterns - _hdOallTypeSigs :: (Map Identifier Type)- _hdOaltAttrs :: (Map AltAttr Vertex)- _hdOcon :: Identifier- _hdOinh :: Attributes- _hdOnt :: Identifier- _hdOsyn :: Attributes- _tlOallTypeSigs :: (Map Identifier Type)- _tlOaltAttrs :: (Map AltAttr Vertex)- _tlOcon :: Identifier- _tlOinh :: Attributes- _tlOnt :: Identifier- _tlOsyn :: Attributes- _hdIcopy :: Pattern - _hdIerrors :: (Seq Error)- _hdIgathAltAttrs :: ([AltAttr])- _hdIinstVars :: ([Identifier])- _hdIlocVars :: ([Identifier])- _hdIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _tlIcopy :: Patterns - _tlIerrors :: (Seq Error)- _tlIgathAltAttrs :: ([AltAttr])- _tlIinstVars :: ([Identifier])- _tlIlocVars :: ([Identifier])- _tlIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2832 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- _hdIgathAltAttrs ++ _tlIgathAltAttrs- {-# LINE 2837 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "Order.ag" #-}- _hdIinstVars ++ _tlIinstVars- {-# LINE 2842 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "Order.ag" #-}- _hdIlocVars ++ _tlIlocVars- {-# LINE 2847 "Order.hs" #-})- -- use rule "Order.ag"(line 249, column 42)- _lhsOpatternAttrs =- ({-# LINE 249 "Order.ag" #-}- _hdIpatternAttrs ++ _tlIpatternAttrs- {-# LINE 2852 "Order.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 2857 "Order.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2862 "Order.hs" #-})- -- copy rule (down)- _hdOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2867 "Order.hs" #-})- -- copy rule (down)- _hdOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2872 "Order.hs" #-})- -- copy rule (down)- _hdOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 2877 "Order.hs" #-})- -- copy rule (down)- _hdOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 2882 "Order.hs" #-})- -- copy rule (down)- _hdOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 2887 "Order.hs" #-})- -- copy rule (down)- _hdOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 2892 "Order.hs" #-})- -- copy rule (down)- _tlOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 2897 "Order.hs" #-})- -- copy rule (down)- _tlOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 2902 "Order.hs" #-})- -- copy rule (down)- _tlOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 2907 "Order.hs" #-})- -- copy rule (down)- _tlOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 2912 "Order.hs" #-})- -- copy rule (down)- _tlOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 2917 "Order.hs" #-})- -- copy rule (down)- _tlOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 2922 "Order.hs" #-})- ( _hdIcopy,_hdIerrors,_hdIgathAltAttrs,_hdIinstVars,_hdIlocVars,_hdIpatternAttrs) =- (hd_ _hdOallTypeSigs _hdOaltAttrs _hdOcon _hdOinh _hdOnt _hdOsyn )- ( _tlIcopy,_tlIerrors,_tlIgathAltAttrs,_tlIinstVars,_tlIlocVars,_tlIpatternAttrs) =- (tl_ _tlOallTypeSigs _tlOaltAttrs _tlOcon _tlOinh _tlOnt _tlOsyn )- in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ _lhsIallTypeSigs- _lhsIaltAttrs- _lhsIcon- _lhsIinh- _lhsInt- _lhsIsyn ->- (let _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Patterns - -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- Seq.empty- {-# LINE 2946 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- []- {-# LINE 2951 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "Order.ag" #-}- []- {-# LINE 2956 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "Order.ag" #-}- []- {-# LINE 2961 "Order.hs" #-})- -- use rule "Order.ag"(line 249, column 42)- _lhsOpatternAttrs =- ({-# LINE 249 "Order.ag" #-}- []- {-# LINE 2966 "Order.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- []- {-# LINE 2971 "Order.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2976 "Order.hs" #-})- in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )--- Production ---------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- aroundMap : Map ConstructorIdent (Map Identifier [Expression])- cVisitsMap : CVisitsMap- inh : Attributes- manualAttrDepMap : AttrOrderMap- mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))- nt : Identifier- o_case : Bool- o_cata : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_unbox : Bool- o_wantvisit : Bool- prefix : String- syn : Attributes- chained attribute:- vcount : Int- synthesized attributes:- additionalDep : Seq Edge- aroundDep : Seq Edge- cProduction : CProduction- cons : [ConstructorIdent]- directDep : Seq Edge- errors : Seq Error- instDep : Seq Edge- mergeDep : Seq Edge- nAutoRules : Int- nExplicitRules : Int- rules : Seq (Vertex,CRule)- alternatives:- alternative Production:- child con : {ConstructorIdent}- child children : Children - child rules : Rules - child typeSigs : TypeSigs - visit 0:- local gathAltAttrs : _- local altAttrs : _- local inhRules : _- local gathRules : _- local manualDeps : _- local mergeMap : _- local mergeDep1 : _- local mergeDep2 : _- local aroundMap : _- local aroundDep1 : _- local aroundDep2 : _- local cVisits : _- local allfields : _- local attrs : _- local inhnames : _- local synnames : _--}--- cata-sem_Production :: Production ->- T_Production -sem_Production (Production _con _children _rules _typeSigs ) =- (sem_Production_Production _con (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) )--- semantic domain-newtype T_Production = T_Production (([Identifier]) ->- (Map ConstructorIdent (Map Identifier [Expression])) ->- CVisitsMap ->- Attributes ->- AttrOrderMap ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->- Identifier ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- Attributes ->- Int ->- ( (Seq Edge),(Seq Edge),CProduction,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))-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),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),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)}-wrap_Production :: T_Production ->- Inh_Production ->- Syn_Production -wrap_Production (T_Production sem ) (Inh_Production _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount ) =- (let ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount) =- (sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount )- in (Syn_Production _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount ))-sem_Production_Production :: ConstructorIdent ->- T_Children ->- T_Rules ->- T_TypeSigs ->- T_Production -sem_Production_Production con_ (T_Children children_ ) (T_Rules rules_ ) (T_TypeSigs typeSigs_ ) =- (T_Production (\ _lhsIallnts- _lhsIaroundMap- _lhsIcVisitsMap- _lhsIinh- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIsyn- _lhsIvcount ->- (let _childrenOcon :: Identifier- _rulesOcon :: Identifier- _rulesOchildNts :: (Map Identifier NontermIdent)- _rulesOchildInhs :: (Map Identifier Attributes)- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOvcount :: Int- _lhsOadditionalDep :: (Seq Edge)- _rulesOsynsOfChildren :: (Map Identifier Attributes)- _rulesOinhsOfChildren :: (Map Identifier Attributes)- _lhsOmergeDep :: (Seq Edge)- _lhsOaroundDep :: (Seq Edge)- _lhsOcons :: ([ConstructorIdent])- _typeSigsOtypeSigs :: (Map Identifier Type)- _rulesOallTypeSigs :: (Map Identifier Type)- _lhsOcProduction :: CProduction- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _childrenOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _childrenOallnts :: ([Identifier])- _childrenOattrs :: ([(Identifier,Identifier)])- _childrenOinh :: Attributes- _childrenOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _childrenOnt :: Identifier- _childrenOo_unbox :: Bool- _childrenOsyn :: Attributes- _rulesOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _rulesOallnts :: ([Identifier])- _rulesOaltAttrs :: (Map AltAttr Vertex)- _rulesOattrs :: ([(Identifier,Identifier)])- _rulesOinh :: Attributes- _rulesOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _rulesOnt :: Identifier- _rulesOo_case :: Bool- _rulesOo_cata :: Bool- _rulesOo_dovisit :: Bool- _rulesOo_newtypes :: Bool- _rulesOo_rename :: Bool- _rulesOo_sem :: Bool- _rulesOo_sig :: Bool- _rulesOo_wantvisit :: Bool- _rulesOprefix :: String- _rulesOsyn :: Attributes- _childrenIattributes :: ([(Identifier,Attributes,Attributes)])- _childrenIcollectChildrenInhs :: (Map Identifier Attributes )- _childrenIcollectChildrenSyns :: (Map Identifier Attributes )- _childrenIerrors :: (Seq Error)- _childrenIfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _childrenIgathAltAttrs :: ([AltAttr])- _childrenIgathRules :: (Seq CRule)- _childrenIinhs :: (Seq (Identifier,Attributes))- _childrenInts :: (Seq (Identifier,NontermIdent))- _childrenIsinglevisits :: ([CRule])- _childrenIterminals :: ([Identifier])- _rulesIdirectDep :: (Seq Edge)- _rulesIerrors :: (Seq Error)- _rulesIgathAltAttrs :: ([AltAttr])- _rulesIgathRules :: (Seq CRule)- _rulesIinstDep :: (Seq Edge)- _rulesIinstVars :: ([Identifier])- _rulesIlocVars :: ([Identifier])- _rulesInAutoRules :: Int- _rulesInExplicitRules :: Int- _typeSigsItypeSigs :: (Map Identifier Type)- -- "Order.ag"(line 93, column 16)- _childrenOcon =- ({-# LINE 93 "Order.ag" #-}- con_- {-# LINE 3168 "Order.hs" #-})- -- "Order.ag"(line 95, column 16)- _rulesOcon =- ({-# LINE 95 "Order.ag" #-}- con_- {-# LINE 3173 "Order.hs" #-})- -- "Order.ag"(line 172, column 18)- _gathAltAttrs =- ({-# LINE 172 "Order.ag" #-}- [ AltAttr _LHS inh True | inh <- Map.keys _lhsIinh ]- ++ _childrenIgathAltAttrs- ++ _rulesIgathAltAttrs- {-# LINE 3180 "Order.hs" #-})- -- "Order.ag"(line 188, column 17)- _altAttrs =- ({-# LINE 188 "Order.ag" #-}- Map.fromList (zip _gathAltAttrs [_lhsIvcount..])- {-# LINE 3185 "Order.hs" #-})- -- "Order.ag"(line 201, column 18)- _rulesOchildNts =- ({-# LINE 201 "Order.ag" #-}- Map.fromList (toList _childrenInts)- {-# LINE 3190 "Order.hs" #-})- -- "Order.ag"(line 202, column 19)- _rulesOchildInhs =- ({-# LINE 202 "Order.ag" #-}- Map.fromList (toList _childrenIinhs)- {-# LINE 3195 "Order.hs" #-})- -- "Order.ag"(line 208, column 18)- _inhRules =- ({-# LINE 208 "Order.ag" #-}- [ cRuleLhsInh inh _lhsInt con_ tp | (inh,tp) <- Map.assocs _lhsIinh ]- {-# LINE 3200 "Order.hs" #-})- -- "Order.ag"(line 209, column 19)- _gathRules =- ({-# LINE 209 "Order.ag" #-}- _inhRules ++ toList (_childrenIgathRules Seq.>< _rulesIgathRules)- {-# LINE 3205 "Order.hs" #-})- -- "Order.ag"(line 263, column 18)- _lhsOrules =- ({-# LINE 263 "Order.ag" #-}- Seq.fromList (zip [_lhsIvcount..] _gathRules)- {-# LINE 3210 "Order.hs" #-})- -- "Order.ag"(line 264, column 19)- _lhsOvcount =- ({-# LINE 264 "Order.ag" #-}- _lhsIvcount + length _gathRules- {-# LINE 3215 "Order.hs" #-})- -- "Order.ag"(line 291, column 7)- _manualDeps =- ({-# LINE 291 "Order.ag" #-}- Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrDepMap- {-# LINE 3220 "Order.hs" #-})- -- "Order.ag"(line 294, column 7)- _lhsOadditionalDep =- ({-# LINE 294 "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 3232 "Order.hs" #-})- -- "Order.ag"(line 341, column 17)- _rulesOsynsOfChildren =- ({-# LINE 341 "Order.ag" #-}- _childrenIcollectChildrenSyns- {-# LINE 3237 "Order.hs" #-})- -- "Order.ag"(line 342, column 17)- _rulesOinhsOfChildren =- ({-# LINE 342 "Order.ag" #-}- _childrenIcollectChildrenInhs- {-# LINE 3242 "Order.hs" #-})- -- "Order.ag"(line 360, column 32)- _mergeMap =- ({-# LINE 360 "Order.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergeMap- {-# LINE 3247 "Order.hs" #-})- -- "Order.ag"(line 371, column 7)- _lhsOmergeDep =- ({-# LINE 371 "Order.ag" #-}- _mergeDep1 Seq.>< _mergeDep2- {-# LINE 3252 "Order.hs" #-})- -- "Order.ag"(line 372, column 7)- _mergeDep1 =- ({-# LINE 372 "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 3266 "Order.hs" #-})- -- "Order.ag"(line 383, column 7)- _mergeDep2 =- ({-# LINE 383 "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 3280 "Order.hs" #-})- -- "Order.ag"(line 413, column 32)- _aroundMap =- ({-# LINE 413 "Order.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaroundMap- {-# LINE 3285 "Order.hs" #-})- -- "Order.ag"(line 420, column 6)- _aroundDep1 =- ({-# LINE 420 "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 3299 "Order.hs" #-})- -- "Order.ag"(line 431, column 6)- _aroundDep2 =- ({-# LINE 431 "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 3313 "Order.hs" #-})- -- "Order.ag"(line 442, column 6)- _lhsOaroundDep =- ({-# LINE 442 "Order.ag" #-}- _aroundDep1 Seq.>< _aroundDep2- {-# LINE 3318 "Order.hs" #-})- -- "Order.ag"(line 522, column 18)- _lhsOcons =- ({-# LINE 522 "Order.ag" #-}- [con_]- {-# LINE 3323 "Order.hs" #-})- -- "Order.ag"(line 529, column 16)- _typeSigsOtypeSigs =- ({-# LINE 529 "Order.ag" #-}- Map.empty- {-# LINE 3328 "Order.hs" #-})- -- "Order.ag"(line 535, column 17)- _rulesOallTypeSigs =- ({-# LINE 535 "Order.ag" #-}- _typeSigsItypeSigs- {-# LINE 3333 "Order.hs" #-})- -- "Order.ag"(line 603, column 17)- _cVisits =- ({-# LINE 603 "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 3343 "Order.hs" #-})- -- "Order.ag"(line 629, column 18)- _lhsOcProduction =- ({-# LINE 629 "Order.ag" #-}- CProduction con_ _cVisits _childrenIfields _childrenIterminals- {-# LINE 3348 "Order.hs" #-})- -- "Order.ag"(line 657, column 16)- _allfields =- ({-# LINE 657 "Order.ag" #-}- _childrenIfields- {-# LINE 3353 "Order.hs" #-})- -- "Order.ag"(line 657, column 16)- _attrs =- ({-# LINE 658 "Order.ag" #-}- map ((,) _LOC) _rulesIlocVars ++- map ((,) _INST) _rulesIinstVars ++- map ((,) _LHS) _inhnames ++- concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]- {-# LINE 3361 "Order.hs" #-})- -- "Order.ag"(line 657, column 16)- _inhnames =- ({-# LINE 662 "Order.ag" #-}- Map.keys _lhsIinh- {-# LINE 3366 "Order.hs" #-})- -- "Order.ag"(line 657, column 16)- _synnames =- ({-# LINE 663 "Order.ag" #-}- Map.keys _lhsIsyn- {-# LINE 3371 "Order.hs" #-})- -- use rule "Order.ag"(line 269, column 33)- _lhsOdirectDep =- ({-# LINE 269 "Order.ag" #-}- _rulesIdirectDep- {-# LINE 3376 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _childrenIerrors Seq.>< _rulesIerrors- {-# LINE 3381 "Order.hs" #-})- -- use rule "Order.ag"(line 312, column 31)- _lhsOinstDep =- ({-# LINE 312 "Order.ag" #-}- _rulesIinstDep- {-# LINE 3386 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "Order.ag" #-}- _rulesInAutoRules- {-# LINE 3391 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "Order.ag" #-}- _rulesInExplicitRules- {-# LINE 3396 "Order.hs" #-})- -- copy rule (from local)- _childrenOallfields =- ({-# LINE 654 "Order.ag" #-}- _allfields- {-# LINE 3401 "Order.hs" #-})- -- copy rule (down)- _childrenOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 3406 "Order.hs" #-})- -- copy rule (from local)- _childrenOattrs =- ({-# LINE 654 "Order.ag" #-}- _attrs- {-# LINE 3411 "Order.hs" #-})- -- copy rule (down)- _childrenOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 3416 "Order.hs" #-})- -- copy rule (from local)- _childrenOmergeMap =- ({-# LINE 362 "Order.ag" #-}- _mergeMap- {-# LINE 3421 "Order.hs" #-})- -- copy rule (down)- _childrenOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 3426 "Order.hs" #-})- -- copy rule (down)- _childrenOo_unbox =- ({-# LINE 119 "Order.ag" #-}- _lhsIo_unbox- {-# LINE 3431 "Order.hs" #-})- -- copy rule (down)- _childrenOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 3436 "Order.hs" #-})- -- copy rule (from local)- _rulesOallfields =- ({-# LINE 654 "Order.ag" #-}- _allfields- {-# LINE 3441 "Order.hs" #-})- -- copy rule (down)- _rulesOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 3446 "Order.hs" #-})- -- copy rule (from local)- _rulesOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _altAttrs- {-# LINE 3451 "Order.hs" #-})- -- copy rule (from local)- _rulesOattrs =- ({-# LINE 654 "Order.ag" #-}- _attrs- {-# LINE 3456 "Order.hs" #-})- -- copy rule (down)- _rulesOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 3461 "Order.hs" #-})- -- copy rule (from local)- _rulesOmergeMap =- ({-# LINE 362 "Order.ag" #-}- _mergeMap- {-# LINE 3466 "Order.hs" #-})- -- copy rule (down)- _rulesOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 3471 "Order.hs" #-})- -- copy rule (down)- _rulesOo_case =- ({-# LINE 117 "Order.ag" #-}- _lhsIo_case- {-# LINE 3476 "Order.hs" #-})- -- copy rule (down)- _rulesOo_cata =- ({-# LINE 111 "Order.ag" #-}- _lhsIo_cata- {-# LINE 3481 "Order.hs" #-})- -- copy rule (down)- _rulesOo_dovisit =- ({-# LINE 116 "Order.ag" #-}- _lhsIo_dovisit- {-# LINE 3486 "Order.hs" #-})- -- copy rule (down)- _rulesOo_newtypes =- ({-# LINE 110 "Order.ag" #-}- _lhsIo_newtypes- {-# LINE 3491 "Order.hs" #-})- -- copy rule (down)- _rulesOo_rename =- ({-# LINE 114 "Order.ag" #-}- _lhsIo_rename- {-# LINE 3496 "Order.hs" #-})- -- copy rule (down)- _rulesOo_sem =- ({-# LINE 113 "Order.ag" #-}- _lhsIo_sem- {-# LINE 3501 "Order.hs" #-})- -- copy rule (down)- _rulesOo_sig =- ({-# LINE 112 "Order.ag" #-}- _lhsIo_sig- {-# LINE 3506 "Order.hs" #-})- -- copy rule (down)- _rulesOo_wantvisit =- ({-# LINE 115 "Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 3511 "Order.hs" #-})- -- copy rule (down)- _rulesOprefix =- ({-# LINE 118 "Order.ag" #-}- _lhsIprefix- {-# LINE 3516 "Order.hs" #-})- -- copy rule (down)- _rulesOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 3521 "Order.hs" #-})- ( _childrenIattributes,_childrenIcollectChildrenInhs,_childrenIcollectChildrenSyns,_childrenIerrors,_childrenIfields,_childrenIgathAltAttrs,_childrenIgathRules,_childrenIinhs,_childrenInts,_childrenIsinglevisits,_childrenIterminals) =- (children_ _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOmergeMap _childrenOnt _childrenOo_unbox _childrenOsyn )- ( _rulesIdirectDep,_rulesIerrors,_rulesIgathAltAttrs,_rulesIgathRules,_rulesIinstDep,_rulesIinstVars,_rulesIlocVars,_rulesInAutoRules,_rulesInExplicitRules) =- (rules_ _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 )- ( _typeSigsItypeSigs) =- (typeSigs_ _typeSigsOtypeSigs )- in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))) )--- Productions --------------------------------------------------{-- visit 0:- inherited attributes:- allnts : [Identifier]- aroundMap : Map ConstructorIdent (Map Identifier [Expression])- cVisitsMap : CVisitsMap- inh : Attributes- manualAttrDepMap : AttrOrderMap- mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))- nt : Identifier- o_case : Bool- o_cata : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_unbox : Bool- o_wantvisit : Bool- prefix : String- syn : Attributes- chained attribute:- vcount : Int- synthesized attributes:- additionalDep : Seq Edge- aroundDep : Seq Edge- cProductions : CProductions- cons : [ConstructorIdent]- directDep : Seq Edge- errors : Seq Error- instDep : Seq Edge- mergeDep : Seq Edge- nAutoRules : Int- nExplicitRules : Int- rules : Seq (Vertex,CRule)- alternatives:- alternative Cons:- child hd : Production - child tl : Productions - alternative Nil:--}--- cata-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 (([Identifier]) ->- (Map ConstructorIdent (Map Identifier [Expression])) ->- CVisitsMap ->- Attributes ->- AttrOrderMap ->- (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->- Identifier ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- Bool ->- String ->- Attributes ->- Int ->- ( (Seq Edge),(Seq Edge),CProductions,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))-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),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),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)}-wrap_Productions :: T_Productions ->- Inh_Productions ->- Syn_Productions -wrap_Productions (T_Productions sem ) (Inh_Productions _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount ) =- (let ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount) =- (sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount )- in (Syn_Productions _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount ))-sem_Productions_Cons :: T_Production ->- T_Productions ->- T_Productions -sem_Productions_Cons (T_Production hd_ ) (T_Productions tl_ ) =- (T_Productions (\ _lhsIallnts- _lhsIaroundMap- _lhsIcVisitsMap- _lhsIinh- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIsyn- _lhsIvcount ->- (let _lhsOcProductions :: CProductions- _lhsOadditionalDep :: (Seq Edge)- _lhsOaroundDep :: (Seq Edge)- _lhsOcons :: ([ConstructorIdent])- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOvcount :: Int- _hdOallnts :: ([Identifier])- _hdOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))- _hdOcVisitsMap :: CVisitsMap- _hdOinh :: Attributes- _hdOmanualAttrDepMap :: AttrOrderMap- _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- _hdOnt :: Identifier- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_dovisit :: Bool- _hdOo_newtypes :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_unbox :: Bool- _hdOo_wantvisit :: Bool- _hdOprefix :: String- _hdOsyn :: Attributes- _hdOvcount :: Int- _tlOallnts :: ([Identifier])- _tlOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))- _tlOcVisitsMap :: CVisitsMap- _tlOinh :: Attributes- _tlOmanualAttrDepMap :: AttrOrderMap- _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))- _tlOnt :: Identifier- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_dovisit :: Bool- _tlOo_newtypes :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_unbox :: Bool- _tlOo_wantvisit :: Bool- _tlOprefix :: String- _tlOsyn :: Attributes- _tlOvcount :: Int- _hdIadditionalDep :: (Seq Edge)- _hdIaroundDep :: (Seq Edge)- _hdIcProduction :: CProduction- _hdIcons :: ([ConstructorIdent])- _hdIdirectDep :: (Seq Edge)- _hdIerrors :: (Seq Error)- _hdIinstDep :: (Seq Edge)- _hdImergeDep :: (Seq Edge)- _hdInAutoRules :: Int- _hdInExplicitRules :: Int- _hdIrules :: (Seq (Vertex,CRule))- _hdIvcount :: Int- _tlIadditionalDep :: (Seq Edge)- _tlIaroundDep :: (Seq Edge)- _tlIcProductions :: CProductions- _tlIcons :: ([ConstructorIdent])- _tlIdirectDep :: (Seq Edge)- _tlIerrors :: (Seq Error)- _tlIinstDep :: (Seq Edge)- _tlImergeDep :: (Seq Edge)- _tlInAutoRules :: Int- _tlInExplicitRules :: Int- _tlIrules :: (Seq (Vertex,CRule))- _tlIvcount :: Int- -- "Order.ag"(line 626, column 12)- _lhsOcProductions =- ({-# LINE 626 "Order.ag" #-}- _hdIcProduction : _tlIcProductions- {-# LINE 3707 "Order.hs" #-})- -- use rule "Order.ag"(line 283, column 60)- _lhsOadditionalDep =- ({-# LINE 283 "Order.ag" #-}- _hdIadditionalDep Seq.>< _tlIadditionalDep- {-# LINE 3712 "Order.hs" #-})- -- use rule "Order.ag"(line 404, column 24)- _lhsOaroundDep =- ({-# LINE 404 "Order.ag" #-}- _hdIaroundDep Seq.>< _tlIaroundDep- {-# LINE 3717 "Order.hs" #-})- -- use rule "Order.ag"(line 520, column 40)- _lhsOcons =- ({-# LINE 520 "Order.ag" #-}- _hdIcons ++ _tlIcons- {-# LINE 3722 "Order.hs" #-})- -- use rule "Order.ag"(line 269, column 33)- _lhsOdirectDep =- ({-# LINE 269 "Order.ag" #-}- _hdIdirectDep Seq.>< _tlIdirectDep- {-# LINE 3727 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 3732 "Order.hs" #-})- -- use rule "Order.ag"(line 312, column 31)- _lhsOinstDep =- ({-# LINE 312 "Order.ag" #-}- _hdIinstDep Seq.>< _tlIinstDep- {-# LINE 3737 "Order.hs" #-})- -- use rule "Order.ag"(line 367, column 18)- _lhsOmergeDep =- ({-# LINE 367 "Order.ag" #-}- _hdImergeDep Seq.>< _tlImergeDep- {-# LINE 3742 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "Order.ag" #-}- _hdInAutoRules + _tlInAutoRules- {-# LINE 3747 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "Order.ag" #-}- _hdInExplicitRules + _tlInExplicitRules- {-# LINE 3752 "Order.hs" #-})- -- use rule "Order.ag"(line 259, column 18)- _lhsOrules =- ({-# LINE 259 "Order.ag" #-}- _hdIrules Seq.>< _tlIrules- {-# LINE 3757 "Order.hs" #-})- -- copy rule (up)- _lhsOvcount =- ({-# LINE 258 "Order.ag" #-}- _tlIvcount- {-# LINE 3762 "Order.hs" #-})- -- copy rule (down)- _hdOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 3767 "Order.hs" #-})- -- copy rule (down)- _hdOaroundMap =- ({-# LINE 410 "Order.ag" #-}- _lhsIaroundMap- {-# LINE 3772 "Order.hs" #-})- -- copy rule (down)- _hdOcVisitsMap =- ({-# LINE 601 "Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 3777 "Order.hs" #-})- -- copy rule (down)- _hdOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 3782 "Order.hs" #-})- -- copy rule (down)- _hdOmanualAttrDepMap =- ({-# LINE 283 "Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 3787 "Order.hs" #-})- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 357 "Order.ag" #-}- _lhsImergeMap- {-# LINE 3792 "Order.hs" #-})- -- copy rule (down)- _hdOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 3797 "Order.hs" #-})- -- copy rule (down)- _hdOo_case =- ({-# LINE 117 "Order.ag" #-}- _lhsIo_case- {-# LINE 3802 "Order.hs" #-})- -- copy rule (down)- _hdOo_cata =- ({-# LINE 111 "Order.ag" #-}- _lhsIo_cata- {-# LINE 3807 "Order.hs" #-})- -- copy rule (down)- _hdOo_dovisit =- ({-# LINE 116 "Order.ag" #-}- _lhsIo_dovisit- {-# LINE 3812 "Order.hs" #-})- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 110 "Order.ag" #-}- _lhsIo_newtypes- {-# LINE 3817 "Order.hs" #-})- -- copy rule (down)- _hdOo_rename =- ({-# LINE 114 "Order.ag" #-}- _lhsIo_rename- {-# LINE 3822 "Order.hs" #-})- -- copy rule (down)- _hdOo_sem =- ({-# LINE 113 "Order.ag" #-}- _lhsIo_sem- {-# LINE 3827 "Order.hs" #-})- -- copy rule (down)- _hdOo_sig =- ({-# LINE 112 "Order.ag" #-}- _lhsIo_sig- {-# LINE 3832 "Order.hs" #-})- -- copy rule (down)- _hdOo_unbox =- ({-# LINE 119 "Order.ag" #-}- _lhsIo_unbox- {-# LINE 3837 "Order.hs" #-})- -- copy rule (down)- _hdOo_wantvisit =- ({-# LINE 115 "Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 3842 "Order.hs" #-})- -- copy rule (down)- _hdOprefix =- ({-# LINE 118 "Order.ag" #-}- _lhsIprefix- {-# LINE 3847 "Order.hs" #-})- -- copy rule (down)- _hdOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 3852 "Order.hs" #-})- -- copy rule (down)- _hdOvcount =- ({-# LINE 258 "Order.ag" #-}- _lhsIvcount- {-# LINE 3857 "Order.hs" #-})- -- copy rule (down)- _tlOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 3862 "Order.hs" #-})- -- copy rule (down)- _tlOaroundMap =- ({-# LINE 410 "Order.ag" #-}- _lhsIaroundMap- {-# LINE 3867 "Order.hs" #-})- -- copy rule (down)- _tlOcVisitsMap =- ({-# LINE 601 "Order.ag" #-}- _lhsIcVisitsMap- {-# LINE 3872 "Order.hs" #-})- -- copy rule (down)- _tlOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 3877 "Order.hs" #-})- -- copy rule (down)- _tlOmanualAttrDepMap =- ({-# LINE 283 "Order.ag" #-}- _lhsImanualAttrDepMap- {-# LINE 3882 "Order.hs" #-})- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 357 "Order.ag" #-}- _lhsImergeMap- {-# LINE 3887 "Order.hs" #-})- -- copy rule (down)- _tlOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 3892 "Order.hs" #-})- -- copy rule (down)- _tlOo_case =- ({-# LINE 117 "Order.ag" #-}- _lhsIo_case- {-# LINE 3897 "Order.hs" #-})- -- copy rule (down)- _tlOo_cata =- ({-# LINE 111 "Order.ag" #-}- _lhsIo_cata- {-# LINE 3902 "Order.hs" #-})- -- copy rule (down)- _tlOo_dovisit =- ({-# LINE 116 "Order.ag" #-}- _lhsIo_dovisit- {-# LINE 3907 "Order.hs" #-})- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 110 "Order.ag" #-}- _lhsIo_newtypes- {-# LINE 3912 "Order.hs" #-})- -- copy rule (down)- _tlOo_rename =- ({-# LINE 114 "Order.ag" #-}- _lhsIo_rename- {-# LINE 3917 "Order.hs" #-})- -- copy rule (down)- _tlOo_sem =- ({-# LINE 113 "Order.ag" #-}- _lhsIo_sem- {-# LINE 3922 "Order.hs" #-})- -- copy rule (down)- _tlOo_sig =- ({-# LINE 112 "Order.ag" #-}- _lhsIo_sig- {-# LINE 3927 "Order.hs" #-})- -- copy rule (down)- _tlOo_unbox =- ({-# LINE 119 "Order.ag" #-}- _lhsIo_unbox- {-# LINE 3932 "Order.hs" #-})- -- copy rule (down)- _tlOo_wantvisit =- ({-# LINE 115 "Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 3937 "Order.hs" #-})- -- copy rule (down)- _tlOprefix =- ({-# LINE 118 "Order.ag" #-}- _lhsIprefix- {-# LINE 3942 "Order.hs" #-})- -- copy rule (down)- _tlOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 3947 "Order.hs" #-})- -- copy rule (chain)- _tlOvcount =- ({-# LINE 258 "Order.ag" #-}- _hdIvcount- {-# LINE 3952 "Order.hs" #-})- ( _hdIadditionalDep,_hdIaroundDep,_hdIcProduction,_hdIcons,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdImergeDep,_hdInAutoRules,_hdInExplicitRules,_hdIrules,_hdIvcount) =- (hd_ _hdOallnts _hdOaroundMap _hdOcVisitsMap _hdOinh _hdOmanualAttrDepMap _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOsyn _hdOvcount )- ( _tlIadditionalDep,_tlIaroundDep,_tlIcProductions,_tlIcons,_tlIdirectDep,_tlIerrors,_tlIinstDep,_tlImergeDep,_tlInAutoRules,_tlInExplicitRules,_tlIrules,_tlIvcount) =- (tl_ _tlOallnts _tlOaroundMap _tlOcVisitsMap _tlOinh _tlOmanualAttrDepMap _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOsyn _tlOvcount )- in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil =- (T_Productions (\ _lhsIallnts- _lhsIaroundMap- _lhsIcVisitsMap- _lhsIinh- _lhsImanualAttrDepMap- _lhsImergeMap- _lhsInt- _lhsIo_case- _lhsIo_cata- _lhsIo_dovisit- _lhsIo_newtypes- _lhsIo_rename- _lhsIo_sem- _lhsIo_sig- _lhsIo_unbox- _lhsIo_wantvisit- _lhsIprefix- _lhsIsyn- _lhsIvcount ->- (let _lhsOcProductions :: CProductions- _lhsOadditionalDep :: (Seq Edge)- _lhsOaroundDep :: (Seq Edge)- _lhsOcons :: ([ConstructorIdent])- _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOinstDep :: (Seq Edge)- _lhsOmergeDep :: (Seq Edge)- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _lhsOrules :: (Seq (Vertex,CRule))- _lhsOvcount :: Int- -- "Order.ag"(line 627, column 12)- _lhsOcProductions =- ({-# LINE 627 "Order.ag" #-}- []- {-# LINE 3995 "Order.hs" #-})- -- use rule "Order.ag"(line 283, column 60)- _lhsOadditionalDep =- ({-# LINE 283 "Order.ag" #-}- Seq.empty- {-# LINE 4000 "Order.hs" #-})- -- use rule "Order.ag"(line 404, column 24)- _lhsOaroundDep =- ({-# LINE 404 "Order.ag" #-}- Seq.empty- {-# LINE 4005 "Order.hs" #-})- -- use rule "Order.ag"(line 520, column 40)- _lhsOcons =- ({-# LINE 520 "Order.ag" #-}- []- {-# LINE 4010 "Order.hs" #-})- -- use rule "Order.ag"(line 269, column 33)- _lhsOdirectDep =- ({-# LINE 269 "Order.ag" #-}- Seq.empty- {-# LINE 4015 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- Seq.empty- {-# LINE 4020 "Order.hs" #-})- -- use rule "Order.ag"(line 312, column 31)- _lhsOinstDep =- ({-# LINE 312 "Order.ag" #-}- Seq.empty- {-# LINE 4025 "Order.hs" #-})- -- use rule "Order.ag"(line 367, column 18)- _lhsOmergeDep =- ({-# LINE 367 "Order.ag" #-}- Seq.empty- {-# LINE 4030 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "Order.ag" #-}- 0- {-# LINE 4035 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "Order.ag" #-}- 0- {-# LINE 4040 "Order.hs" #-})- -- use rule "Order.ag"(line 259, column 18)- _lhsOrules =- ({-# LINE 259 "Order.ag" #-}- Seq.empty- {-# LINE 4045 "Order.hs" #-})- -- copy rule (chain)- _lhsOvcount =- ({-# LINE 258 "Order.ag" #-}- _lhsIvcount- {-# LINE 4050 "Order.hs" #-})- in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))) )--- Rule ---------------------------------------------------------{-- visit 0:- inherited attributes:- allTypeSigs : Map Identifier Type- allfields : [(Identifier,Type,Maybe (Maybe Type))]- allnts : [Identifier]- altAttrs : Map AltAttr Vertex- attrs : [(Identifier,Identifier)]- childInhs : Map Identifier Attributes- childNts : Map Identifier NontermIdent- con : Identifier- inh : Attributes- inhsOfChildren : Map Identifier Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- o_case : Bool- o_cata : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_wantvisit : Bool- prefix : String- syn : Attributes- synsOfChildren : Map Identifier Attributes- synthesized attributes:- directDep : Seq Edge- errors : Seq Error- gathAltAttrs : [AltAttr]- gathRules : Seq CRule- instDep : Seq Edge- instVars : [Identifier]- locVars : [Identifier]- nAutoRules : Int- nExplicitRules : Int- alternatives:- alternative Rule:- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : Expression - child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- visit 0:- local defines : _- local gathRules : _- local instDep1 : _- local instDep2 : _--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit )--- semantic domain-newtype T_Rule = T_Rule ((Map Identifier Type) ->- ([(Identifier,Type,Maybe (Maybe Type))]) ->- ([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) ->- ( (Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier]),Int,Int))-data Inh_Rule = Inh_Rule {allTypeSigs_Inh_Rule :: !((Map Identifier Type)),allfields_Inh_Rule :: !(([(Identifier,Type,Maybe (Maybe Type))])),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)}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule (T_Rule sem ) (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 ) =- (let ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules) =- (sem _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 )- in (Syn_Rule _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules ))-sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- T_Expression ->- Bool ->- String ->- Bool ->- T_Rule -sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ =- (T_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 ->- (let _lhsOnExplicitRules :: Int- _lhsOnAutoRules :: Int- _lhsOdirectDep :: (Seq Edge)- _lhsOinstDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _patternOallTypeSigs :: (Map Identifier Type)- _patternOaltAttrs :: (Map AltAttr Vertex)- _patternOcon :: Identifier- _patternOinh :: Attributes- _patternOnt :: Identifier- _patternOsyn :: Attributes- _rhsOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _rhsOallnts :: ([Identifier])- _rhsOattrs :: ([(Identifier,Identifier)])- _rhsOcon :: Identifier- _rhsOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _rhsOnt :: Identifier- _patternIcopy :: Pattern - _patternIerrors :: (Seq Error)- _patternIgathAltAttrs :: ([AltAttr])- _patternIinstVars :: ([Identifier])- _patternIlocVars :: ([Identifier])- _patternIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _rhsIallRhsVars :: (Set (Identifier,Identifier))- _rhsIcopy :: Expression - _rhsIerrors :: (Seq Error)- _rhsItextLines :: ([String])- _rhsIusedAttrs :: ([(Identifier,Identifier)])- _rhsIusedFields :: ([Identifier])- _rhsIusedLocals :: ([Identifier])- -- "Order.ag"(line 64, column 11)- _lhsOnExplicitRules =- ({-# LINE 64 "Order.ag" #-}- if explicit_- then 1- else 0- {-# LINE 4213 "Order.hs" #-})- -- "Order.ag"(line 67, column 11)- _lhsOnAutoRules =- ({-# LINE 67 "Order.ag" #-}- if startsWith "use rule" origin_ || startsWith "copy rule" origin_- then 1- else 0- {-# LINE 4220 "Order.hs" #-})- -- "Order.ag"(line 217, column 12)- _defines =- ({-# LINE 217 "Order.ag" #-}- let tp field attr parts | field == _LOC || field == _INST- = case parts of- [] -> Map.lookup attr _lhsIallTypeSigs- _ -> (sequence (map typ parts)) >>= (haskellTupel . map (substSelf _lhsInt))- | field == _LHS = Map.lookup attr _lhsIsyn- | otherwise = Map.lookup attr (findWithErr1 "Rule.defines.tp" field _lhsIchildInhs)- typ :: Pattern -> Maybe Type- typ (Alias field attr _ parts) = tp field attr parts- typ (Underscore _) = Nothing- typ (Product _ pats) = tp _LOC undefined pats- typ _ = Nothing- in Map.fromList [ (findWithErr1 "Rule.defines" aa _lhsIaltAttrs, (field,attr,(tp field attr parts)))- | (field,attr,isLocalOrInst,parts) <- _patternIpatternAttrs- , let aa = AltAttr field attr isLocalOrInst- ]- {-# LINE 4239 "Order.hs" #-})- -- "Order.ag"(line 233, column 12)- _gathRules =- ({-# LINE 233 "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 4247 "Order.hs" #-})- -- "Order.ag"(line 271, column 12)- _lhsOdirectDep =- ({-# LINE 271 "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 4255 "Order.hs" #-})- -- "Order.ag"(line 315, column 6)- _instDep1 =- ({-# LINE 315 "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 4269 "Order.hs" #-})- -- "Order.ag"(line 326, column 6)- _instDep2 =- ({-# LINE 326 "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 4283 "Order.hs" #-})- -- "Order.ag"(line 337, column 6)- _lhsOinstDep =- ({-# LINE 337 "Order.ag" #-}- _instDep1 Seq.>< _instDep2- {-# LINE 4288 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _patternIerrors Seq.>< _rhsIerrors- {-# LINE 4293 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- _patternIgathAltAttrs- {-# LINE 4298 "Order.hs" #-})- -- use rule "Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "Order.ag" #-}- _gathRules- {-# LINE 4303 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "Order.ag" #-}- _patternIinstVars- {-# LINE 4308 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "Order.ag" #-}- _patternIlocVars- {-# LINE 4313 "Order.hs" #-})- -- copy rule (down)- _patternOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 4318 "Order.hs" #-})- -- copy rule (down)- _patternOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 4323 "Order.hs" #-})- -- copy rule (down)- _patternOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 4328 "Order.hs" #-})- -- copy rule (down)- _patternOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 4333 "Order.hs" #-})- -- copy rule (down)- _patternOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 4338 "Order.hs" #-})- -- copy rule (down)- _patternOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 4343 "Order.hs" #-})- -- copy rule (down)- _rhsOallfields =- ({-# LINE 448 "Order.ag" #-}- _lhsIallfields- {-# LINE 4348 "Order.hs" #-})- -- copy rule (down)- _rhsOallnts =- ({-# LINE 449 "Order.ag" #-}- _lhsIallnts- {-# LINE 4353 "Order.hs" #-})- -- copy rule (down)- _rhsOattrs =- ({-# LINE 450 "Order.ag" #-}- _lhsIattrs- {-# LINE 4358 "Order.hs" #-})- -- copy rule (down)- _rhsOcon =- ({-# LINE 447 "Order.ag" #-}- _lhsIcon- {-# LINE 4363 "Order.hs" #-})- -- copy rule (down)- _rhsOmergeMap =- ({-# LINE 362 "Order.ag" #-}- _lhsImergeMap- {-# LINE 4368 "Order.hs" #-})- -- copy rule (down)- _rhsOnt =- ({-# LINE 447 "Order.ag" #-}- _lhsInt- {-# LINE 4373 "Order.hs" #-})- ( _patternIcopy,_patternIerrors,_patternIgathAltAttrs,_patternIinstVars,_patternIlocVars,_patternIpatternAttrs) =- (pattern_ _patternOallTypeSigs _patternOaltAttrs _patternOcon _patternOinh _patternOnt _patternOsyn )- ( _rhsIallRhsVars,_rhsIcopy,_rhsIerrors,_rhsItextLines,_rhsIusedAttrs,_rhsIusedFields,_rhsIusedLocals) =- (rhs_ _rhsOallfields _rhsOallnts _rhsOattrs _rhsOcon _rhsOmergeMap _rhsOnt )- in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))) )--- Rules --------------------------------------------------------{-- visit 0:- inherited attributes:- allTypeSigs : Map Identifier Type- allfields : [(Identifier,Type,Maybe (Maybe Type))]- allnts : [Identifier]- altAttrs : Map AltAttr Vertex- attrs : [(Identifier,Identifier)]- childInhs : Map Identifier Attributes- childNts : Map Identifier NontermIdent- con : Identifier- inh : Attributes- inhsOfChildren : Map Identifier Attributes- mergeMap : Map Identifier (Identifier,[Identifier])- nt : Identifier- o_case : Bool- o_cata : Bool- o_dovisit : Bool- o_newtypes : Bool- o_rename : Bool- o_sem : Bool- o_sig : Bool- o_wantvisit : Bool- prefix : String- syn : Attributes- synsOfChildren : Map Identifier Attributes- synthesized attributes:- directDep : Seq Edge- errors : Seq Error- gathAltAttrs : [AltAttr]- gathRules : Seq CRule- instDep : Seq Edge- instVars : [Identifier]- locVars : [Identifier]- nAutoRules : Int- nExplicitRules : Int- alternatives:- alternative Cons:- child hd : Rule - child tl : Rules - alternative Nil:--}--- cata-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 ((Map Identifier Type) ->- ([(Identifier,Type,Maybe (Maybe Type))]) ->- ([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) ->- ( (Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier]),Int,Int))-data Inh_Rules = Inh_Rules {allTypeSigs_Inh_Rules :: !((Map Identifier Type)),allfields_Inh_Rules :: !(([(Identifier,Type,Maybe (Maybe Type))])),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)}-wrap_Rules :: T_Rules ->- Inh_Rules ->- Syn_Rules -wrap_Rules (T_Rules sem ) (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 ) =- (let ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules) =- (sem _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 )- in (Syn_Rules _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules ))-sem_Rules_Cons :: T_Rule ->- T_Rules ->- T_Rules -sem_Rules_Cons (T_Rule hd_ ) (T_Rules tl_ ) =- (T_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 ->- (let _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinstDep :: (Seq Edge)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- _hdOallTypeSigs :: (Map Identifier Type)- _hdOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _hdOallnts :: ([Identifier])- _hdOaltAttrs :: (Map AltAttr Vertex)- _hdOattrs :: ([(Identifier,Identifier)])- _hdOchildInhs :: (Map Identifier Attributes)- _hdOchildNts :: (Map Identifier NontermIdent)- _hdOcon :: Identifier- _hdOinh :: Attributes- _hdOinhsOfChildren :: (Map Identifier Attributes)- _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _hdOnt :: Identifier- _hdOo_case :: Bool- _hdOo_cata :: Bool- _hdOo_dovisit :: Bool- _hdOo_newtypes :: Bool- _hdOo_rename :: Bool- _hdOo_sem :: Bool- _hdOo_sig :: Bool- _hdOo_wantvisit :: Bool- _hdOprefix :: String- _hdOsyn :: Attributes- _hdOsynsOfChildren :: (Map Identifier Attributes)- _tlOallTypeSigs :: (Map Identifier Type)- _tlOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])- _tlOallnts :: ([Identifier])- _tlOaltAttrs :: (Map AltAttr Vertex)- _tlOattrs :: ([(Identifier,Identifier)])- _tlOchildInhs :: (Map Identifier Attributes)- _tlOchildNts :: (Map Identifier NontermIdent)- _tlOcon :: Identifier- _tlOinh :: Attributes- _tlOinhsOfChildren :: (Map Identifier Attributes)- _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))- _tlOnt :: Identifier- _tlOo_case :: Bool- _tlOo_cata :: Bool- _tlOo_dovisit :: Bool- _tlOo_newtypes :: Bool- _tlOo_rename :: Bool- _tlOo_sem :: Bool- _tlOo_sig :: Bool- _tlOo_wantvisit :: Bool- _tlOprefix :: String- _tlOsyn :: Attributes- _tlOsynsOfChildren :: (Map Identifier Attributes)- _hdIdirectDep :: (Seq Edge)- _hdIerrors :: (Seq Error)- _hdIgathAltAttrs :: ([AltAttr])- _hdIgathRules :: (Seq CRule)- _hdIinstDep :: (Seq Edge)- _hdIinstVars :: ([Identifier])- _hdIlocVars :: ([Identifier])- _hdInAutoRules :: Int- _hdInExplicitRules :: Int- _tlIdirectDep :: (Seq Edge)- _tlIerrors :: (Seq Error)- _tlIgathAltAttrs :: ([AltAttr])- _tlIgathRules :: (Seq CRule)- _tlIinstDep :: (Seq Edge)- _tlIinstVars :: ([Identifier])- _tlIlocVars :: ([Identifier])- _tlInAutoRules :: Int- _tlInExplicitRules :: Int- -- use rule "Order.ag"(line 269, column 33)- _lhsOdirectDep =- ({-# LINE 269 "Order.ag" #-}- _hdIdirectDep Seq.>< _tlIdirectDep- {-# LINE 4565 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 4570 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- _hdIgathAltAttrs ++ _tlIgathAltAttrs- {-# LINE 4575 "Order.hs" #-})- -- use rule "Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "Order.ag" #-}- _hdIgathRules Seq.>< _tlIgathRules- {-# LINE 4580 "Order.hs" #-})- -- use rule "Order.ag"(line 312, column 31)- _lhsOinstDep =- ({-# LINE 312 "Order.ag" #-}- _hdIinstDep Seq.>< _tlIinstDep- {-# LINE 4585 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "Order.ag" #-}- _hdIinstVars ++ _tlIinstVars- {-# LINE 4590 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "Order.ag" #-}- _hdIlocVars ++ _tlIlocVars- {-# LINE 4595 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "Order.ag" #-}- _hdInAutoRules + _tlInAutoRules- {-# LINE 4600 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "Order.ag" #-}- _hdInExplicitRules + _tlInExplicitRules- {-# LINE 4605 "Order.hs" #-})- -- copy rule (down)- _hdOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 4610 "Order.hs" #-})- -- copy rule (down)- _hdOallfields =- ({-# LINE 654 "Order.ag" #-}- _lhsIallfields- {-# LINE 4615 "Order.hs" #-})- -- copy rule (down)- _hdOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 4620 "Order.hs" #-})- -- copy rule (down)- _hdOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 4625 "Order.hs" #-})- -- copy rule (down)- _hdOattrs =- ({-# LINE 654 "Order.ag" #-}- _lhsIattrs- {-# LINE 4630 "Order.hs" #-})- -- copy rule (down)- _hdOchildInhs =- ({-# LINE 199 "Order.ag" #-}- _lhsIchildInhs- {-# LINE 4635 "Order.hs" #-})- -- copy rule (down)- _hdOchildNts =- ({-# LINE 198 "Order.ag" #-}- _lhsIchildNts- {-# LINE 4640 "Order.hs" #-})- -- copy rule (down)- _hdOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 4645 "Order.hs" #-})- -- copy rule (down)- _hdOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 4650 "Order.hs" #-})- -- copy rule (down)- _hdOinhsOfChildren =- ({-# LINE 339 "Order.ag" #-}- _lhsIinhsOfChildren- {-# LINE 4655 "Order.hs" #-})- -- copy rule (down)- _hdOmergeMap =- ({-# LINE 362 "Order.ag" #-}- _lhsImergeMap- {-# LINE 4660 "Order.hs" #-})- -- copy rule (down)- _hdOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 4665 "Order.hs" #-})- -- copy rule (down)- _hdOo_case =- ({-# LINE 117 "Order.ag" #-}- _lhsIo_case- {-# LINE 4670 "Order.hs" #-})- -- copy rule (down)- _hdOo_cata =- ({-# LINE 111 "Order.ag" #-}- _lhsIo_cata- {-# LINE 4675 "Order.hs" #-})- -- copy rule (down)- _hdOo_dovisit =- ({-# LINE 116 "Order.ag" #-}- _lhsIo_dovisit- {-# LINE 4680 "Order.hs" #-})- -- copy rule (down)- _hdOo_newtypes =- ({-# LINE 110 "Order.ag" #-}- _lhsIo_newtypes- {-# LINE 4685 "Order.hs" #-})- -- copy rule (down)- _hdOo_rename =- ({-# LINE 114 "Order.ag" #-}- _lhsIo_rename- {-# LINE 4690 "Order.hs" #-})- -- copy rule (down)- _hdOo_sem =- ({-# LINE 113 "Order.ag" #-}- _lhsIo_sem- {-# LINE 4695 "Order.hs" #-})- -- copy rule (down)- _hdOo_sig =- ({-# LINE 112 "Order.ag" #-}- _lhsIo_sig- {-# LINE 4700 "Order.hs" #-})- -- copy rule (down)- _hdOo_wantvisit =- ({-# LINE 115 "Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 4705 "Order.hs" #-})- -- copy rule (down)- _hdOprefix =- ({-# LINE 118 "Order.ag" #-}- _lhsIprefix- {-# LINE 4710 "Order.hs" #-})- -- copy rule (down)- _hdOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 4715 "Order.hs" #-})- -- copy rule (down)- _hdOsynsOfChildren =- ({-# LINE 339 "Order.ag" #-}- _lhsIsynsOfChildren- {-# LINE 4720 "Order.hs" #-})- -- copy rule (down)- _tlOallTypeSigs =- ({-# LINE 533 "Order.ag" #-}- _lhsIallTypeSigs- {-# LINE 4725 "Order.hs" #-})- -- copy rule (down)- _tlOallfields =- ({-# LINE 654 "Order.ag" #-}- _lhsIallfields- {-# LINE 4730 "Order.hs" #-})- -- copy rule (down)- _tlOallnts =- ({-# LINE 647 "Order.ag" #-}- _lhsIallnts- {-# LINE 4735 "Order.hs" #-})- -- copy rule (down)- _tlOaltAttrs =- ({-# LINE 186 "Order.ag" #-}- _lhsIaltAttrs- {-# LINE 4740 "Order.hs" #-})- -- copy rule (down)- _tlOattrs =- ({-# LINE 654 "Order.ag" #-}- _lhsIattrs- {-# LINE 4745 "Order.hs" #-})- -- copy rule (down)- _tlOchildInhs =- ({-# LINE 199 "Order.ag" #-}- _lhsIchildInhs- {-# LINE 4750 "Order.hs" #-})- -- copy rule (down)- _tlOchildNts =- ({-# LINE 198 "Order.ag" #-}- _lhsIchildNts- {-# LINE 4755 "Order.hs" #-})- -- copy rule (down)- _tlOcon =- ({-# LINE 90 "Order.ag" #-}- _lhsIcon- {-# LINE 4760 "Order.hs" #-})- -- copy rule (down)- _tlOinh =- ({-# LINE 89 "Order.ag" #-}- _lhsIinh- {-# LINE 4765 "Order.hs" #-})- -- copy rule (down)- _tlOinhsOfChildren =- ({-# LINE 339 "Order.ag" #-}- _lhsIinhsOfChildren- {-# LINE 4770 "Order.hs" #-})- -- copy rule (down)- _tlOmergeMap =- ({-# LINE 362 "Order.ag" #-}- _lhsImergeMap- {-# LINE 4775 "Order.hs" #-})- -- copy rule (down)- _tlOnt =- ({-# LINE 89 "Order.ag" #-}- _lhsInt- {-# LINE 4780 "Order.hs" #-})- -- copy rule (down)- _tlOo_case =- ({-# LINE 117 "Order.ag" #-}- _lhsIo_case- {-# LINE 4785 "Order.hs" #-})- -- copy rule (down)- _tlOo_cata =- ({-# LINE 111 "Order.ag" #-}- _lhsIo_cata- {-# LINE 4790 "Order.hs" #-})- -- copy rule (down)- _tlOo_dovisit =- ({-# LINE 116 "Order.ag" #-}- _lhsIo_dovisit- {-# LINE 4795 "Order.hs" #-})- -- copy rule (down)- _tlOo_newtypes =- ({-# LINE 110 "Order.ag" #-}- _lhsIo_newtypes- {-# LINE 4800 "Order.hs" #-})- -- copy rule (down)- _tlOo_rename =- ({-# LINE 114 "Order.ag" #-}- _lhsIo_rename- {-# LINE 4805 "Order.hs" #-})- -- copy rule (down)- _tlOo_sem =- ({-# LINE 113 "Order.ag" #-}- _lhsIo_sem- {-# LINE 4810 "Order.hs" #-})- -- copy rule (down)- _tlOo_sig =- ({-# LINE 112 "Order.ag" #-}- _lhsIo_sig- {-# LINE 4815 "Order.hs" #-})- -- copy rule (down)- _tlOo_wantvisit =- ({-# LINE 115 "Order.ag" #-}- _lhsIo_wantvisit- {-# LINE 4820 "Order.hs" #-})- -- copy rule (down)- _tlOprefix =- ({-# LINE 118 "Order.ag" #-}- _lhsIprefix- {-# LINE 4825 "Order.hs" #-})- -- copy rule (down)- _tlOsyn =- ({-# LINE 89 "Order.ag" #-}- _lhsIsyn- {-# LINE 4830 "Order.hs" #-})- -- copy rule (down)- _tlOsynsOfChildren =- ({-# LINE 339 "Order.ag" #-}- _lhsIsynsOfChildren- {-# LINE 4835 "Order.hs" #-})- ( _hdIdirectDep,_hdIerrors,_hdIgathAltAttrs,_hdIgathRules,_hdIinstDep,_hdIinstVars,_hdIlocVars,_hdInAutoRules,_hdInExplicitRules) =- (hd_ _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 )- ( _tlIdirectDep,_tlIerrors,_tlIgathAltAttrs,_tlIgathRules,_tlIinstDep,_tlIinstVars,_tlIlocVars,_tlInAutoRules,_tlInExplicitRules) =- (tl_ _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 )- in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil =- (T_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 ->- (let _lhsOdirectDep :: (Seq Edge)- _lhsOerrors :: (Seq Error)- _lhsOgathAltAttrs :: ([AltAttr])- _lhsOgathRules :: (Seq CRule)- _lhsOinstDep :: (Seq Edge)- _lhsOinstVars :: ([Identifier])- _lhsOlocVars :: ([Identifier])- _lhsOnAutoRules :: Int- _lhsOnExplicitRules :: Int- -- use rule "Order.ag"(line 269, column 33)- _lhsOdirectDep =- ({-# LINE 269 "Order.ag" #-}- Seq.empty- {-# LINE 4879 "Order.hs" #-})- -- use rule "Order.ag"(line 84, column 70)- _lhsOerrors =- ({-# LINE 84 "Order.ag" #-}- Seq.empty- {-# LINE 4884 "Order.hs" #-})- -- use rule "Order.ag"(line 170, column 68)- _lhsOgathAltAttrs =- ({-# LINE 170 "Order.ag" #-}- []- {-# LINE 4889 "Order.hs" #-})- -- use rule "Order.ag"(line 206, column 23)- _lhsOgathRules =- ({-# LINE 206 "Order.ag" #-}- Seq.empty- {-# LINE 4894 "Order.hs" #-})- -- use rule "Order.ag"(line 312, column 31)- _lhsOinstDep =- ({-# LINE 312 "Order.ag" #-}- Seq.empty- {-# LINE 4899 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 86)- _lhsOinstVars =- ({-# LINE 677 "Order.ag" #-}- []- {-# LINE 4904 "Order.hs" #-})- -- use rule "Order.ag"(line 677, column 48)- _lhsOlocVars =- ({-# LINE 677 "Order.ag" #-}- []- {-# LINE 4909 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnAutoRules =- ({-# LINE 61 "Order.ag" #-}- 0- {-# LINE 4914 "Order.hs" #-})- -- use rule "Order.ag"(line 61, column 105)- _lhsOnExplicitRules =- ({-# LINE 61 "Order.ag" #-}- 0- {-# LINE 4919 "Order.hs" #-})- in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))) )--- TypeSig ------------------------------------------------------{-- visit 0:- chained attribute:- typeSigs : Map Identifier Type- alternatives:- alternative TypeSig:- child name : {Identifier}- child tp : {Type}--}--- cata-sem_TypeSig :: TypeSig ->- T_TypeSig -sem_TypeSig (TypeSig _name _tp ) =- (sem_TypeSig_TypeSig _name _tp )--- semantic domain-newtype T_TypeSig = T_TypeSig ((Map Identifier Type) ->- ( (Map Identifier Type)))-data Inh_TypeSig = Inh_TypeSig {typeSigs_Inh_TypeSig :: !((Map Identifier Type))}-data Syn_TypeSig = Syn_TypeSig {typeSigs_Syn_TypeSig :: !((Map Identifier Type))}-wrap_TypeSig :: T_TypeSig ->- Inh_TypeSig ->- Syn_TypeSig -wrap_TypeSig (T_TypeSig sem ) (Inh_TypeSig _lhsItypeSigs ) =- (let ( _lhsOtypeSigs) =- (sem _lhsItypeSigs )- in (Syn_TypeSig _lhsOtypeSigs ))-sem_TypeSig_TypeSig :: Identifier ->- Type ->- T_TypeSig -sem_TypeSig_TypeSig name_ tp_ =- (T_TypeSig (\ _lhsItypeSigs ->- (let _lhsOtypeSigs :: (Map Identifier Type)- -- "Order.ag"(line 531, column 13)- _lhsOtypeSigs =- ({-# LINE 531 "Order.ag" #-}- Map.insert name_ tp_ _lhsItypeSigs- {-# LINE 4958 "Order.hs" #-})- in ( _lhsOtypeSigs))) )--- TypeSigs -----------------------------------------------------{-- visit 0:- chained attribute:- typeSigs : Map Identifier Type- alternatives:- alternative Cons:- child hd : TypeSig - child tl : TypeSigs - alternative Nil:--}--- cata-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 ((Map Identifier Type) ->- ( (Map Identifier Type)))-data Inh_TypeSigs = Inh_TypeSigs {typeSigs_Inh_TypeSigs :: !((Map Identifier Type))}-data Syn_TypeSigs = Syn_TypeSigs {typeSigs_Syn_TypeSigs :: !((Map Identifier Type))}-wrap_TypeSigs :: T_TypeSigs ->- Inh_TypeSigs ->- Syn_TypeSigs -wrap_TypeSigs (T_TypeSigs sem ) (Inh_TypeSigs _lhsItypeSigs ) =- (let ( _lhsOtypeSigs) =- (sem _lhsItypeSigs )- in (Syn_TypeSigs _lhsOtypeSigs ))-sem_TypeSigs_Cons :: T_TypeSig ->- T_TypeSigs ->- T_TypeSigs -sem_TypeSigs_Cons (T_TypeSig hd_ ) (T_TypeSigs tl_ ) =- (T_TypeSigs (\ _lhsItypeSigs ->- (let _lhsOtypeSigs :: (Map Identifier Type)- _hdOtypeSigs :: (Map Identifier Type)- _tlOtypeSigs :: (Map Identifier Type)- _hdItypeSigs :: (Map Identifier Type)- _tlItypeSigs :: (Map Identifier Type)- -- copy rule (up)- _lhsOtypeSigs =- ({-# LINE 527 "Order.ag" #-}- _tlItypeSigs- {-# LINE 5002 "Order.hs" #-})- -- copy rule (down)- _hdOtypeSigs =- ({-# LINE 527 "Order.ag" #-}- _lhsItypeSigs- {-# LINE 5007 "Order.hs" #-})- -- copy rule (chain)- _tlOtypeSigs =- ({-# LINE 527 "Order.ag" #-}- _hdItypeSigs- {-# LINE 5012 "Order.hs" #-})- ( _hdItypeSigs) =- (hd_ _hdOtypeSigs )- ( _tlItypeSigs) =- (tl_ _tlOtypeSigs )- in ( _lhsOtypeSigs))) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (\ _lhsItypeSigs ->- (let _lhsOtypeSigs :: (Map Identifier Type)- -- copy rule (chain)- _lhsOtypeSigs =- ({-# LINE 527 "Order.ag" #-}- _lhsItypeSigs- {-# LINE 5026 "Order.hs" #-})+-- UUAGC 0.9.30 (Order.ag)+module Order where+{-# LINE 9 "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 Maybe+{-# LINE 42 "../src-derived/Order.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 49 "../src-derived/Order.hs" #-}++{-# LINE 2 "./Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 55 "../src-derived/Order.hs" #-}++{-# LINE 2 "./AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import CommonTypes+{-# LINE 65 "../src-derived/Order.hs" #-}+{-# LINE 46 "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 76 "../src-derived/Order.hs" #-}++{-# LINE 71 "Order.ag" #-}++startsWith :: String -> String -> Bool+startsWith k h = k == take (length k) h+{-# LINE 82 "../src-derived/Order.hs" #-}++{-# LINE 138 "Order.ag" #-}++getNtName :: Type -> NontermIdent+getNtName (NT nt _) = maybe nt id (deforestedNt nt)+getNtName _ = nullIdent+{-# LINE 89 "../src-derived/Order.hs" #-}++{-# LINE 166 "Order.ag" #-}++data AltAttr = AltAttr Identifier Identifier Bool + deriving (Eq, Ord, Show)+{-# LINE 95 "../src-derived/Order.hs" #-}++{-# LINE 238 "Order.ag" #-}++substSelf nt tp+ = case tp of+ NT n tps | n == _SELF -> NT nt tps+ _ -> tp+ +haskellTupel :: [Type] -> Maybe Type+haskellTupel ts = Just ( Haskell ( '(' : (concat (intersperse "," (map show ts))) ++ ")" ))+{-# LINE 106 "../src-derived/Order.hs" #-}++{-# LINE 687 "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 226 "../src-derived/Order.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,Maybe (Maybe Type))]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ inh : Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ o_unbox : Bool+ syn : Attributes+ synthesized attributes:+ attributes : [(Identifier,Attributes,Attributes)]+ collectChildrenInhs : Map Identifier Attributes + collectChildrenSyns : Map Identifier Attributes + errors : Seq Error+ field : (Identifier,Type,Maybe (Maybe Type))+ gathAltAttrs : [AltAttr]+ gathRules : Seq CRule+ inhs : Seq (Identifier,Attributes)+ nts : Seq (Identifier,NontermIdent)+ singlevisits : [CRule]+ terminals : [Identifier]+ alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child inh : {Attributes}+ child syn : {Attributes}+ child virtual : {Maybe (Maybe Type)}+ visit 0:+ local maptolocal : _+ local gathRules : _+-}+-- cata+sem_Child :: Child ->+ T_Child +sem_Child (Child _name _tp _inh _syn _virtual ) =+ (sem_Child_Child _name _tp _inh _syn _virtual )+-- semantic domain+newtype T_Child = T_Child (([(Identifier,Type,Maybe (Maybe Type))]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ Attributes ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Bool ->+ Attributes ->+ ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),((Identifier,Type,Maybe (Maybe Type))),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))+data Inh_Child = Inh_Child {allfields_Inh_Child :: !(([(Identifier,Type,Maybe (Maybe Type))])),allnts_Inh_Child :: !(([Identifier])),attrs_Inh_Child :: !(([(Identifier,Identifier)])),con_Inh_Child :: !(Identifier),inh_Inh_Child :: !(Attributes),mergeMap_Inh_Child :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Child :: !(Identifier),o_unbox_Inh_Child :: !(Bool),syn_Inh_Child :: !(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,Maybe (Maybe Type)))),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]))}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child +wrap_Child (T_Child sem ) (Inh_Child _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn ) =+ (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn + in (Syn_Child _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals ))+sem_Child_Child :: Identifier ->+ Type ->+ Attributes ->+ Attributes ->+ (Maybe (Maybe Type)) ->+ T_Child +sem_Child_Child name_ tp_ inh_ syn_ virtual_ =+ (T_Child (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsImergeMap+ _lhsInt+ _lhsIo_unbox+ _lhsIsyn ->+ (let _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOnts :: (Seq (Identifier,NontermIdent))+ _lhsOinhs :: (Seq (Identifier,Attributes))+ _lhsOcollectChildrenSyns :: (Map Identifier Attributes )+ _lhsOcollectChildrenInhs :: (Map Identifier Attributes )+ _lhsOsinglevisits :: ([CRule])+ _lhsOterminals :: ([Identifier])+ _lhsOattributes :: ([(Identifier,Attributes,Attributes)])+ _lhsOfield :: ((Identifier,Type,Maybe (Maybe Type)))+ _lhsOerrors :: (Seq Error)+ _lhsOgathRules :: (Seq CRule)+ -- "Order.ag"(line 177, column 13)+ _maptolocal =+ ({-# LINE 177 "Order.ag" #-}+ case tp_ of+ NT nt _ -> Map.null syn_+ _ -> True+ {-# LINE 320 "Order.hs" #-})+ -- "Order.ag"(line 180, column 13)+ _lhsOgathAltAttrs =+ ({-# LINE 180 "Order.ag" #-}+ if _maptolocal+ then [ AltAttr _LOC name_ True ]+ else [ AltAttr name_ syn True | syn <- Map.keys syn_ ]+ {-# LINE 327 "Order.hs" #-})+ -- "Order.ag"(line 195, column 13)+ _lhsOnts =+ ({-# LINE 195 "Order.ag" #-}+ Seq.singleton (name_,getNtName tp_)+ {-# LINE 332 "Order.hs" #-})+ -- "Order.ag"(line 196, column 13)+ _lhsOinhs =+ ({-# LINE 196 "Order.ag" #-}+ Seq.singleton (name_,inh_)+ {-# LINE 337 "Order.hs" #-})+ -- "Order.ag"(line 212, column 13)+ _gathRules =+ ({-# LINE 212 "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 344 "Order.hs" #-})+ -- "Order.ag"(line 346, column 12)+ _lhsOcollectChildrenSyns =+ ({-# LINE 346 "Order.ag" #-}+ Map.singleton name_ syn_+ {-# LINE 349 "Order.hs" #-})+ -- "Order.ag"(line 347, column 12)+ _lhsOcollectChildrenInhs =+ ({-# LINE 347 "Order.ag" #-}+ Map.singleton name_ inh_+ {-# LINE 354 "Order.hs" #-})+ -- "Order.ag"(line 613, column 11)+ _lhsOsinglevisits =+ ({-# LINE 613 "Order.ag" #-}+ if _maptolocal+ then []+ else [CChildVisit name_ (getNtName tp_) 0 inh_ syn_ True]+ {-# LINE 361 "Order.hs" #-})+ -- "Order.ag"(line 638, column 11)+ _lhsOterminals =+ ({-# LINE 638 "Order.ag" #-}+ if _maptolocal+ then [name_]+ else []+ {-# LINE 368 "Order.hs" #-})+ -- "Order.ag"(line 667, column 11)+ _lhsOattributes =+ ({-# LINE 667 "Order.ag" #-}+ [(name_, inh_, syn_)]+ {-# LINE 373 "Order.hs" #-})+ -- "Order.ag"(line 671, column 11)+ _lhsOfield =+ ({-# LINE 671 "Order.ag" #-}+ (name_, tp_, virtual_)+ {-# LINE 378 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ Seq.empty+ {-# LINE 383 "Order.hs" #-})+ -- use rule "Order.ag"(line 206, column 23)+ _lhsOgathRules =+ ({-# LINE 206 "Order.ag" #-}+ _gathRules+ {-# LINE 388 "Order.hs" #-})+ in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )+-- Children ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,Maybe (Maybe Type))]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ inh : Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ o_unbox : Bool+ syn : Attributes+ synthesized attributes:+ attributes : [(Identifier,Attributes,Attributes)]+ collectChildrenInhs : Map Identifier Attributes + collectChildrenSyns : Map Identifier Attributes + errors : Seq Error+ fields : [(Identifier,Type,Maybe (Maybe Type))]+ gathAltAttrs : [AltAttr]+ gathRules : Seq CRule+ inhs : Seq (Identifier,Attributes)+ nts : Seq (Identifier,NontermIdent)+ singlevisits : [CRule]+ terminals : [Identifier]+ alternatives:+ alternative Cons:+ child hd : Child + child tl : Children + alternative Nil:+-}+-- cata+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 (([(Identifier,Type,Maybe (Maybe Type))]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ Attributes ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ Bool ->+ Attributes ->+ ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),([(Identifier,Type,Maybe (Maybe Type))]),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))+data Inh_Children = Inh_Children {allfields_Inh_Children :: !(([(Identifier,Type,Maybe (Maybe Type))])),allnts_Inh_Children :: !(([Identifier])),attrs_Inh_Children :: !(([(Identifier,Identifier)])),con_Inh_Children :: !(Identifier),inh_Inh_Children :: !(Attributes),mergeMap_Inh_Children :: !((Map Identifier (Identifier,[Identifier]))),nt_Inh_Children :: !(Identifier),o_unbox_Inh_Children :: !(Bool),syn_Inh_Children :: !(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,Maybe (Maybe Type))])),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]))}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children +wrap_Children (T_Children sem ) (Inh_Children _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn ) =+ (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn + in (Syn_Children _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals ))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children +sem_Children_Cons (T_Child hd_ ) (T_Children tl_ ) =+ (T_Children (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsImergeMap+ _lhsInt+ _lhsIo_unbox+ _lhsIsyn ->+ (let _lhsOfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _lhsOattributes :: ([(Identifier,Attributes,Attributes)])+ _lhsOcollectChildrenInhs :: (Map Identifier Attributes )+ _lhsOcollectChildrenSyns :: (Map Identifier Attributes )+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinhs :: (Seq (Identifier,Attributes))+ _lhsOnts :: (Seq (Identifier,NontermIdent))+ _lhsOsinglevisits :: ([CRule])+ _lhsOterminals :: ([Identifier])+ _hdOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _hdOallnts :: ([Identifier])+ _hdOattrs :: ([(Identifier,Identifier)])+ _hdOcon :: Identifier+ _hdOinh :: Attributes+ _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _hdOnt :: Identifier+ _hdOo_unbox :: Bool+ _hdOsyn :: Attributes+ _tlOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _tlOallnts :: ([Identifier])+ _tlOattrs :: ([(Identifier,Identifier)])+ _tlOcon :: Identifier+ _tlOinh :: Attributes+ _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _tlOnt :: Identifier+ _tlOo_unbox :: Bool+ _tlOsyn :: Attributes+ _hdIattributes :: ([(Identifier,Attributes,Attributes)])+ _hdIcollectChildrenInhs :: (Map Identifier Attributes )+ _hdIcollectChildrenSyns :: (Map Identifier Attributes )+ _hdIerrors :: (Seq Error)+ _hdIfield :: ((Identifier,Type,Maybe (Maybe Type)))+ _hdIgathAltAttrs :: ([AltAttr])+ _hdIgathRules :: (Seq CRule)+ _hdIinhs :: (Seq (Identifier,Attributes))+ _hdInts :: (Seq (Identifier,NontermIdent))+ _hdIsinglevisits :: ([CRule])+ _hdIterminals :: ([Identifier])+ _tlIattributes :: ([(Identifier,Attributes,Attributes)])+ _tlIcollectChildrenInhs :: (Map Identifier Attributes )+ _tlIcollectChildrenSyns :: (Map Identifier Attributes )+ _tlIerrors :: (Seq Error)+ _tlIfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _tlIgathAltAttrs :: ([AltAttr])+ _tlIgathRules :: (Seq CRule)+ _tlIinhs :: (Seq (Identifier,Attributes))+ _tlInts :: (Seq (Identifier,NontermIdent))+ _tlIsinglevisits :: ([CRule])+ _tlIterminals :: ([Identifier])+ -- "Order.ag"(line 674, column 11)+ _lhsOfields =+ ({-# LINE 674 "Order.ag" #-}+ _hdIfield : _tlIfields+ {-# LINE 513 "Order.hs" #-})+ -- use rule "Order.ag"(line 665, column 32)+ _lhsOattributes =+ ({-# LINE 665 "Order.ag" #-}+ _hdIattributes ++ _tlIattributes+ {-# LINE 518 "Order.hs" #-})+ -- use rule "Order.ag"(line 344, column 68)+ _lhsOcollectChildrenInhs =+ ({-# LINE 344 "Order.ag" #-}+ _hdIcollectChildrenInhs `Map.union` _tlIcollectChildrenInhs+ {-# LINE 523 "Order.hs" #-})+ -- use rule "Order.ag"(line 344, column 68)+ _lhsOcollectChildrenSyns =+ ({-# LINE 344 "Order.ag" #-}+ _hdIcollectChildrenSyns `Map.union` _tlIcollectChildrenSyns+ {-# LINE 528 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 533 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ _hdIgathAltAttrs ++ _tlIgathAltAttrs+ {-# LINE 538 "Order.hs" #-})+ -- use rule "Order.ag"(line 206, column 23)+ _lhsOgathRules =+ ({-# LINE 206 "Order.ag" #-}+ _hdIgathRules Seq.>< _tlIgathRules+ {-# LINE 543 "Order.hs" #-})+ -- use rule "Order.ag"(line 193, column 20)+ _lhsOinhs =+ ({-# LINE 193 "Order.ag" #-}+ _hdIinhs Seq.>< _tlIinhs+ {-# LINE 548 "Order.hs" #-})+ -- use rule "Order.ag"(line 192, column 19)+ _lhsOnts =+ ({-# LINE 192 "Order.ag" #-}+ _hdInts Seq.>< _tlInts+ {-# LINE 553 "Order.hs" #-})+ -- use rule "Order.ag"(line 611, column 40)+ _lhsOsinglevisits =+ ({-# LINE 611 "Order.ag" #-}+ _hdIsinglevisits ++ _tlIsinglevisits+ {-# LINE 558 "Order.hs" #-})+ -- use rule "Order.ag"(line 636, column 38)+ _lhsOterminals =+ ({-# LINE 636 "Order.ag" #-}+ _hdIterminals ++ _tlIterminals+ {-# LINE 563 "Order.hs" #-})+ -- copy rule (down)+ _hdOallfields =+ ({-# LINE 654 "Order.ag" #-}+ _lhsIallfields+ {-# LINE 568 "Order.hs" #-})+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 573 "Order.hs" #-})+ -- copy rule (down)+ _hdOattrs =+ ({-# LINE 654 "Order.ag" #-}+ _lhsIattrs+ {-# LINE 578 "Order.hs" #-})+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 583 "Order.hs" #-})+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 588 "Order.hs" #-})+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 362 "Order.ag" #-}+ _lhsImergeMap+ {-# LINE 593 "Order.hs" #-})+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 598 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 119 "Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 603 "Order.hs" #-})+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 608 "Order.hs" #-})+ -- copy rule (down)+ _tlOallfields =+ ({-# LINE 654 "Order.ag" #-}+ _lhsIallfields+ {-# LINE 613 "Order.hs" #-})+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 618 "Order.hs" #-})+ -- copy rule (down)+ _tlOattrs =+ ({-# LINE 654 "Order.ag" #-}+ _lhsIattrs+ {-# LINE 623 "Order.hs" #-})+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 628 "Order.hs" #-})+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 633 "Order.hs" #-})+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 362 "Order.ag" #-}+ _lhsImergeMap+ {-# LINE 638 "Order.hs" #-})+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 643 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 119 "Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 648 "Order.hs" #-})+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 653 "Order.hs" #-})+ ( _hdIattributes,_hdIcollectChildrenInhs,_hdIcollectChildrenSyns,_hdIerrors,_hdIfield,_hdIgathAltAttrs,_hdIgathRules,_hdIinhs,_hdInts,_hdIsinglevisits,_hdIterminals) =+ hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOmergeMap _hdOnt _hdOo_unbox _hdOsyn + ( _tlIattributes,_tlIcollectChildrenInhs,_tlIcollectChildrenSyns,_tlIerrors,_tlIfields,_tlIgathAltAttrs,_tlIgathRules,_tlIinhs,_tlInts,_tlIsinglevisits,_tlIterminals) =+ tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOmergeMap _tlOnt _tlOo_unbox _tlOsyn + in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )+sem_Children_Nil :: T_Children +sem_Children_Nil =+ (T_Children (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsIinh+ _lhsImergeMap+ _lhsInt+ _lhsIo_unbox+ _lhsIsyn ->+ (let _lhsOfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _lhsOattributes :: ([(Identifier,Attributes,Attributes)])+ _lhsOcollectChildrenInhs :: (Map Identifier Attributes )+ _lhsOcollectChildrenSyns :: (Map Identifier Attributes )+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinhs :: (Seq (Identifier,Attributes))+ _lhsOnts :: (Seq (Identifier,NontermIdent))+ _lhsOsinglevisits :: ([CRule])+ _lhsOterminals :: ([Identifier])+ -- "Order.ag"(line 675, column 11)+ _lhsOfields =+ ({-# LINE 675 "Order.ag" #-}+ []+ {-# LINE 685 "Order.hs" #-})+ -- use rule "Order.ag"(line 665, column 32)+ _lhsOattributes =+ ({-# LINE 665 "Order.ag" #-}+ []+ {-# LINE 690 "Order.hs" #-})+ -- use rule "Order.ag"(line 344, column 68)+ _lhsOcollectChildrenInhs =+ ({-# LINE 344 "Order.ag" #-}+ Map.empty+ {-# LINE 695 "Order.hs" #-})+ -- use rule "Order.ag"(line 344, column 68)+ _lhsOcollectChildrenSyns =+ ({-# LINE 344 "Order.ag" #-}+ Map.empty+ {-# LINE 700 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ Seq.empty+ {-# LINE 705 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ []+ {-# LINE 710 "Order.hs" #-})+ -- use rule "Order.ag"(line 206, column 23)+ _lhsOgathRules =+ ({-# LINE 206 "Order.ag" #-}+ Seq.empty+ {-# LINE 715 "Order.hs" #-})+ -- use rule "Order.ag"(line 193, column 20)+ _lhsOinhs =+ ({-# LINE 193 "Order.ag" #-}+ Seq.empty+ {-# LINE 720 "Order.hs" #-})+ -- use rule "Order.ag"(line 192, column 19)+ _lhsOnts =+ ({-# LINE 192 "Order.ag" #-}+ Seq.empty+ {-# LINE 725 "Order.hs" #-})+ -- use rule "Order.ag"(line 611, column 40)+ _lhsOsinglevisits =+ ({-# LINE 611 "Order.ag" #-}+ []+ {-# LINE 730 "Order.hs" #-})+ -- use rule "Order.ag"(line 636, column 38)+ _lhsOterminals =+ ({-# LINE 636 "Order.ag" #-}+ []+ {-# LINE 735 "Order.hs" #-})+ in ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )+-- Expression --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allfields : [(Identifier,Type,Maybe (Maybe Type))]+ allnts : [Identifier]+ attrs : [(Identifier,Identifier)]+ con : Identifier+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ synthesized attributes:+ allRhsVars : Set (Identifier,Identifier)+ copy : SELF + errors : Seq Error+ textLines : [String]+ usedAttrs : [(Identifier,Identifier)]+ usedFields : [Identifier]+ usedLocals : [Identifier]+ alternatives:+ alternative Expression:+ child pos : {Pos}+ child tks : {[HsToken]}+ visit 0:+ local _tup1 : _+ local errors : _+ local textLines : _+ local usedAttrs : _+ local usedLocals : _+ local usedFields : _+ local copy : _+-}+-- cata+sem_Expression :: Expression ->+ T_Expression +sem_Expression (Expression _pos _tks ) =+ (sem_Expression_Expression _pos _tks )+-- semantic domain+newtype T_Expression = T_Expression (([(Identifier,Type,Maybe (Maybe Type))]) ->+ ([Identifier]) ->+ ([(Identifier,Identifier)]) ->+ Identifier ->+ (Map Identifier (Identifier,[Identifier])) ->+ Identifier ->+ ( (Set (Identifier,Identifier)),Expression ,(Seq Error),([String]),([(Identifier,Identifier)]),([Identifier]),([Identifier])))+data Inh_Expression = Inh_Expression {allfields_Inh_Expression :: !(([(Identifier,Type,Maybe (Maybe Type))])),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]))}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression +wrap_Expression (T_Expression sem ) (Inh_Expression _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt ) =+ (let ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt + in (Syn_Expression _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals ))+sem_Expression_Expression :: Pos ->+ ([HsToken]) ->+ T_Expression +sem_Expression_Expression pos_ tks_ =+ (T_Expression (\ _lhsIallfields+ _lhsIallnts+ _lhsIattrs+ _lhsIcon+ _lhsImergeMap+ _lhsInt ->+ (let _lhsOallRhsVars :: (Set (Identifier,Identifier))+ _lhsOcopy :: Expression + _lhsOerrors :: (Seq Error)+ _lhsOtextLines :: ([String])+ _lhsOusedAttrs :: ([(Identifier,Identifier)])+ _lhsOusedFields :: ([Identifier])+ _lhsOusedLocals :: ([Identifier])+ -- "Order.ag"(line 464, column 21)+ __tup1 =+ ({-# LINE 464 "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+ { errors_Syn_HsTokensRoot = errors+ , 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 (errors,textLines,usedAttrs',usedLocals,usedFields)+ {-# LINE 831 "Order.hs" #-})+ -- "Order.ag"(line 464, column 21)+ (_errors,_,_,_,_) =+ ({-# LINE 464 "Order.ag" #-}+ __tup1+ {-# LINE 836 "Order.hs" #-})+ -- "Order.ag"(line 464, column 21)+ (_,_textLines,_,_,_) =+ ({-# LINE 464 "Order.ag" #-}+ __tup1+ {-# LINE 841 "Order.hs" #-})+ -- "Order.ag"(line 464, column 21)+ (_,_,_usedAttrs,_,_) =+ ({-# LINE 464 "Order.ag" #-}+ __tup1+ {-# LINE 846 "Order.hs" #-})+ -- "Order.ag"(line 464, column 21)+ (_,_,_,_usedLocals,_) =+ ({-# LINE 464 "Order.ag" #-}+ __tup1+ {-# LINE 851 "Order.hs" #-})+ -- "Order.ag"(line 464, column 21)+ (_,_,_,_,_usedFields) =+ ({-# LINE 464 "Order.ag" #-}+ __tup1+ {-# LINE 856 "Order.hs" #-})+ -- "Order.ag"(line 488, column 17)+ _lhsOallRhsVars =+ ({-# LINE 488 "Order.ag" #-}+ Set.fromList _usedAttrs+ `Set.union`+ Set.fromList [ (_LOC, l) | l <- _usedLocals ]+ `Set.union`+ Set.fromList [ (_FIELD, fld) | fld <- _usedFields ]+ {-# LINE 865 "Order.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 457 "Order.ag" #-}+ Expression pos_ tks_+ {-# LINE 870 "Order.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 457 "Order.ag" #-}+ _copy+ {-# LINE 875 "Order.hs" #-})+ -- copy rule (from local)+ _lhsOerrors =+ ({-# LINE 452 "Order.ag" #-}+ _errors+ {-# LINE 880 "Order.hs" #-})+ -- copy rule (from local)+ _lhsOtextLines =+ ({-# LINE 456 "Order.ag" #-}+ _textLines+ {-# LINE 885 "Order.hs" #-})+ -- copy rule (from local)+ _lhsOusedAttrs =+ ({-# LINE 454 "Order.ag" #-}+ _usedAttrs+ {-# LINE 890 "Order.hs" #-})+ -- copy rule (from local)+ _lhsOusedFields =+ ({-# LINE 455 "Order.ag" #-}+ _usedFields+ {-# LINE 895 "Order.hs" #-})+ -- copy rule (from local)+ _lhsOusedLocals =+ ({-# LINE 453 "Order.ag" #-}+ _usedLocals+ {-# LINE 900 "Order.hs" #-})+ in ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ errors : Seq Error+ nAutoRules : Int+ nExplicitRules : Int+ output : CGrammar+ alternatives:+ alternative Grammar:+ child typeSyns : {TypeSyns}+ child useMap : {UseMap}+ child derivings : {Derivings}+ child wrappers : {Set NontermIdent}+ child nonts : Nonterminals + child pragmas : {PragmaMap}+ child manualAttrOrderMap : {AttrOrderMap}+ child paramMap : {ParamMap}+ child contextMap : {ContextMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))}+ visit 0:+ local o_dovisit : _+ local ruleTable : _+ local attrTable : _+ local attrVertex : _+ local tdpToTds : _+ local tdsToTdp : _+ local directDep : _+ local instDep : _+ local aroundDep : _+ local mergeDep : _+ local info : _+ local _tup2 : _+ local cInterfaceMap : _+ local cVisitsMap : _+ local cyclesErrors : _+ local aroundMap : _+ local mergeMap : _+-}+-- cata+sem_Grammar :: Grammar ->+ T_Grammar +sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap ) =+ (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap _mergeMap )+-- semantic domain+newtype T_Grammar = T_Grammar (Options ->+ ( (Seq Error),Int,Int,CGrammar))+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)}+wrap_Grammar :: T_Grammar ->+ Inh_Grammar ->+ Syn_Grammar +wrap_Grammar (T_Grammar sem ) (Inh_Grammar _lhsIoptions ) =+ (let ( _lhsOerrors,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOoutput) = sem _lhsIoptions + in (Syn_Grammar _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput ))+sem_Grammar_Grammar :: TypeSyns ->+ UseMap ->+ Derivings ->+ (Set NontermIdent) ->+ T_Nonterminals ->+ PragmaMap ->+ AttrOrderMap ->+ ParamMap ->+ ContextMap ->+ UniqueMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->+ T_Grammar +sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ =+ (T_Grammar (\ _lhsIoptions ->+ (let _nontsOo_cata :: Bool+ _nontsOo_data :: Bool+ _nontsOo_sig :: Bool+ _nontsOo_sem :: Bool+ _nontsOo_rename :: Bool+ _nontsOo_newtypes :: Bool+ _nontsOo_wantvisit :: Bool+ _nontsOo_unbox :: Bool+ _nontsOo_case :: Bool+ _nontsOprefix :: String+ _nontsOvcount :: Int+ _nontsOmanualAttrDepMap :: AttrOrderMap+ _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))+ _nontsOacount :: Int+ _lhsOerrors :: (Seq Error)+ _lhsOoutput :: CGrammar+ _nontsOallnts :: ([Identifier])+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _nontsOcInterfaceMap :: CInterfaceMap+ _nontsOcVisitsMap :: CVisitsMap+ _nontsOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))+ _nontsOo_dovisit :: Bool+ _nontsIacount :: Int+ _nontsIadditionalDep :: (Seq Edge)+ _nontsIaranges :: (Seq (Int,Int,Int))+ _nontsIaroundDep :: (Seq Edge)+ _nontsIcNonterminals :: CNonterminals+ _nontsIdirectDep :: (Seq Edge)+ _nontsIerrors :: (Seq Error)+ _nontsIinstDep :: (Seq Edge)+ _nontsImergeDep :: (Seq Edge)+ _nontsInAutoRules :: Int+ _nontsInExplicitRules :: Int+ _nontsInonts :: ([(NontermIdent,[ConstructorIdent])])+ _nontsIntattrs :: (Seq (Vertex,NTAttr))+ _nontsIrules :: (Seq (Vertex,CRule))+ _nontsIvcount :: Int+ -- "Order.ag"(line 123, column 17)+ _o_dovisit =+ ({-# LINE 123 "Order.ag" #-}+ visit _lhsIoptions && null _cyclesErrors+ {-# LINE 1020 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOo_cata =+ ({-# LINE 124 "Order.ag" #-}+ folds _lhsIoptions+ {-# LINE 1025 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOo_data =+ ({-# LINE 125 "Order.ag" #-}+ dataTypes _lhsIoptions+ {-# LINE 1030 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOo_sig =+ ({-# LINE 126 "Order.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 1035 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOo_sem =+ ({-# LINE 127 "Order.ag" #-}+ semfuns _lhsIoptions+ {-# LINE 1040 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOo_rename =+ ({-# LINE 128 "Order.ag" #-}+ rename _lhsIoptions+ {-# LINE 1045 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOo_newtypes =+ ({-# LINE 129 "Order.ag" #-}+ newtypes _lhsIoptions+ {-# LINE 1050 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOo_wantvisit =+ ({-# LINE 130 "Order.ag" #-}+ visit _lhsIoptions+ {-# LINE 1055 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOo_unbox =+ ({-# LINE 131 "Order.ag" #-}+ unbox _lhsIoptions+ {-# LINE 1060 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOo_case =+ ({-# LINE 132 "Order.ag" #-}+ cases _lhsIoptions+ {-# LINE 1065 "Order.hs" #-})+ -- "Order.ag"(line 124, column 17)+ _nontsOprefix =+ ({-# LINE 133 "Order.ag" #-}+ prefix _lhsIoptions+ {-# LINE 1070 "Order.hs" #-})+ -- "Order.ag"(line 261, column 15)+ _nontsOvcount =+ ({-# LINE 261 "Order.ag" #-}+ 0+ {-# LINE 1075 "Order.hs" #-})+ -- "Order.ag"(line 287, column 7)+ _nontsOmanualAttrDepMap =+ ({-# LINE 287 "Order.ag" #-}+ manualAttrOrderMap_+ {-# LINE 1080 "Order.hs" #-})+ -- "Order.ag"(line 416, column 14)+ _nontsOaroundMap =+ ({-# LINE 416 "Order.ag" #-}+ aroundsMap_+ {-# LINE 1085 "Order.hs" #-})+ -- "Order.ag"(line 503, column 13)+ _nontsOacount =+ ({-# LINE 503 "Order.ag" #-}+ 0+ {-# LINE 1090 "Order.hs" #-})+ -- "Order.ag"(line 541, column 13)+ _ruleTable =+ ({-# LINE 541 "Order.ag" #-}+ Array.array (0,_nontsIvcount-1) (toList _nontsIrules)+ {-# LINE 1095 "Order.hs" #-})+ -- "Order.ag"(line 542, column 13)+ _attrTable =+ ({-# LINE 542 "Order.ag" #-}+ Array.array (0,_nontsIacount-1) (toList _nontsIntattrs)+ {-# LINE 1100 "Order.hs" #-})+ -- "Order.ag"(line 543, column 13)+ _attrVertex =+ ({-# LINE 543 "Order.ag" #-}+ Map.fromList (map swap (toList _nontsIntattrs))+ {-# LINE 1105 "Order.hs" #-})+ -- "Order.ag"(line 544, column 13)+ _tdpToTds =+ ({-# LINE 544 "Order.ag" #-}+ [ (s, maybe (-1) (\v -> findWithErr1 "Grammar.tdpToTds" v _attrVertex) (ntattr cr))+ | (s,cr) <- toList _nontsIrules]+ {-# LINE 1111 "Order.hs" #-})+ -- "Order.ag"(line 546, column 13)+ _tdsToTdp =+ ({-# LINE 546 "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 1119 "Order.hs" #-})+ -- "Order.ag"(line 550, column 13)+ _directDep =+ ({-# LINE 550 "Order.ag" #-}+ toList (_nontsIdirectDep Seq.>< _nontsIadditionalDep)+ {-# LINE 1124 "Order.hs" #-})+ -- "Order.ag"(line 551, column 13)+ _instDep =+ ({-# LINE 551 "Order.ag" #-}+ toList _nontsIinstDep+ {-# LINE 1129 "Order.hs" #-})+ -- "Order.ag"(line 552, column 13)+ _aroundDep =+ ({-# LINE 552 "Order.ag" #-}+ toList _nontsIaroundDep+ {-# LINE 1134 "Order.hs" #-})+ -- "Order.ag"(line 553, column 13)+ _mergeDep =+ ({-# LINE 553 "Order.ag" #-}+ toList _nontsImergeDep+ {-# LINE 1139 "Order.hs" #-})+ -- "Order.ag"(line 554, column 13)+ _info =+ ({-# LINE 554 "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 1153 "Order.hs" #-})+ -- "Order.ag"(line 565, column 17)+ __tup2 =+ ({-# LINE 565 "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 1178 "Order.hs" #-})+ -- "Order.ag"(line 565, column 17)+ (_cInterfaceMap,_,_) =+ ({-# LINE 565 "Order.ag" #-}+ __tup2+ {-# LINE 1183 "Order.hs" #-})+ -- "Order.ag"(line 565, column 17)+ (_,_cVisitsMap,_) =+ ({-# LINE 565 "Order.ag" #-}+ __tup2+ {-# LINE 1188 "Order.hs" #-})+ -- "Order.ag"(line 565, column 17)+ (_,_,_cyclesErrors) =+ ({-# LINE 565 "Order.ag" #-}+ __tup2+ {-# LINE 1193 "Order.hs" #-})+ -- "Order.ag"(line 587, column 13)+ _lhsOerrors =+ ({-# LINE 587 "Order.ag" #-}+ (if withCycle _lhsIoptions then Seq.fromList _cyclesErrors else Seq.empty)+ Seq.>< _nontsIerrors+ {-# LINE 1199 "Order.hs" #-})+ -- "Order.ag"(line 619, column 15)+ _lhsOoutput =+ ({-# LINE 619 "Order.ag" #-}+ CGrammar typeSyns_ derivings_ wrappers_ _nontsIcNonterminals pragmas_ paramMap_ contextMap_ _aroundMap _mergeMap _o_dovisit+ {-# LINE 1204 "Order.hs" #-})+ -- "Order.ag"(line 632, column 14)+ _aroundMap =+ ({-# LINE 632 "Order.ag" #-}+ Map.map (Map.map Map.keysSet) aroundsMap_+ {-# LINE 1209 "Order.hs" #-})+ -- "Order.ag"(line 633, column 14)+ _mergeMap =+ ({-# LINE 633 "Order.ag" #-}+ Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_+ {-# LINE 1214 "Order.hs" #-})+ -- "Order.ag"(line 650, column 13)+ _nontsOallnts =+ ({-# LINE 650 "Order.ag" #-}+ map fst (_nontsInonts)+ {-# LINE 1219 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnAutoRules =+ ({-# LINE 61 "Order.ag" #-}+ _nontsInAutoRules+ {-# LINE 1224 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 61 "Order.ag" #-}+ _nontsInExplicitRules+ {-# LINE 1229 "Order.hs" #-})+ -- copy rule (from local)+ _nontsOcInterfaceMap =+ ({-# LINE 594 "Order.ag" #-}+ _cInterfaceMap+ {-# LINE 1234 "Order.hs" #-})+ -- copy rule (from local)+ _nontsOcVisitsMap =+ ({-# LINE 601 "Order.ag" #-}+ _cVisitsMap+ {-# LINE 1239 "Order.hs" #-})+ -- copy rule (from local)+ _nontsOmergeMap =+ ({-# LINE 354 "Order.ag" #-}+ _mergeMap+ {-# LINE 1244 "Order.hs" #-})+ -- copy rule (from local)+ _nontsOo_dovisit =+ ({-# LINE 116 "Order.ag" #-}+ _o_dovisit+ {-# LINE 1249 "Order.hs" #-})+ ( _nontsIacount,_nontsIadditionalDep,_nontsIaranges,_nontsIaroundDep,_nontsIcNonterminals,_nontsIdirectDep,_nontsIerrors,_nontsIinstDep,_nontsImergeDep,_nontsInAutoRules,_nontsInExplicitRules,_nontsInonts,_nontsIntattrs,_nontsIrules,_nontsIvcount) =+ nonts_ _nontsOacount _nontsOallnts _nontsOaroundMap _nontsOcInterfaceMap _nontsOcVisitsMap _nontsOmanualAttrDepMap _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_data _nontsOo_dovisit _nontsOo_newtypes _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_unbox _nontsOo_wantvisit _nontsOprefix _nontsOvcount + in ( _lhsOerrors,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOoutput))) )+-- Nonterminal -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ cInterfaceMap : CInterfaceMap+ cVisitsMap : CVisitsMap+ manualAttrDepMap : AttrOrderMap+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ o_case : Bool+ o_cata : Bool+ o_data : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_unbox : Bool+ o_wantvisit : Bool+ prefix : String+ chained attributes:+ acount : Int+ vcount : Int+ synthesized attributes:+ additionalDep : Seq Edge+ aranges : Seq (Int,Int,Int)+ aroundDep : Seq Edge+ cNonterminal : CNonterminal+ directDep : Seq Edge+ errors : Seq Error+ instDep : Seq Edge+ mergeDep : Seq Edge+ nAutoRules : Int+ nExplicitRules : Int+ nonts : [(NontermIdent,[ConstructorIdent])]+ ntattrs : Seq (Vertex,NTAttr)+ rules : Seq (Vertex,CRule)+ alternatives:+ alternative Nonterminal:+ child nt : {NontermIdent}+ child params : {[Identifier]}+ child inh : {Attributes}+ child syn : {Attributes}+ child prods : Productions + visit 0:+ local mergeMap : _+ local aroundMap : _+ local ntattrs : _+ local cInter : _+-}+-- cata+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 (Int ->+ ([Identifier]) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ CInterfaceMap ->+ CVisitsMap ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ Int ->+ ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminal,(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),Int))+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),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),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)),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))),vcount_Syn_Nonterminal :: !(Int)}+wrap_Nonterminal :: T_Nonterminal ->+ Inh_Nonterminal ->+ Syn_Nonterminal +wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIvcount ) =+ (let ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount) = sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIvcount + in (Syn_Nonterminal _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOvcount ))+sem_Nonterminal_Nonterminal :: NontermIdent ->+ ([Identifier]) ->+ Attributes ->+ Attributes ->+ T_Productions ->+ T_Nonterminal +sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ (T_Productions prods_ ) =+ (T_Nonterminal (\ _lhsIacount+ _lhsIallnts+ _lhsIaroundMap+ _lhsIcInterfaceMap+ _lhsIcVisitsMap+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_data+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIvcount ->+ (let _prodsOnt :: Identifier+ _prodsOinh :: Attributes+ _prodsOsyn :: Attributes+ _lhsOntattrs :: (Seq (Vertex,NTAttr))+ _lhsOacount :: Int+ _lhsOaranges :: (Seq (Int,Int,Int))+ _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+ _lhsOcNonterminal :: CNonterminal+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaroundDep :: (Seq Edge)+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOvcount :: Int+ _prodsOallnts :: ([Identifier])+ _prodsOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+ _prodsOcVisitsMap :: CVisitsMap+ _prodsOmanualAttrDepMap :: AttrOrderMap+ _prodsOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ _prodsOo_case :: Bool+ _prodsOo_cata :: Bool+ _prodsOo_dovisit :: Bool+ _prodsOo_newtypes :: Bool+ _prodsOo_rename :: Bool+ _prodsOo_sem :: Bool+ _prodsOo_sig :: Bool+ _prodsOo_unbox :: Bool+ _prodsOo_wantvisit :: Bool+ _prodsOprefix :: String+ _prodsOvcount :: Int+ _prodsIadditionalDep :: (Seq Edge)+ _prodsIaroundDep :: (Seq Edge)+ _prodsIcProductions :: CProductions+ _prodsIcons :: ([ConstructorIdent])+ _prodsIdirectDep :: (Seq Edge)+ _prodsIerrors :: (Seq Error)+ _prodsIinstDep :: (Seq Edge)+ _prodsImergeDep :: (Seq Edge)+ _prodsInAutoRules :: Int+ _prodsInExplicitRules :: Int+ _prodsIrules :: (Seq (Vertex,CRule))+ _prodsIvcount :: Int+ -- "Order.ag"(line 97, column 17)+ _prodsOnt =+ ({-# LINE 97 "Order.ag" #-}+ nt_+ {-# LINE 1414 "Order.hs" #-})+ -- "Order.ag"(line 100, column 17)+ _prodsOinh =+ ({-# LINE 100 "Order.ag" #-}+ inh_+ {-# LINE 1419 "Order.hs" #-})+ -- "Order.ag"(line 101, column 17)+ _prodsOsyn =+ ({-# LINE 101 "Order.ag" #-}+ syn_+ {-# LINE 1424 "Order.hs" #-})+ -- "Order.ag"(line 359, column 32)+ _mergeMap =+ ({-# LINE 359 "Order.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergeMap+ {-# LINE 1429 "Order.hs" #-})+ -- "Order.ag"(line 412, column 32)+ _aroundMap =+ ({-# LINE 412 "Order.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundMap+ {-# LINE 1434 "Order.hs" #-})+ -- "Order.ag"(line 506, column 17)+ _ntattrs =+ ({-# LINE 506 "Order.ag" #-}+ [ NTAInh nt_ inh tp | (inh,tp) <- Map.assocs inh_ ]+ ++ [NTASyn nt_ syn tp | (syn,tp) <- Map.assocs syn_ ]+ {-# LINE 1440 "Order.hs" #-})+ -- "Order.ag"(line 508, column 17)+ _lhsOntattrs =+ ({-# LINE 508 "Order.ag" #-}+ Seq.fromList (zip [_lhsIacount ..] _ntattrs)+ {-# LINE 1445 "Order.hs" #-})+ -- "Order.ag"(line 509, column 17)+ _lhsOacount =+ ({-# LINE 509 "Order.ag" #-}+ _lhsIacount + Map.size inh_ + Map.size syn_+ {-# LINE 1450 "Order.hs" #-})+ -- "Order.ag"(line 510, column 17)+ _lhsOaranges =+ ({-# LINE 510 "Order.ag" #-}+ Seq.singleton+ (_lhsIacount+ ,_lhsIacount + Map.size inh_+ ,_lhsIacount + Map.size syn_ + Map.size inh_ - 1)+ {-# LINE 1458 "Order.hs" #-})+ -- "Order.ag"(line 519, column 19)+ _lhsOnonts =+ ({-# LINE 519 "Order.ag" #-}+ [(nt_,_prodsIcons)]+ {-# LINE 1463 "Order.hs" #-})+ -- "Order.ag"(line 596, column 19)+ _cInter =+ ({-# LINE 596 "Order.ag" #-}+ if _lhsIo_dovisit+ then findWithErr1 "Nonterminal.cInter" nt_ _lhsIcInterfaceMap+ else CInterface [CSegment inh_ syn_]+ {-# LINE 1470 "Order.hs" #-})+ -- "Order.ag"(line 624, column 19)+ _lhsOcNonterminal =+ ({-# LINE 624 "Order.ag" #-}+ CNonterminal nt_ params_ inh_ syn_ _prodsIcProductions _cInter+ {-# LINE 1475 "Order.hs" #-})+ -- use rule "Order.ag"(line 283, column 60)+ _lhsOadditionalDep =+ ({-# LINE 283 "Order.ag" #-}+ _prodsIadditionalDep+ {-# LINE 1480 "Order.hs" #-})+ -- use rule "Order.ag"(line 404, column 24)+ _lhsOaroundDep =+ ({-# LINE 404 "Order.ag" #-}+ _prodsIaroundDep+ {-# LINE 1485 "Order.hs" #-})+ -- use rule "Order.ag"(line 269, column 33)+ _lhsOdirectDep =+ ({-# LINE 269 "Order.ag" #-}+ _prodsIdirectDep+ {-# LINE 1490 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _prodsIerrors+ {-# LINE 1495 "Order.hs" #-})+ -- use rule "Order.ag"(line 312, column 31)+ _lhsOinstDep =+ ({-# LINE 312 "Order.ag" #-}+ _prodsIinstDep+ {-# LINE 1500 "Order.hs" #-})+ -- use rule "Order.ag"(line 367, column 18)+ _lhsOmergeDep =+ ({-# LINE 367 "Order.ag" #-}+ _prodsImergeDep+ {-# LINE 1505 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnAutoRules =+ ({-# LINE 61 "Order.ag" #-}+ _prodsInAutoRules+ {-# LINE 1510 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 61 "Order.ag" #-}+ _prodsInExplicitRules+ {-# LINE 1515 "Order.hs" #-})+ -- use rule "Order.ag"(line 259, column 18)+ _lhsOrules =+ ({-# LINE 259 "Order.ag" #-}+ _prodsIrules+ {-# LINE 1520 "Order.hs" #-})+ -- copy rule (up)+ _lhsOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _prodsIvcount+ {-# LINE 1525 "Order.hs" #-})+ -- copy rule (down)+ _prodsOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 1530 "Order.hs" #-})+ -- copy rule (from local)+ _prodsOaroundMap =+ ({-# LINE 410 "Order.ag" #-}+ _aroundMap+ {-# LINE 1535 "Order.hs" #-})+ -- copy rule (down)+ _prodsOcVisitsMap =+ ({-# LINE 601 "Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 1540 "Order.hs" #-})+ -- copy rule (down)+ _prodsOmanualAttrDepMap =+ ({-# LINE 283 "Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 1545 "Order.hs" #-})+ -- copy rule (from local)+ _prodsOmergeMap =+ ({-# LINE 357 "Order.ag" #-}+ _mergeMap+ {-# LINE 1550 "Order.hs" #-})+ -- copy rule (down)+ _prodsOo_case =+ ({-# LINE 117 "Order.ag" #-}+ _lhsIo_case+ {-# LINE 1555 "Order.hs" #-})+ -- copy rule (down)+ _prodsOo_cata =+ ({-# LINE 111 "Order.ag" #-}+ _lhsIo_cata+ {-# LINE 1560 "Order.hs" #-})+ -- copy rule (down)+ _prodsOo_dovisit =+ ({-# LINE 116 "Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 1565 "Order.hs" #-})+ -- copy rule (down)+ _prodsOo_newtypes =+ ({-# LINE 110 "Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1570 "Order.hs" #-})+ -- copy rule (down)+ _prodsOo_rename =+ ({-# LINE 114 "Order.ag" #-}+ _lhsIo_rename+ {-# LINE 1575 "Order.hs" #-})+ -- copy rule (down)+ _prodsOo_sem =+ ({-# LINE 113 "Order.ag" #-}+ _lhsIo_sem+ {-# LINE 1580 "Order.hs" #-})+ -- copy rule (down)+ _prodsOo_sig =+ ({-# LINE 112 "Order.ag" #-}+ _lhsIo_sig+ {-# LINE 1585 "Order.hs" #-})+ -- copy rule (down)+ _prodsOo_unbox =+ ({-# LINE 119 "Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 1590 "Order.hs" #-})+ -- copy rule (down)+ _prodsOo_wantvisit =+ ({-# LINE 115 "Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 1595 "Order.hs" #-})+ -- copy rule (down)+ _prodsOprefix =+ ({-# LINE 118 "Order.ag" #-}+ _lhsIprefix+ {-# LINE 1600 "Order.hs" #-})+ -- copy rule (down)+ _prodsOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _lhsIvcount+ {-# LINE 1605 "Order.hs" #-})+ ( _prodsIadditionalDep,_prodsIaroundDep,_prodsIcProductions,_prodsIcons,_prodsIdirectDep,_prodsIerrors,_prodsIinstDep,_prodsImergeDep,_prodsInAutoRules,_prodsInExplicitRules,_prodsIrules,_prodsIvcount) =+ prods_ _prodsOallnts _prodsOaroundMap _prodsOcVisitsMap _prodsOinh _prodsOmanualAttrDepMap _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_dovisit _prodsOo_newtypes _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_unbox _prodsOo_wantvisit _prodsOprefix _prodsOsyn _prodsOvcount + in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount))) )+-- Nonterminals ------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ aroundMap : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ cInterfaceMap : CInterfaceMap+ cVisitsMap : CVisitsMap+ manualAttrDepMap : AttrOrderMap+ mergeMap : Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ o_case : Bool+ o_cata : Bool+ o_data : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_unbox : Bool+ o_wantvisit : Bool+ prefix : String+ chained attributes:+ acount : Int+ vcount : Int+ synthesized attributes:+ additionalDep : Seq Edge+ aranges : Seq (Int,Int,Int)+ aroundDep : Seq Edge+ cNonterminals : CNonterminals+ directDep : Seq Edge+ errors : Seq Error+ instDep : Seq Edge+ mergeDep : Seq Edge+ nAutoRules : Int+ nExplicitRules : Int+ nonts : [(NontermIdent,[ConstructorIdent])]+ ntattrs : Seq (Vertex,NTAttr)+ rules : Seq (Vertex,CRule)+ alternatives:+ alternative Cons:+ child hd : Nonterminal + child tl : Nonterminals + alternative Nil:+-}+-- cata+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 (Int ->+ ([Identifier]) ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ CInterfaceMap ->+ CVisitsMap ->+ AttrOrderMap ->+ (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ Int ->+ ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminals,(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),Int))+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),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),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)),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))),vcount_Syn_Nonterminals :: !(Int)}+wrap_Nonterminals :: T_Nonterminals ->+ Inh_Nonterminals ->+ Syn_Nonterminals +wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIvcount ) =+ (let ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount) = sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIvcount + in (Syn_Nonterminals _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOvcount ))+sem_Nonterminals_Cons :: T_Nonterminal ->+ T_Nonterminals ->+ T_Nonterminals +sem_Nonterminals_Cons (T_Nonterminal hd_ ) (T_Nonterminals tl_ ) =+ (T_Nonterminals (\ _lhsIacount+ _lhsIallnts+ _lhsIaroundMap+ _lhsIcInterfaceMap+ _lhsIcVisitsMap+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_data+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIvcount ->+ (let _lhsOcNonterminals :: CNonterminals+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaranges :: (Seq (Int,Int,Int))+ _lhsOaroundDep :: (Seq Edge)+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+ _lhsOntattrs :: (Seq (Vertex,NTAttr))+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOacount :: Int+ _lhsOvcount :: Int+ _hdOacount :: Int+ _hdOallnts :: ([Identifier])+ _hdOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))+ _hdOcInterfaceMap :: CInterfaceMap+ _hdOcVisitsMap :: CVisitsMap+ _hdOmanualAttrDepMap :: AttrOrderMap+ _hdOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_data :: Bool+ _hdOo_dovisit :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_unbox :: Bool+ _hdOo_wantvisit :: Bool+ _hdOprefix :: String+ _hdOvcount :: Int+ _tlOacount :: Int+ _tlOallnts :: ([Identifier])+ _tlOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))+ _tlOcInterfaceMap :: CInterfaceMap+ _tlOcVisitsMap :: CVisitsMap+ _tlOmanualAttrDepMap :: AttrOrderMap+ _tlOmergeMap :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))))+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_data :: Bool+ _tlOo_dovisit :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_unbox :: Bool+ _tlOo_wantvisit :: Bool+ _tlOprefix :: String+ _tlOvcount :: Int+ _hdIacount :: Int+ _hdIadditionalDep :: (Seq Edge)+ _hdIaranges :: (Seq (Int,Int,Int))+ _hdIaroundDep :: (Seq Edge)+ _hdIcNonterminal :: CNonterminal+ _hdIdirectDep :: (Seq Edge)+ _hdIerrors :: (Seq Error)+ _hdIinstDep :: (Seq Edge)+ _hdImergeDep :: (Seq Edge)+ _hdInAutoRules :: Int+ _hdInExplicitRules :: Int+ _hdInonts :: ([(NontermIdent,[ConstructorIdent])])+ _hdIntattrs :: (Seq (Vertex,NTAttr))+ _hdIrules :: (Seq (Vertex,CRule))+ _hdIvcount :: Int+ _tlIacount :: Int+ _tlIadditionalDep :: (Seq Edge)+ _tlIaranges :: (Seq (Int,Int,Int))+ _tlIaroundDep :: (Seq Edge)+ _tlIcNonterminals :: CNonterminals+ _tlIdirectDep :: (Seq Edge)+ _tlIerrors :: (Seq Error)+ _tlIinstDep :: (Seq Edge)+ _tlImergeDep :: (Seq Edge)+ _tlInAutoRules :: Int+ _tlInExplicitRules :: Int+ _tlInonts :: ([(NontermIdent,[ConstructorIdent])])+ _tlIntattrs :: (Seq (Vertex,NTAttr))+ _tlIrules :: (Seq (Vertex,CRule))+ _tlIvcount :: Int+ -- "Order.ag"(line 621, column 12)+ _lhsOcNonterminals =+ ({-# LINE 621 "Order.ag" #-}+ _hdIcNonterminal : _tlIcNonterminals+ {-# LINE 1797 "Order.hs" #-})+ -- use rule "Order.ag"(line 283, column 60)+ _lhsOadditionalDep =+ ({-# LINE 283 "Order.ag" #-}+ _hdIadditionalDep Seq.>< _tlIadditionalDep+ {-# LINE 1802 "Order.hs" #-})+ -- use rule "Order.ag"(line 500, column 36)+ _lhsOaranges =+ ({-# LINE 500 "Order.ag" #-}+ _hdIaranges Seq.>< _tlIaranges+ {-# LINE 1807 "Order.hs" #-})+ -- use rule "Order.ag"(line 404, column 24)+ _lhsOaroundDep =+ ({-# LINE 404 "Order.ag" #-}+ _hdIaroundDep Seq.>< _tlIaroundDep+ {-# LINE 1812 "Order.hs" #-})+ -- use rule "Order.ag"(line 269, column 33)+ _lhsOdirectDep =+ ({-# LINE 269 "Order.ag" #-}+ _hdIdirectDep Seq.>< _tlIdirectDep+ {-# LINE 1817 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1822 "Order.hs" #-})+ -- use rule "Order.ag"(line 312, column 31)+ _lhsOinstDep =+ ({-# LINE 312 "Order.ag" #-}+ _hdIinstDep Seq.>< _tlIinstDep+ {-# LINE 1827 "Order.hs" #-})+ -- use rule "Order.ag"(line 367, column 18)+ _lhsOmergeDep =+ ({-# LINE 367 "Order.ag" #-}+ _hdImergeDep Seq.>< _tlImergeDep+ {-# LINE 1832 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnAutoRules =+ ({-# LINE 61 "Order.ag" #-}+ _hdInAutoRules + _tlInAutoRules+ {-# LINE 1837 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 61 "Order.ag" #-}+ _hdInExplicitRules + _tlInExplicitRules+ {-# LINE 1842 "Order.hs" #-})+ -- use rule "Order.ag"(line 517, column 43)+ _lhsOnonts =+ ({-# LINE 517 "Order.ag" #-}+ _hdInonts ++ _tlInonts+ {-# LINE 1847 "Order.hs" #-})+ -- use rule "Order.ag"(line 499, column 35)+ _lhsOntattrs =+ ({-# LINE 499 "Order.ag" #-}+ _hdIntattrs Seq.>< _tlIntattrs+ {-# LINE 1852 "Order.hs" #-})+ -- use rule "Order.ag"(line 259, column 18)+ _lhsOrules =+ ({-# LINE 259 "Order.ag" #-}+ _hdIrules Seq.>< _tlIrules+ {-# LINE 1857 "Order.hs" #-})+ -- copy rule (up)+ _lhsOacount =+ ({-# LINE 499 "Order.ag" #-}+ _tlIacount+ {-# LINE 1862 "Order.hs" #-})+ -- copy rule (up)+ _lhsOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _tlIvcount+ {-# LINE 1867 "Order.hs" #-})+ -- copy rule (down)+ _hdOacount =+ ({-# LINE 499 "Order.ag" #-}+ _lhsIacount+ {-# LINE 1872 "Order.hs" #-})+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 1877 "Order.hs" #-})+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 407 "Order.ag" #-}+ _lhsIaroundMap+ {-# LINE 1882 "Order.hs" #-})+ -- copy rule (down)+ _hdOcInterfaceMap =+ ({-# LINE 594 "Order.ag" #-}+ _lhsIcInterfaceMap+ {-# LINE 1887 "Order.hs" #-})+ -- copy rule (down)+ _hdOcVisitsMap =+ ({-# LINE 601 "Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 1892 "Order.hs" #-})+ -- copy rule (down)+ _hdOmanualAttrDepMap =+ ({-# LINE 283 "Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 1897 "Order.hs" #-})+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 354 "Order.ag" #-}+ _lhsImergeMap+ {-# LINE 1902 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 117 "Order.ag" #-}+ _lhsIo_case+ {-# LINE 1907 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 111 "Order.ag" #-}+ _lhsIo_cata+ {-# LINE 1912 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_data =+ ({-# LINE 120 "Order.ag" #-}+ _lhsIo_data+ {-# LINE 1917 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_dovisit =+ ({-# LINE 116 "Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 1922 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 110 "Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 1927 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 114 "Order.ag" #-}+ _lhsIo_rename+ {-# LINE 1932 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 113 "Order.ag" #-}+ _lhsIo_sem+ {-# LINE 1937 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 112 "Order.ag" #-}+ _lhsIo_sig+ {-# LINE 1942 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 119 "Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 1947 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_wantvisit =+ ({-# LINE 115 "Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 1952 "Order.hs" #-})+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 118 "Order.ag" #-}+ _lhsIprefix+ {-# LINE 1957 "Order.hs" #-})+ -- copy rule (down)+ _hdOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _lhsIvcount+ {-# LINE 1962 "Order.hs" #-})+ -- copy rule (chain)+ _tlOacount =+ ({-# LINE 499 "Order.ag" #-}+ _hdIacount+ {-# LINE 1967 "Order.hs" #-})+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 1972 "Order.hs" #-})+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 407 "Order.ag" #-}+ _lhsIaroundMap+ {-# LINE 1977 "Order.hs" #-})+ -- copy rule (down)+ _tlOcInterfaceMap =+ ({-# LINE 594 "Order.ag" #-}+ _lhsIcInterfaceMap+ {-# LINE 1982 "Order.hs" #-})+ -- copy rule (down)+ _tlOcVisitsMap =+ ({-# LINE 601 "Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 1987 "Order.hs" #-})+ -- copy rule (down)+ _tlOmanualAttrDepMap =+ ({-# LINE 283 "Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 1992 "Order.hs" #-})+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 354 "Order.ag" #-}+ _lhsImergeMap+ {-# LINE 1997 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 117 "Order.ag" #-}+ _lhsIo_case+ {-# LINE 2002 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 111 "Order.ag" #-}+ _lhsIo_cata+ {-# LINE 2007 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_data =+ ({-# LINE 120 "Order.ag" #-}+ _lhsIo_data+ {-# LINE 2012 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_dovisit =+ ({-# LINE 116 "Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 2017 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 110 "Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 2022 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 114 "Order.ag" #-}+ _lhsIo_rename+ {-# LINE 2027 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 113 "Order.ag" #-}+ _lhsIo_sem+ {-# LINE 2032 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 112 "Order.ag" #-}+ _lhsIo_sig+ {-# LINE 2037 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 119 "Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 2042 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_wantvisit =+ ({-# LINE 115 "Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 2047 "Order.hs" #-})+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 118 "Order.ag" #-}+ _lhsIprefix+ {-# LINE 2052 "Order.hs" #-})+ -- copy rule (chain)+ _tlOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _hdIvcount+ {-# LINE 2057 "Order.hs" #-})+ ( _hdIacount,_hdIadditionalDep,_hdIaranges,_hdIaroundDep,_hdIcNonterminal,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdImergeDep,_hdInAutoRules,_hdInExplicitRules,_hdInonts,_hdIntattrs,_hdIrules,_hdIvcount) =+ hd_ _hdOacount _hdOallnts _hdOaroundMap _hdOcInterfaceMap _hdOcVisitsMap _hdOmanualAttrDepMap _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_data _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOvcount + ( _tlIacount,_tlIadditionalDep,_tlIaranges,_tlIaroundDep,_tlIcNonterminals,_tlIdirectDep,_tlIerrors,_tlIinstDep,_tlImergeDep,_tlInAutoRules,_tlInExplicitRules,_tlInonts,_tlIntattrs,_tlIrules,_tlIvcount) =+ tl_ _tlOacount _tlOallnts _tlOaroundMap _tlOcInterfaceMap _tlOcVisitsMap _tlOmanualAttrDepMap _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_data _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOvcount + in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount))) )+sem_Nonterminals_Nil :: T_Nonterminals +sem_Nonterminals_Nil =+ (T_Nonterminals (\ _lhsIacount+ _lhsIallnts+ _lhsIaroundMap+ _lhsIcInterfaceMap+ _lhsIcVisitsMap+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_data+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIvcount ->+ (let _lhsOcNonterminals :: CNonterminals+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaranges :: (Seq (Int,Int,Int))+ _lhsOaroundDep :: (Seq Edge)+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+ _lhsOntattrs :: (Seq (Vertex,NTAttr))+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOacount :: Int+ _lhsOvcount :: Int+ -- "Order.ag"(line 622, column 12)+ _lhsOcNonterminals =+ ({-# LINE 622 "Order.ag" #-}+ []+ {-# LINE 2103 "Order.hs" #-})+ -- use rule "Order.ag"(line 283, column 60)+ _lhsOadditionalDep =+ ({-# LINE 283 "Order.ag" #-}+ Seq.empty+ {-# LINE 2108 "Order.hs" #-})+ -- use rule "Order.ag"(line 500, column 36)+ _lhsOaranges =+ ({-# LINE 500 "Order.ag" #-}+ Seq.empty+ {-# LINE 2113 "Order.hs" #-})+ -- use rule "Order.ag"(line 404, column 24)+ _lhsOaroundDep =+ ({-# LINE 404 "Order.ag" #-}+ Seq.empty+ {-# LINE 2118 "Order.hs" #-})+ -- use rule "Order.ag"(line 269, column 33)+ _lhsOdirectDep =+ ({-# LINE 269 "Order.ag" #-}+ Seq.empty+ {-# LINE 2123 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ Seq.empty+ {-# LINE 2128 "Order.hs" #-})+ -- use rule "Order.ag"(line 312, column 31)+ _lhsOinstDep =+ ({-# LINE 312 "Order.ag" #-}+ Seq.empty+ {-# LINE 2133 "Order.hs" #-})+ -- use rule "Order.ag"(line 367, column 18)+ _lhsOmergeDep =+ ({-# LINE 367 "Order.ag" #-}+ Seq.empty+ {-# LINE 2138 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnAutoRules =+ ({-# LINE 61 "Order.ag" #-}+ 0+ {-# LINE 2143 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 61 "Order.ag" #-}+ 0+ {-# LINE 2148 "Order.hs" #-})+ -- use rule "Order.ag"(line 517, column 43)+ _lhsOnonts =+ ({-# LINE 517 "Order.ag" #-}+ []+ {-# LINE 2153 "Order.hs" #-})+ -- use rule "Order.ag"(line 499, column 35)+ _lhsOntattrs =+ ({-# LINE 499 "Order.ag" #-}+ Seq.empty+ {-# LINE 2158 "Order.hs" #-})+ -- use rule "Order.ag"(line 259, column 18)+ _lhsOrules =+ ({-# LINE 259 "Order.ag" #-}+ Seq.empty+ {-# LINE 2163 "Order.hs" #-})+ -- copy rule (chain)+ _lhsOacount =+ ({-# LINE 499 "Order.ag" #-}+ _lhsIacount+ {-# LINE 2168 "Order.hs" #-})+ -- copy rule (chain)+ _lhsOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _lhsIvcount+ {-# LINE 2173 "Order.hs" #-})+ in ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount))) )+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allTypeSigs : Map Identifier Type+ altAttrs : Map AltAttr Vertex+ con : Identifier+ inh : Attributes+ nt : Identifier+ syn : Attributes+ synthesized attributes:+ copy : SELF + errors : Seq Error+ gathAltAttrs : [AltAttr]+ instVars : [Identifier]+ locVars : [Identifier]+ patternAttrs : [(Identifier,Identifier,Bool,Patterns)]+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + child parts : Patterns + visit 0:+ local copy : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local copy : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local copy : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern +sem_Pattern (Alias _field _attr _pat _parts ) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )+sem_Pattern (Constr _name _pats ) =+ (sem_Pattern_Constr _name (sem_Patterns _pats ) )+sem_Pattern (Irrefutable _pat ) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat ) )+sem_Pattern (Product _pos _pats ) =+ (sem_Pattern_Product _pos (sem_Patterns _pats ) )+sem_Pattern (Underscore _pos ) =+ (sem_Pattern_Underscore _pos )+-- semantic domain+newtype T_Pattern = T_Pattern ((Map Identifier Type) ->+ (Map AltAttr Vertex) ->+ Identifier ->+ Attributes ->+ Identifier ->+ Attributes ->+ ( Pattern ,(Seq Error),([AltAttr]),([Identifier]),([Identifier]),([(Identifier,Identifier,Bool,Patterns)])))+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,Patterns)]))}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern +wrap_Pattern (T_Pattern sem ) (Inh_Pattern _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn ) =+ (let ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs) = sem _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn + in (Syn_Pattern _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs ))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _lhsOlocVars :: ([Identifier])+ _lhsOinstVars :: ([Identifier])+ _lhsOerrors :: (Seq Error)+ _lhsOcopy :: Pattern + _patOallTypeSigs :: (Map Identifier Type)+ _patOaltAttrs :: (Map AltAttr Vertex)+ _patOcon :: Identifier+ _patOinh :: Attributes+ _patOnt :: Identifier+ _patOsyn :: Attributes+ _partsOallTypeSigs :: (Map Identifier Type)+ _partsOaltAttrs :: (Map AltAttr Vertex)+ _partsOcon :: Identifier+ _partsOinh :: Attributes+ _partsOnt :: Identifier+ _partsOsyn :: Attributes+ _patIcopy :: Pattern + _patIerrors :: (Seq Error)+ _patIgathAltAttrs :: ([AltAttr])+ _patIinstVars :: ([Identifier])+ _patIlocVars :: ([Identifier])+ _patIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _partsIcopy :: Patterns + _partsIerrors :: (Seq Error)+ _partsIgathAltAttrs :: ([AltAttr])+ _partsIinstVars :: ([Identifier])+ _partsIlocVars :: ([Identifier])+ _partsIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ -- "Order.ag"(line 184, column 12)+ _lhsOgathAltAttrs =+ ({-# LINE 184 "Order.ag" #-}+ [AltAttr field_ attr_ (field_ == _LOC || field_ == _INST)]+ {-# LINE 2294 "Order.hs" #-})+ -- "Order.ag"(line 252, column 12)+ _lhsOpatternAttrs =+ ({-# LINE 252 "Order.ag" #-}+ [(field_,attr_,(field_ == _LOC || field_ == _INST),_partsIcopy)]+ {-# LINE 2299 "Order.hs" #-})+ -- "Order.ag"(line 680, column 14)+ _lhsOlocVars =+ ({-# LINE 680 "Order.ag" #-}+ if field_ == _LOC+ then [attr_]+ else []+ {-# LINE 2306 "Order.hs" #-})+ -- "Order.ag"(line 683, column 14)+ _lhsOinstVars =+ ({-# LINE 683 "Order.ag" #-}+ if field_ == _INST+ then [attr_]+ else []+ {-# LINE 2313 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _patIerrors Seq.>< _partsIerrors+ {-# LINE 2318 "Order.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Alias field_ attr_ _patIcopy _partsIcopy+ {-# LINE 2323 "Order.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2328 "Order.hs" #-})+ -- copy rule (down)+ _patOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2333 "Order.hs" #-})+ -- copy rule (down)+ _patOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2338 "Order.hs" #-})+ -- copy rule (down)+ _patOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 2343 "Order.hs" #-})+ -- copy rule (down)+ _patOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 2348 "Order.hs" #-})+ -- copy rule (down)+ _patOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 2353 "Order.hs" #-})+ -- copy rule (down)+ _patOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 2358 "Order.hs" #-})+ -- copy rule (down)+ _partsOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2363 "Order.hs" #-})+ -- copy rule (down)+ _partsOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2368 "Order.hs" #-})+ -- copy rule (down)+ _partsOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 2373 "Order.hs" #-})+ -- copy rule (down)+ _partsOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 2378 "Order.hs" #-})+ -- copy rule (down)+ _partsOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 2383 "Order.hs" #-})+ -- copy rule (down)+ _partsOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 2388 "Order.hs" #-})+ ( _patIcopy,_patIerrors,_patIgathAltAttrs,_patIinstVars,_patIlocVars,_patIpatternAttrs) =+ pat_ _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn + ( _partsIcopy,_partsIerrors,_partsIgathAltAttrs,_partsIinstVars,_partsIlocVars,_partsIpatternAttrs) =+ parts_ _partsOallTypeSigs _partsOaltAttrs _partsOcon _partsOinh _partsOnt _partsOsyn + in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Constr name_ (T_Patterns pats_ ) =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _lhsOcopy :: Pattern + _patsOallTypeSigs :: (Map Identifier Type)+ _patsOaltAttrs :: (Map AltAttr Vertex)+ _patsOcon :: Identifier+ _patsOinh :: Attributes+ _patsOnt :: Identifier+ _patsOsyn :: Attributes+ _patsIcopy :: Patterns + _patsIerrors :: (Seq Error)+ _patsIgathAltAttrs :: ([AltAttr])+ _patsIinstVars :: ([Identifier])+ _patsIlocVars :: ([Identifier])+ _patsIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _patsIerrors+ {-# LINE 2426 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ _patsIgathAltAttrs+ {-# LINE 2431 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 86)+ _lhsOinstVars =+ ({-# LINE 677 "Order.ag" #-}+ _patsIinstVars+ {-# LINE 2436 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 48)+ _lhsOlocVars =+ ({-# LINE 677 "Order.ag" #-}+ _patsIlocVars+ {-# LINE 2441 "Order.hs" #-})+ -- use rule "Order.ag"(line 249, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 249 "Order.ag" #-}+ _patsIpatternAttrs+ {-# LINE 2446 "Order.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 2451 "Order.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2456 "Order.hs" #-})+ -- copy rule (down)+ _patsOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2461 "Order.hs" #-})+ -- copy rule (down)+ _patsOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2466 "Order.hs" #-})+ -- copy rule (down)+ _patsOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 2471 "Order.hs" #-})+ -- copy rule (down)+ _patsOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 2476 "Order.hs" #-})+ -- copy rule (down)+ _patsOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 2481 "Order.hs" #-})+ -- copy rule (down)+ _patsOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 2486 "Order.hs" #-})+ ( _patsIcopy,_patsIerrors,_patsIgathAltAttrs,_patsIinstVars,_patsIlocVars,_patsIpatternAttrs) =+ pats_ _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn + in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern +sem_Pattern_Irrefutable (T_Pattern pat_ ) =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _lhsOcopy :: Pattern + _patOallTypeSigs :: (Map Identifier Type)+ _patOaltAttrs :: (Map AltAttr Vertex)+ _patOcon :: Identifier+ _patOinh :: Attributes+ _patOnt :: Identifier+ _patOsyn :: Attributes+ _patIcopy :: Pattern + _patIerrors :: (Seq Error)+ _patIgathAltAttrs :: ([AltAttr])+ _patIinstVars :: ([Identifier])+ _patIlocVars :: ([Identifier])+ _patIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _patIerrors+ {-# LINE 2521 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ _patIgathAltAttrs+ {-# LINE 2526 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 86)+ _lhsOinstVars =+ ({-# LINE 677 "Order.ag" #-}+ _patIinstVars+ {-# LINE 2531 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 48)+ _lhsOlocVars =+ ({-# LINE 677 "Order.ag" #-}+ _patIlocVars+ {-# LINE 2536 "Order.hs" #-})+ -- use rule "Order.ag"(line 249, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 249 "Order.ag" #-}+ _patIpatternAttrs+ {-# LINE 2541 "Order.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 2546 "Order.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2551 "Order.hs" #-})+ -- copy rule (down)+ _patOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2556 "Order.hs" #-})+ -- copy rule (down)+ _patOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2561 "Order.hs" #-})+ -- copy rule (down)+ _patOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 2566 "Order.hs" #-})+ -- copy rule (down)+ _patOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 2571 "Order.hs" #-})+ -- copy rule (down)+ _patOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 2576 "Order.hs" #-})+ -- copy rule (down)+ _patOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 2581 "Order.hs" #-})+ ( _patIcopy,_patIerrors,_patIgathAltAttrs,_patIinstVars,_patIlocVars,_patIpatternAttrs) =+ pat_ _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn + in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Product pos_ (T_Patterns pats_ ) =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _lhsOcopy :: Pattern + _patsOallTypeSigs :: (Map Identifier Type)+ _patsOaltAttrs :: (Map AltAttr Vertex)+ _patsOcon :: Identifier+ _patsOinh :: Attributes+ _patsOnt :: Identifier+ _patsOsyn :: Attributes+ _patsIcopy :: Patterns + _patsIerrors :: (Seq Error)+ _patsIgathAltAttrs :: ([AltAttr])+ _patsIinstVars :: ([Identifier])+ _patsIlocVars :: ([Identifier])+ _patsIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _patsIerrors+ {-# LINE 2617 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ _patsIgathAltAttrs+ {-# LINE 2622 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 86)+ _lhsOinstVars =+ ({-# LINE 677 "Order.ag" #-}+ _patsIinstVars+ {-# LINE 2627 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 48)+ _lhsOlocVars =+ ({-# LINE 677 "Order.ag" #-}+ _patsIlocVars+ {-# LINE 2632 "Order.hs" #-})+ -- use rule "Order.ag"(line 249, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 249 "Order.ag" #-}+ _patsIpatternAttrs+ {-# LINE 2637 "Order.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 2642 "Order.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2647 "Order.hs" #-})+ -- copy rule (down)+ _patsOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2652 "Order.hs" #-})+ -- copy rule (down)+ _patsOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2657 "Order.hs" #-})+ -- copy rule (down)+ _patsOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 2662 "Order.hs" #-})+ -- copy rule (down)+ _patsOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 2667 "Order.hs" #-})+ -- copy rule (down)+ _patsOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 2672 "Order.hs" #-})+ -- copy rule (down)+ _patsOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 2677 "Order.hs" #-})+ ( _patsIcopy,_patsIerrors,_patsIgathAltAttrs,_patsIinstVars,_patsIlocVars,_patsIpatternAttrs) =+ pats_ _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn + in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )+sem_Pattern_Underscore :: Pos ->+ T_Pattern +sem_Pattern_Underscore pos_ =+ (T_Pattern (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _lhsOcopy :: Pattern + -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ Seq.empty+ {-# LINE 2700 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ []+ {-# LINE 2705 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 86)+ _lhsOinstVars =+ ({-# LINE 677 "Order.ag" #-}+ []+ {-# LINE 2710 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 48)+ _lhsOlocVars =+ ({-# LINE 677 "Order.ag" #-}+ []+ {-# LINE 2715 "Order.hs" #-})+ -- use rule "Order.ag"(line 249, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 249 "Order.ag" #-}+ []+ {-# LINE 2720 "Order.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Underscore pos_+ {-# LINE 2725 "Order.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2730 "Order.hs" #-})+ in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allTypeSigs : Map Identifier Type+ altAttrs : Map AltAttr Vertex+ con : Identifier+ inh : Attributes+ nt : Identifier+ syn : Attributes+ synthesized attributes:+ copy : SELF + errors : Seq Error+ gathAltAttrs : [AltAttr]+ instVars : [Identifier]+ locVars : [Identifier]+ patternAttrs : [(Identifier,Identifier,Bool,Patterns)]+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+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 ((Map Identifier Type) ->+ (Map AltAttr Vertex) ->+ Identifier ->+ Attributes ->+ Identifier ->+ Attributes ->+ ( Patterns ,(Seq Error),([AltAttr]),([Identifier]),([Identifier]),([(Identifier,Identifier,Bool,Patterns)])))+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,Patterns)]))}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns +wrap_Patterns (T_Patterns sem ) (Inh_Patterns _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn ) =+ (let ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs) = sem _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn + in (Syn_Patterns _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs ))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns +sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =+ (T_Patterns (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _lhsOcopy :: Patterns + _hdOallTypeSigs :: (Map Identifier Type)+ _hdOaltAttrs :: (Map AltAttr Vertex)+ _hdOcon :: Identifier+ _hdOinh :: Attributes+ _hdOnt :: Identifier+ _hdOsyn :: Attributes+ _tlOallTypeSigs :: (Map Identifier Type)+ _tlOaltAttrs :: (Map AltAttr Vertex)+ _tlOcon :: Identifier+ _tlOinh :: Attributes+ _tlOnt :: Identifier+ _tlOsyn :: Attributes+ _hdIcopy :: Pattern + _hdIerrors :: (Seq Error)+ _hdIgathAltAttrs :: ([AltAttr])+ _hdIinstVars :: ([Identifier])+ _hdIlocVars :: ([Identifier])+ _hdIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _tlIcopy :: Patterns + _tlIerrors :: (Seq Error)+ _tlIgathAltAttrs :: ([AltAttr])+ _tlIinstVars :: ([Identifier])+ _tlIlocVars :: ([Identifier])+ _tlIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2824 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ _hdIgathAltAttrs ++ _tlIgathAltAttrs+ {-# LINE 2829 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 86)+ _lhsOinstVars =+ ({-# LINE 677 "Order.ag" #-}+ _hdIinstVars ++ _tlIinstVars+ {-# LINE 2834 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 48)+ _lhsOlocVars =+ ({-# LINE 677 "Order.ag" #-}+ _hdIlocVars ++ _tlIlocVars+ {-# LINE 2839 "Order.hs" #-})+ -- use rule "Order.ag"(line 249, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 249 "Order.ag" #-}+ _hdIpatternAttrs ++ _tlIpatternAttrs+ {-# LINE 2844 "Order.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 2849 "Order.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2854 "Order.hs" #-})+ -- copy rule (down)+ _hdOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2859 "Order.hs" #-})+ -- copy rule (down)+ _hdOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2864 "Order.hs" #-})+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 2869 "Order.hs" #-})+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 2874 "Order.hs" #-})+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 2879 "Order.hs" #-})+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 2884 "Order.hs" #-})+ -- copy rule (down)+ _tlOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 2889 "Order.hs" #-})+ -- copy rule (down)+ _tlOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 2894 "Order.hs" #-})+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 2899 "Order.hs" #-})+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 2904 "Order.hs" #-})+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 2909 "Order.hs" #-})+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 2914 "Order.hs" #-})+ ( _hdIcopy,_hdIerrors,_hdIgathAltAttrs,_hdIinstVars,_hdIlocVars,_hdIpatternAttrs) =+ hd_ _hdOallTypeSigs _hdOaltAttrs _hdOcon _hdOinh _hdOnt _hdOsyn + ( _tlIcopy,_tlIerrors,_tlIgathAltAttrs,_tlIinstVars,_tlIlocVars,_tlIpatternAttrs) =+ tl_ _tlOallTypeSigs _tlOaltAttrs _tlOcon _tlOinh _tlOnt _tlOsyn + in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil =+ (T_Patterns (\ _lhsIallTypeSigs+ _lhsIaltAttrs+ _lhsIcon+ _lhsIinh+ _lhsInt+ _lhsIsyn ->+ (let _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _lhsOcopy :: Patterns + -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ Seq.empty+ {-# LINE 2938 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ []+ {-# LINE 2943 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 86)+ _lhsOinstVars =+ ({-# LINE 677 "Order.ag" #-}+ []+ {-# LINE 2948 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 48)+ _lhsOlocVars =+ ({-# LINE 677 "Order.ag" #-}+ []+ {-# LINE 2953 "Order.hs" #-})+ -- use rule "Order.ag"(line 249, column 42)+ _lhsOpatternAttrs =+ ({-# LINE 249 "Order.ag" #-}+ []+ {-# LINE 2958 "Order.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ []+ {-# LINE 2963 "Order.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2968 "Order.hs" #-})+ in ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )+-- Production --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ aroundMap : Map ConstructorIdent (Map Identifier [Expression])+ cVisitsMap : CVisitsMap+ inh : Attributes+ manualAttrDepMap : AttrOrderMap+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))+ nt : Identifier+ o_case : Bool+ o_cata : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_unbox : Bool+ o_wantvisit : Bool+ prefix : String+ syn : Attributes+ chained attribute:+ vcount : Int+ synthesized attributes:+ additionalDep : Seq Edge+ aroundDep : Seq Edge+ cProduction : CProduction+ cons : [ConstructorIdent]+ directDep : Seq Edge+ errors : Seq Error+ instDep : Seq Edge+ mergeDep : Seq Edge+ nAutoRules : Int+ nExplicitRules : Int+ rules : Seq (Vertex,CRule)+ alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + visit 0:+ local gathAltAttrs : _+ local altAttrs : _+ local inhRules : _+ local gathRules : _+ local manualDeps : _+ local mergeMap : _+ local mergeDep1 : _+ local mergeDep2 : _+ local aroundMap : _+ local aroundDep1 : _+ local aroundDep2 : _+ local cVisits : _+ local allfields : _+ local attrs : _+ local inhnames : _+ local synnames : _+-}+-- cata+sem_Production :: Production ->+ T_Production +sem_Production (Production _con _children _rules _typeSigs ) =+ (sem_Production_Production _con (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) )+-- semantic domain+newtype T_Production = T_Production (([Identifier]) ->+ (Map ConstructorIdent (Map Identifier [Expression])) ->+ CVisitsMap ->+ Attributes ->+ AttrOrderMap ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->+ Identifier ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ Attributes ->+ Int ->+ ( (Seq Edge),(Seq Edge),CProduction,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))+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),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),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)}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production +wrap_Production (T_Production sem ) (Inh_Production _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount ) =+ (let ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount) = sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount + in (Syn_Production _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount ))+sem_Production_Production :: ConstructorIdent ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ T_Production +sem_Production_Production con_ (T_Children children_ ) (T_Rules rules_ ) (T_TypeSigs typeSigs_ ) =+ (T_Production (\ _lhsIallnts+ _lhsIaroundMap+ _lhsIcVisitsMap+ _lhsIinh+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsyn+ _lhsIvcount ->+ (let _childrenOcon :: Identifier+ _rulesOcon :: Identifier+ _rulesOchildNts :: (Map Identifier NontermIdent)+ _rulesOchildInhs :: (Map Identifier Attributes)+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOvcount :: Int+ _lhsOadditionalDep :: (Seq Edge)+ _rulesOsynsOfChildren :: (Map Identifier Attributes)+ _rulesOinhsOfChildren :: (Map Identifier Attributes)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOaroundDep :: (Seq Edge)+ _lhsOcons :: ([ConstructorIdent])+ _typeSigsOtypeSigs :: (Map Identifier Type)+ _rulesOallTypeSigs :: (Map Identifier Type)+ _lhsOcProduction :: CProduction+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _childrenOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _childrenOallnts :: ([Identifier])+ _childrenOattrs :: ([(Identifier,Identifier)])+ _childrenOinh :: Attributes+ _childrenOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _childrenOnt :: Identifier+ _childrenOo_unbox :: Bool+ _childrenOsyn :: Attributes+ _rulesOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _rulesOallnts :: ([Identifier])+ _rulesOaltAttrs :: (Map AltAttr Vertex)+ _rulesOattrs :: ([(Identifier,Identifier)])+ _rulesOinh :: Attributes+ _rulesOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _rulesOnt :: Identifier+ _rulesOo_case :: Bool+ _rulesOo_cata :: Bool+ _rulesOo_dovisit :: Bool+ _rulesOo_newtypes :: Bool+ _rulesOo_rename :: Bool+ _rulesOo_sem :: Bool+ _rulesOo_sig :: Bool+ _rulesOo_wantvisit :: Bool+ _rulesOprefix :: String+ _rulesOsyn :: Attributes+ _childrenIattributes :: ([(Identifier,Attributes,Attributes)])+ _childrenIcollectChildrenInhs :: (Map Identifier Attributes )+ _childrenIcollectChildrenSyns :: (Map Identifier Attributes )+ _childrenIerrors :: (Seq Error)+ _childrenIfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _childrenIgathAltAttrs :: ([AltAttr])+ _childrenIgathRules :: (Seq CRule)+ _childrenIinhs :: (Seq (Identifier,Attributes))+ _childrenInts :: (Seq (Identifier,NontermIdent))+ _childrenIsinglevisits :: ([CRule])+ _childrenIterminals :: ([Identifier])+ _rulesIdirectDep :: (Seq Edge)+ _rulesIerrors :: (Seq Error)+ _rulesIgathAltAttrs :: ([AltAttr])+ _rulesIgathRules :: (Seq CRule)+ _rulesIinstDep :: (Seq Edge)+ _rulesIinstVars :: ([Identifier])+ _rulesIlocVars :: ([Identifier])+ _rulesInAutoRules :: Int+ _rulesInExplicitRules :: Int+ _typeSigsItypeSigs :: (Map Identifier Type)+ -- "Order.ag"(line 93, column 16)+ _childrenOcon =+ ({-# LINE 93 "Order.ag" #-}+ con_+ {-# LINE 3159 "Order.hs" #-})+ -- "Order.ag"(line 95, column 16)+ _rulesOcon =+ ({-# LINE 95 "Order.ag" #-}+ con_+ {-# LINE 3164 "Order.hs" #-})+ -- "Order.ag"(line 172, column 18)+ _gathAltAttrs =+ ({-# LINE 172 "Order.ag" #-}+ [ AltAttr _LHS inh True | inh <- Map.keys _lhsIinh ]+ ++ _childrenIgathAltAttrs+ ++ _rulesIgathAltAttrs+ {-# LINE 3171 "Order.hs" #-})+ -- "Order.ag"(line 188, column 17)+ _altAttrs =+ ({-# LINE 188 "Order.ag" #-}+ Map.fromList (zip _gathAltAttrs [_lhsIvcount..])+ {-# LINE 3176 "Order.hs" #-})+ -- "Order.ag"(line 201, column 18)+ _rulesOchildNts =+ ({-# LINE 201 "Order.ag" #-}+ Map.fromList (toList _childrenInts)+ {-# LINE 3181 "Order.hs" #-})+ -- "Order.ag"(line 202, column 19)+ _rulesOchildInhs =+ ({-# LINE 202 "Order.ag" #-}+ Map.fromList (toList _childrenIinhs)+ {-# LINE 3186 "Order.hs" #-})+ -- "Order.ag"(line 208, column 18)+ _inhRules =+ ({-# LINE 208 "Order.ag" #-}+ [ cRuleLhsInh inh _lhsInt con_ tp | (inh,tp) <- Map.assocs _lhsIinh ]+ {-# LINE 3191 "Order.hs" #-})+ -- "Order.ag"(line 209, column 19)+ _gathRules =+ ({-# LINE 209 "Order.ag" #-}+ _inhRules ++ toList (_childrenIgathRules Seq.>< _rulesIgathRules)+ {-# LINE 3196 "Order.hs" #-})+ -- "Order.ag"(line 263, column 18)+ _lhsOrules =+ ({-# LINE 263 "Order.ag" #-}+ Seq.fromList (zip [_lhsIvcount..] _gathRules)+ {-# LINE 3201 "Order.hs" #-})+ -- "Order.ag"(line 264, column 19)+ _lhsOvcount =+ ({-# LINE 264 "Order.ag" #-}+ _lhsIvcount + length _gathRules+ {-# LINE 3206 "Order.hs" #-})+ -- "Order.ag"(line 291, column 7)+ _manualDeps =+ ({-# LINE 291 "Order.ag" #-}+ Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrDepMap+ {-# LINE 3211 "Order.hs" #-})+ -- "Order.ag"(line 294, column 7)+ _lhsOadditionalDep =+ ({-# LINE 294 "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 3223 "Order.hs" #-})+ -- "Order.ag"(line 341, column 17)+ _rulesOsynsOfChildren =+ ({-# LINE 341 "Order.ag" #-}+ _childrenIcollectChildrenSyns+ {-# LINE 3228 "Order.hs" #-})+ -- "Order.ag"(line 342, column 17)+ _rulesOinhsOfChildren =+ ({-# LINE 342 "Order.ag" #-}+ _childrenIcollectChildrenInhs+ {-# LINE 3233 "Order.hs" #-})+ -- "Order.ag"(line 360, column 32)+ _mergeMap =+ ({-# LINE 360 "Order.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergeMap+ {-# LINE 3238 "Order.hs" #-})+ -- "Order.ag"(line 371, column 7)+ _lhsOmergeDep =+ ({-# LINE 371 "Order.ag" #-}+ _mergeDep1 Seq.>< _mergeDep2+ {-# LINE 3243 "Order.hs" #-})+ -- "Order.ag"(line 372, column 7)+ _mergeDep1 =+ ({-# LINE 372 "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 3257 "Order.hs" #-})+ -- "Order.ag"(line 383, column 7)+ _mergeDep2 =+ ({-# LINE 383 "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 3271 "Order.hs" #-})+ -- "Order.ag"(line 413, column 32)+ _aroundMap =+ ({-# LINE 413 "Order.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaroundMap+ {-# LINE 3276 "Order.hs" #-})+ -- "Order.ag"(line 420, column 6)+ _aroundDep1 =+ ({-# LINE 420 "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 3290 "Order.hs" #-})+ -- "Order.ag"(line 431, column 6)+ _aroundDep2 =+ ({-# LINE 431 "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 3304 "Order.hs" #-})+ -- "Order.ag"(line 442, column 6)+ _lhsOaroundDep =+ ({-# LINE 442 "Order.ag" #-}+ _aroundDep1 Seq.>< _aroundDep2+ {-# LINE 3309 "Order.hs" #-})+ -- "Order.ag"(line 522, column 18)+ _lhsOcons =+ ({-# LINE 522 "Order.ag" #-}+ [con_]+ {-# LINE 3314 "Order.hs" #-})+ -- "Order.ag"(line 529, column 16)+ _typeSigsOtypeSigs =+ ({-# LINE 529 "Order.ag" #-}+ Map.empty+ {-# LINE 3319 "Order.hs" #-})+ -- "Order.ag"(line 535, column 17)+ _rulesOallTypeSigs =+ ({-# LINE 535 "Order.ag" #-}+ _typeSigsItypeSigs+ {-# LINE 3324 "Order.hs" #-})+ -- "Order.ag"(line 603, column 17)+ _cVisits =+ ({-# LINE 603 "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 3334 "Order.hs" #-})+ -- "Order.ag"(line 629, column 18)+ _lhsOcProduction =+ ({-# LINE 629 "Order.ag" #-}+ CProduction con_ _cVisits _childrenIfields _childrenIterminals+ {-# LINE 3339 "Order.hs" #-})+ -- "Order.ag"(line 657, column 16)+ _allfields =+ ({-# LINE 657 "Order.ag" #-}+ _childrenIfields+ {-# LINE 3344 "Order.hs" #-})+ -- "Order.ag"(line 657, column 16)+ _attrs =+ ({-# LINE 658 "Order.ag" #-}+ map ((,) _LOC) _rulesIlocVars +++ map ((,) _INST) _rulesIinstVars +++ map ((,) _LHS) _inhnames +++ concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]+ {-# LINE 3352 "Order.hs" #-})+ -- "Order.ag"(line 657, column 16)+ _inhnames =+ ({-# LINE 662 "Order.ag" #-}+ Map.keys _lhsIinh+ {-# LINE 3357 "Order.hs" #-})+ -- "Order.ag"(line 657, column 16)+ _synnames =+ ({-# LINE 663 "Order.ag" #-}+ Map.keys _lhsIsyn+ {-# LINE 3362 "Order.hs" #-})+ -- use rule "Order.ag"(line 269, column 33)+ _lhsOdirectDep =+ ({-# LINE 269 "Order.ag" #-}+ _rulesIdirectDep+ {-# LINE 3367 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _childrenIerrors Seq.>< _rulesIerrors+ {-# LINE 3372 "Order.hs" #-})+ -- use rule "Order.ag"(line 312, column 31)+ _lhsOinstDep =+ ({-# LINE 312 "Order.ag" #-}+ _rulesIinstDep+ {-# LINE 3377 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnAutoRules =+ ({-# LINE 61 "Order.ag" #-}+ _rulesInAutoRules+ {-# LINE 3382 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 61 "Order.ag" #-}+ _rulesInExplicitRules+ {-# LINE 3387 "Order.hs" #-})+ -- copy rule (from local)+ _childrenOallfields =+ ({-# LINE 654 "Order.ag" #-}+ _allfields+ {-# LINE 3392 "Order.hs" #-})+ -- copy rule (down)+ _childrenOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 3397 "Order.hs" #-})+ -- copy rule (from local)+ _childrenOattrs =+ ({-# LINE 654 "Order.ag" #-}+ _attrs+ {-# LINE 3402 "Order.hs" #-})+ -- copy rule (down)+ _childrenOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 3407 "Order.hs" #-})+ -- copy rule (from local)+ _childrenOmergeMap =+ ({-# LINE 362 "Order.ag" #-}+ _mergeMap+ {-# LINE 3412 "Order.hs" #-})+ -- copy rule (down)+ _childrenOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 3417 "Order.hs" #-})+ -- copy rule (down)+ _childrenOo_unbox =+ ({-# LINE 119 "Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 3422 "Order.hs" #-})+ -- copy rule (down)+ _childrenOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 3427 "Order.hs" #-})+ -- copy rule (from local)+ _rulesOallfields =+ ({-# LINE 654 "Order.ag" #-}+ _allfields+ {-# LINE 3432 "Order.hs" #-})+ -- copy rule (down)+ _rulesOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 3437 "Order.hs" #-})+ -- copy rule (from local)+ _rulesOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _altAttrs+ {-# LINE 3442 "Order.hs" #-})+ -- copy rule (from local)+ _rulesOattrs =+ ({-# LINE 654 "Order.ag" #-}+ _attrs+ {-# LINE 3447 "Order.hs" #-})+ -- copy rule (down)+ _rulesOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 3452 "Order.hs" #-})+ -- copy rule (from local)+ _rulesOmergeMap =+ ({-# LINE 362 "Order.ag" #-}+ _mergeMap+ {-# LINE 3457 "Order.hs" #-})+ -- copy rule (down)+ _rulesOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 3462 "Order.hs" #-})+ -- copy rule (down)+ _rulesOo_case =+ ({-# LINE 117 "Order.ag" #-}+ _lhsIo_case+ {-# LINE 3467 "Order.hs" #-})+ -- copy rule (down)+ _rulesOo_cata =+ ({-# LINE 111 "Order.ag" #-}+ _lhsIo_cata+ {-# LINE 3472 "Order.hs" #-})+ -- copy rule (down)+ _rulesOo_dovisit =+ ({-# LINE 116 "Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 3477 "Order.hs" #-})+ -- copy rule (down)+ _rulesOo_newtypes =+ ({-# LINE 110 "Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 3482 "Order.hs" #-})+ -- copy rule (down)+ _rulesOo_rename =+ ({-# LINE 114 "Order.ag" #-}+ _lhsIo_rename+ {-# LINE 3487 "Order.hs" #-})+ -- copy rule (down)+ _rulesOo_sem =+ ({-# LINE 113 "Order.ag" #-}+ _lhsIo_sem+ {-# LINE 3492 "Order.hs" #-})+ -- copy rule (down)+ _rulesOo_sig =+ ({-# LINE 112 "Order.ag" #-}+ _lhsIo_sig+ {-# LINE 3497 "Order.hs" #-})+ -- copy rule (down)+ _rulesOo_wantvisit =+ ({-# LINE 115 "Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 3502 "Order.hs" #-})+ -- copy rule (down)+ _rulesOprefix =+ ({-# LINE 118 "Order.ag" #-}+ _lhsIprefix+ {-# LINE 3507 "Order.hs" #-})+ -- copy rule (down)+ _rulesOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 3512 "Order.hs" #-})+ ( _childrenIattributes,_childrenIcollectChildrenInhs,_childrenIcollectChildrenSyns,_childrenIerrors,_childrenIfields,_childrenIgathAltAttrs,_childrenIgathRules,_childrenIinhs,_childrenInts,_childrenIsinglevisits,_childrenIterminals) =+ children_ _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOmergeMap _childrenOnt _childrenOo_unbox _childrenOsyn + ( _rulesIdirectDep,_rulesIerrors,_rulesIgathAltAttrs,_rulesIgathRules,_rulesIinstDep,_rulesIinstVars,_rulesIlocVars,_rulesInAutoRules,_rulesInExplicitRules) =+ rules_ _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 + ( _typeSigsItypeSigs) =+ typeSigs_ _typeSigsOtypeSigs + in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))) )+-- Productions -------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allnts : [Identifier]+ aroundMap : Map ConstructorIdent (Map Identifier [Expression])+ cVisitsMap : CVisitsMap+ inh : Attributes+ manualAttrDepMap : AttrOrderMap+ mergeMap : Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))+ nt : Identifier+ o_case : Bool+ o_cata : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_unbox : Bool+ o_wantvisit : Bool+ prefix : String+ syn : Attributes+ chained attribute:+ vcount : Int+ synthesized attributes:+ additionalDep : Seq Edge+ aroundDep : Seq Edge+ cProductions : CProductions+ cons : [ConstructorIdent]+ directDep : Seq Edge+ errors : Seq Error+ instDep : Seq Edge+ mergeDep : Seq Edge+ nAutoRules : Int+ nExplicitRules : Int+ rules : Seq (Vertex,CRule)+ alternatives:+ alternative Cons:+ child hd : Production + child tl : Productions + alternative Nil:+-}+-- cata+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 (([Identifier]) ->+ (Map ConstructorIdent (Map Identifier [Expression])) ->+ CVisitsMap ->+ Attributes ->+ AttrOrderMap ->+ (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->+ Identifier ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ Bool ->+ String ->+ Attributes ->+ Int ->+ ( (Seq Edge),(Seq Edge),CProductions,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))+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),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),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)}+wrap_Productions :: T_Productions ->+ Inh_Productions ->+ Syn_Productions +wrap_Productions (T_Productions sem ) (Inh_Productions _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount ) =+ (let ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount) = sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount + in (Syn_Productions _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount ))+sem_Productions_Cons :: T_Production ->+ T_Productions ->+ T_Productions +sem_Productions_Cons (T_Production hd_ ) (T_Productions tl_ ) =+ (T_Productions (\ _lhsIallnts+ _lhsIaroundMap+ _lhsIcVisitsMap+ _lhsIinh+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsyn+ _lhsIvcount ->+ (let _lhsOcProductions :: CProductions+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaroundDep :: (Seq Edge)+ _lhsOcons :: ([ConstructorIdent])+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOvcount :: Int+ _hdOallnts :: ([Identifier])+ _hdOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+ _hdOcVisitsMap :: CVisitsMap+ _hdOinh :: Attributes+ _hdOmanualAttrDepMap :: AttrOrderMap+ _hdOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ _hdOnt :: Identifier+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_dovisit :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_unbox :: Bool+ _hdOo_wantvisit :: Bool+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _hdOvcount :: Int+ _tlOallnts :: ([Identifier])+ _tlOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+ _tlOcVisitsMap :: CVisitsMap+ _tlOinh :: Attributes+ _tlOmanualAttrDepMap :: AttrOrderMap+ _tlOmergeMap :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))+ _tlOnt :: Identifier+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_dovisit :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_unbox :: Bool+ _tlOo_wantvisit :: Bool+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _tlOvcount :: Int+ _hdIadditionalDep :: (Seq Edge)+ _hdIaroundDep :: (Seq Edge)+ _hdIcProduction :: CProduction+ _hdIcons :: ([ConstructorIdent])+ _hdIdirectDep :: (Seq Edge)+ _hdIerrors :: (Seq Error)+ _hdIinstDep :: (Seq Edge)+ _hdImergeDep :: (Seq Edge)+ _hdInAutoRules :: Int+ _hdInExplicitRules :: Int+ _hdIrules :: (Seq (Vertex,CRule))+ _hdIvcount :: Int+ _tlIadditionalDep :: (Seq Edge)+ _tlIaroundDep :: (Seq Edge)+ _tlIcProductions :: CProductions+ _tlIcons :: ([ConstructorIdent])+ _tlIdirectDep :: (Seq Edge)+ _tlIerrors :: (Seq Error)+ _tlIinstDep :: (Seq Edge)+ _tlImergeDep :: (Seq Edge)+ _tlInAutoRules :: Int+ _tlInExplicitRules :: Int+ _tlIrules :: (Seq (Vertex,CRule))+ _tlIvcount :: Int+ -- "Order.ag"(line 626, column 12)+ _lhsOcProductions =+ ({-# LINE 626 "Order.ag" #-}+ _hdIcProduction : _tlIcProductions+ {-# LINE 3697 "Order.hs" #-})+ -- use rule "Order.ag"(line 283, column 60)+ _lhsOadditionalDep =+ ({-# LINE 283 "Order.ag" #-}+ _hdIadditionalDep Seq.>< _tlIadditionalDep+ {-# LINE 3702 "Order.hs" #-})+ -- use rule "Order.ag"(line 404, column 24)+ _lhsOaroundDep =+ ({-# LINE 404 "Order.ag" #-}+ _hdIaroundDep Seq.>< _tlIaroundDep+ {-# LINE 3707 "Order.hs" #-})+ -- use rule "Order.ag"(line 520, column 40)+ _lhsOcons =+ ({-# LINE 520 "Order.ag" #-}+ _hdIcons ++ _tlIcons+ {-# LINE 3712 "Order.hs" #-})+ -- use rule "Order.ag"(line 269, column 33)+ _lhsOdirectDep =+ ({-# LINE 269 "Order.ag" #-}+ _hdIdirectDep Seq.>< _tlIdirectDep+ {-# LINE 3717 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 3722 "Order.hs" #-})+ -- use rule "Order.ag"(line 312, column 31)+ _lhsOinstDep =+ ({-# LINE 312 "Order.ag" #-}+ _hdIinstDep Seq.>< _tlIinstDep+ {-# LINE 3727 "Order.hs" #-})+ -- use rule "Order.ag"(line 367, column 18)+ _lhsOmergeDep =+ ({-# LINE 367 "Order.ag" #-}+ _hdImergeDep Seq.>< _tlImergeDep+ {-# LINE 3732 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnAutoRules =+ ({-# LINE 61 "Order.ag" #-}+ _hdInAutoRules + _tlInAutoRules+ {-# LINE 3737 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 61 "Order.ag" #-}+ _hdInExplicitRules + _tlInExplicitRules+ {-# LINE 3742 "Order.hs" #-})+ -- use rule "Order.ag"(line 259, column 18)+ _lhsOrules =+ ({-# LINE 259 "Order.ag" #-}+ _hdIrules Seq.>< _tlIrules+ {-# LINE 3747 "Order.hs" #-})+ -- copy rule (up)+ _lhsOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _tlIvcount+ {-# LINE 3752 "Order.hs" #-})+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 3757 "Order.hs" #-})+ -- copy rule (down)+ _hdOaroundMap =+ ({-# LINE 410 "Order.ag" #-}+ _lhsIaroundMap+ {-# LINE 3762 "Order.hs" #-})+ -- copy rule (down)+ _hdOcVisitsMap =+ ({-# LINE 601 "Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 3767 "Order.hs" #-})+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 3772 "Order.hs" #-})+ -- copy rule (down)+ _hdOmanualAttrDepMap =+ ({-# LINE 283 "Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 3777 "Order.hs" #-})+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 357 "Order.ag" #-}+ _lhsImergeMap+ {-# LINE 3782 "Order.hs" #-})+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 3787 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 117 "Order.ag" #-}+ _lhsIo_case+ {-# LINE 3792 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 111 "Order.ag" #-}+ _lhsIo_cata+ {-# LINE 3797 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_dovisit =+ ({-# LINE 116 "Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 3802 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 110 "Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 3807 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 114 "Order.ag" #-}+ _lhsIo_rename+ {-# LINE 3812 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 113 "Order.ag" #-}+ _lhsIo_sem+ {-# LINE 3817 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 112 "Order.ag" #-}+ _lhsIo_sig+ {-# LINE 3822 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_unbox =+ ({-# LINE 119 "Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 3827 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_wantvisit =+ ({-# LINE 115 "Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 3832 "Order.hs" #-})+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 118 "Order.ag" #-}+ _lhsIprefix+ {-# LINE 3837 "Order.hs" #-})+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 3842 "Order.hs" #-})+ -- copy rule (down)+ _hdOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _lhsIvcount+ {-# LINE 3847 "Order.hs" #-})+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 3852 "Order.hs" #-})+ -- copy rule (down)+ _tlOaroundMap =+ ({-# LINE 410 "Order.ag" #-}+ _lhsIaroundMap+ {-# LINE 3857 "Order.hs" #-})+ -- copy rule (down)+ _tlOcVisitsMap =+ ({-# LINE 601 "Order.ag" #-}+ _lhsIcVisitsMap+ {-# LINE 3862 "Order.hs" #-})+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 3867 "Order.hs" #-})+ -- copy rule (down)+ _tlOmanualAttrDepMap =+ ({-# LINE 283 "Order.ag" #-}+ _lhsImanualAttrDepMap+ {-# LINE 3872 "Order.hs" #-})+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 357 "Order.ag" #-}+ _lhsImergeMap+ {-# LINE 3877 "Order.hs" #-})+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 3882 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 117 "Order.ag" #-}+ _lhsIo_case+ {-# LINE 3887 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 111 "Order.ag" #-}+ _lhsIo_cata+ {-# LINE 3892 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_dovisit =+ ({-# LINE 116 "Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 3897 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 110 "Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 3902 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 114 "Order.ag" #-}+ _lhsIo_rename+ {-# LINE 3907 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 113 "Order.ag" #-}+ _lhsIo_sem+ {-# LINE 3912 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 112 "Order.ag" #-}+ _lhsIo_sig+ {-# LINE 3917 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_unbox =+ ({-# LINE 119 "Order.ag" #-}+ _lhsIo_unbox+ {-# LINE 3922 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_wantvisit =+ ({-# LINE 115 "Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 3927 "Order.hs" #-})+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 118 "Order.ag" #-}+ _lhsIprefix+ {-# LINE 3932 "Order.hs" #-})+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 3937 "Order.hs" #-})+ -- copy rule (chain)+ _tlOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _hdIvcount+ {-# LINE 3942 "Order.hs" #-})+ ( _hdIadditionalDep,_hdIaroundDep,_hdIcProduction,_hdIcons,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdImergeDep,_hdInAutoRules,_hdInExplicitRules,_hdIrules,_hdIvcount) =+ hd_ _hdOallnts _hdOaroundMap _hdOcVisitsMap _hdOinh _hdOmanualAttrDepMap _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOsyn _hdOvcount + ( _tlIadditionalDep,_tlIaroundDep,_tlIcProductions,_tlIcons,_tlIdirectDep,_tlIerrors,_tlIinstDep,_tlImergeDep,_tlInAutoRules,_tlInExplicitRules,_tlIrules,_tlIvcount) =+ tl_ _tlOallnts _tlOaroundMap _tlOcVisitsMap _tlOinh _tlOmanualAttrDepMap _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOsyn _tlOvcount + in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))) )+sem_Productions_Nil :: T_Productions +sem_Productions_Nil =+ (T_Productions (\ _lhsIallnts+ _lhsIaroundMap+ _lhsIcVisitsMap+ _lhsIinh+ _lhsImanualAttrDepMap+ _lhsImergeMap+ _lhsInt+ _lhsIo_case+ _lhsIo_cata+ _lhsIo_dovisit+ _lhsIo_newtypes+ _lhsIo_rename+ _lhsIo_sem+ _lhsIo_sig+ _lhsIo_unbox+ _lhsIo_wantvisit+ _lhsIprefix+ _lhsIsyn+ _lhsIvcount ->+ (let _lhsOcProductions :: CProductions+ _lhsOadditionalDep :: (Seq Edge)+ _lhsOaroundDep :: (Seq Edge)+ _lhsOcons :: ([ConstructorIdent])+ _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOinstDep :: (Seq Edge)+ _lhsOmergeDep :: (Seq Edge)+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _lhsOrules :: (Seq (Vertex,CRule))+ _lhsOvcount :: Int+ -- "Order.ag"(line 627, column 12)+ _lhsOcProductions =+ ({-# LINE 627 "Order.ag" #-}+ []+ {-# LINE 3985 "Order.hs" #-})+ -- use rule "Order.ag"(line 283, column 60)+ _lhsOadditionalDep =+ ({-# LINE 283 "Order.ag" #-}+ Seq.empty+ {-# LINE 3990 "Order.hs" #-})+ -- use rule "Order.ag"(line 404, column 24)+ _lhsOaroundDep =+ ({-# LINE 404 "Order.ag" #-}+ Seq.empty+ {-# LINE 3995 "Order.hs" #-})+ -- use rule "Order.ag"(line 520, column 40)+ _lhsOcons =+ ({-# LINE 520 "Order.ag" #-}+ []+ {-# LINE 4000 "Order.hs" #-})+ -- use rule "Order.ag"(line 269, column 33)+ _lhsOdirectDep =+ ({-# LINE 269 "Order.ag" #-}+ Seq.empty+ {-# LINE 4005 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ Seq.empty+ {-# LINE 4010 "Order.hs" #-})+ -- use rule "Order.ag"(line 312, column 31)+ _lhsOinstDep =+ ({-# LINE 312 "Order.ag" #-}+ Seq.empty+ {-# LINE 4015 "Order.hs" #-})+ -- use rule "Order.ag"(line 367, column 18)+ _lhsOmergeDep =+ ({-# LINE 367 "Order.ag" #-}+ Seq.empty+ {-# LINE 4020 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnAutoRules =+ ({-# LINE 61 "Order.ag" #-}+ 0+ {-# LINE 4025 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 61 "Order.ag" #-}+ 0+ {-# LINE 4030 "Order.hs" #-})+ -- use rule "Order.ag"(line 259, column 18)+ _lhsOrules =+ ({-# LINE 259 "Order.ag" #-}+ Seq.empty+ {-# LINE 4035 "Order.hs" #-})+ -- copy rule (chain)+ _lhsOvcount =+ ({-# LINE 258 "Order.ag" #-}+ _lhsIvcount+ {-# LINE 4040 "Order.hs" #-})+ in ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOmergeDep,_lhsOnAutoRules,_lhsOnExplicitRules,_lhsOrules,_lhsOvcount))) )+-- Rule --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allTypeSigs : Map Identifier Type+ allfields : [(Identifier,Type,Maybe (Maybe Type))]+ allnts : [Identifier]+ altAttrs : Map AltAttr Vertex+ attrs : [(Identifier,Identifier)]+ childInhs : Map Identifier Attributes+ childNts : Map Identifier NontermIdent+ con : Identifier+ inh : Attributes+ inhsOfChildren : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ o_case : Bool+ o_cata : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_wantvisit : Bool+ prefix : String+ syn : Attributes+ synsOfChildren : Map Identifier Attributes+ synthesized attributes:+ directDep : Seq Edge+ errors : Seq Error+ gathAltAttrs : [AltAttr]+ gathRules : Seq CRule+ instDep : Seq Edge+ instVars : [Identifier]+ locVars : [Identifier]+ nAutoRules : Int+ nExplicitRules : Int+ alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : Expression + child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ visit 0:+ local defines : _+ local gathRules : _+ local instDep1 : _+ local instDep2 : _+-}+-- cata+sem_Rule :: Rule ->+ T_Rule +sem_Rule (Rule _mbName _pattern _rhs _owrt _origin _explicit ) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit )+-- semantic domain+newtype T_Rule = T_Rule ((Map Identifier Type) ->+ ([(Identifier,Type,Maybe (Maybe Type))]) ->+ ([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) ->+ ( (Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier]),Int,Int))+data Inh_Rule = Inh_Rule {allTypeSigs_Inh_Rule :: !((Map Identifier Type)),allfields_Inh_Rule :: !(([(Identifier,Type,Maybe (Maybe Type))])),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)}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule +wrap_Rule (T_Rule sem ) (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 ) =+ (let ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules) = sem _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 + in (Syn_Rule _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules ))+sem_Rule_Rule :: (Maybe Identifier) ->+ T_Pattern ->+ T_Expression ->+ Bool ->+ String ->+ Bool ->+ T_Rule +sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ =+ (T_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 ->+ (let _lhsOnExplicitRules :: Int+ _lhsOnAutoRules :: Int+ _lhsOdirectDep :: (Seq Edge)+ _lhsOinstDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _patternOallTypeSigs :: (Map Identifier Type)+ _patternOaltAttrs :: (Map AltAttr Vertex)+ _patternOcon :: Identifier+ _patternOinh :: Attributes+ _patternOnt :: Identifier+ _patternOsyn :: Attributes+ _rhsOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _rhsOallnts :: ([Identifier])+ _rhsOattrs :: ([(Identifier,Identifier)])+ _rhsOcon :: Identifier+ _rhsOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _rhsOnt :: Identifier+ _patternIcopy :: Pattern + _patternIerrors :: (Seq Error)+ _patternIgathAltAttrs :: ([AltAttr])+ _patternIinstVars :: ([Identifier])+ _patternIlocVars :: ([Identifier])+ _patternIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])+ _rhsIallRhsVars :: (Set (Identifier,Identifier))+ _rhsIcopy :: Expression + _rhsIerrors :: (Seq Error)+ _rhsItextLines :: ([String])+ _rhsIusedAttrs :: ([(Identifier,Identifier)])+ _rhsIusedFields :: ([Identifier])+ _rhsIusedLocals :: ([Identifier])+ -- "Order.ag"(line 64, column 11)+ _lhsOnExplicitRules =+ ({-# LINE 64 "Order.ag" #-}+ if explicit_+ then 1+ else 0+ {-# LINE 4202 "Order.hs" #-})+ -- "Order.ag"(line 67, column 11)+ _lhsOnAutoRules =+ ({-# LINE 67 "Order.ag" #-}+ if startsWith "use rule" origin_ || startsWith "copy rule" origin_+ then 1+ else 0+ {-# LINE 4209 "Order.hs" #-})+ -- "Order.ag"(line 217, column 12)+ _defines =+ ({-# LINE 217 "Order.ag" #-}+ let tp field attr parts | field == _LOC || field == _INST+ = case parts of+ [] -> Map.lookup attr _lhsIallTypeSigs+ _ -> (sequence (map typ parts)) >>= (haskellTupel . map (substSelf _lhsInt))+ | field == _LHS = Map.lookup attr _lhsIsyn+ | otherwise = Map.lookup attr (findWithErr1 "Rule.defines.tp" field _lhsIchildInhs)+ typ :: Pattern -> Maybe Type+ typ (Alias field attr _ parts) = tp field attr parts+ typ (Underscore _) = Nothing+ typ (Product _ pats) = tp _LOC undefined pats+ typ _ = Nothing+ in Map.fromList [ (findWithErr1 "Rule.defines" aa _lhsIaltAttrs, (field,attr,(tp field attr parts)))+ | (field,attr,isLocalOrInst,parts) <- _patternIpatternAttrs+ , let aa = AltAttr field attr isLocalOrInst+ ]+ {-# LINE 4228 "Order.hs" #-})+ -- "Order.ag"(line 233, column 12)+ _gathRules =+ ({-# LINE 233 "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 4236 "Order.hs" #-})+ -- "Order.ag"(line 271, column 12)+ _lhsOdirectDep =+ ({-# LINE 271 "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 4244 "Order.hs" #-})+ -- "Order.ag"(line 315, column 6)+ _instDep1 =+ ({-# LINE 315 "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 4258 "Order.hs" #-})+ -- "Order.ag"(line 326, column 6)+ _instDep2 =+ ({-# LINE 326 "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 4272 "Order.hs" #-})+ -- "Order.ag"(line 337, column 6)+ _lhsOinstDep =+ ({-# LINE 337 "Order.ag" #-}+ _instDep1 Seq.>< _instDep2+ {-# LINE 4277 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _patternIerrors Seq.>< _rhsIerrors+ {-# LINE 4282 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ _patternIgathAltAttrs+ {-# LINE 4287 "Order.hs" #-})+ -- use rule "Order.ag"(line 206, column 23)+ _lhsOgathRules =+ ({-# LINE 206 "Order.ag" #-}+ _gathRules+ {-# LINE 4292 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 86)+ _lhsOinstVars =+ ({-# LINE 677 "Order.ag" #-}+ _patternIinstVars+ {-# LINE 4297 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 48)+ _lhsOlocVars =+ ({-# LINE 677 "Order.ag" #-}+ _patternIlocVars+ {-# LINE 4302 "Order.hs" #-})+ -- copy rule (down)+ _patternOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 4307 "Order.hs" #-})+ -- copy rule (down)+ _patternOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 4312 "Order.hs" #-})+ -- copy rule (down)+ _patternOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 4317 "Order.hs" #-})+ -- copy rule (down)+ _patternOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 4322 "Order.hs" #-})+ -- copy rule (down)+ _patternOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 4327 "Order.hs" #-})+ -- copy rule (down)+ _patternOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 4332 "Order.hs" #-})+ -- copy rule (down)+ _rhsOallfields =+ ({-# LINE 448 "Order.ag" #-}+ _lhsIallfields+ {-# LINE 4337 "Order.hs" #-})+ -- copy rule (down)+ _rhsOallnts =+ ({-# LINE 449 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 4342 "Order.hs" #-})+ -- copy rule (down)+ _rhsOattrs =+ ({-# LINE 450 "Order.ag" #-}+ _lhsIattrs+ {-# LINE 4347 "Order.hs" #-})+ -- copy rule (down)+ _rhsOcon =+ ({-# LINE 447 "Order.ag" #-}+ _lhsIcon+ {-# LINE 4352 "Order.hs" #-})+ -- copy rule (down)+ _rhsOmergeMap =+ ({-# LINE 362 "Order.ag" #-}+ _lhsImergeMap+ {-# LINE 4357 "Order.hs" #-})+ -- copy rule (down)+ _rhsOnt =+ ({-# LINE 447 "Order.ag" #-}+ _lhsInt+ {-# LINE 4362 "Order.hs" #-})+ ( _patternIcopy,_patternIerrors,_patternIgathAltAttrs,_patternIinstVars,_patternIlocVars,_patternIpatternAttrs) =+ pattern_ _patternOallTypeSigs _patternOaltAttrs _patternOcon _patternOinh _patternOnt _patternOsyn + ( _rhsIallRhsVars,_rhsIcopy,_rhsIerrors,_rhsItextLines,_rhsIusedAttrs,_rhsIusedFields,_rhsIusedLocals) =+ rhs_ _rhsOallfields _rhsOallnts _rhsOattrs _rhsOcon _rhsOmergeMap _rhsOnt + in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))) )+-- Rules -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allTypeSigs : Map Identifier Type+ allfields : [(Identifier,Type,Maybe (Maybe Type))]+ allnts : [Identifier]+ altAttrs : Map AltAttr Vertex+ attrs : [(Identifier,Identifier)]+ childInhs : Map Identifier Attributes+ childNts : Map Identifier NontermIdent+ con : Identifier+ inh : Attributes+ inhsOfChildren : Map Identifier Attributes+ mergeMap : Map Identifier (Identifier,[Identifier])+ nt : Identifier+ o_case : Bool+ o_cata : Bool+ o_dovisit : Bool+ o_newtypes : Bool+ o_rename : Bool+ o_sem : Bool+ o_sig : Bool+ o_wantvisit : Bool+ prefix : String+ syn : Attributes+ synsOfChildren : Map Identifier Attributes+ synthesized attributes:+ directDep : Seq Edge+ errors : Seq Error+ gathAltAttrs : [AltAttr]+ gathRules : Seq CRule+ instDep : Seq Edge+ instVars : [Identifier]+ locVars : [Identifier]+ nAutoRules : Int+ nExplicitRules : Int+ alternatives:+ alternative Cons:+ child hd : Rule + child tl : Rules + alternative Nil:+-}+-- cata+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 ((Map Identifier Type) ->+ ([(Identifier,Type,Maybe (Maybe Type))]) ->+ ([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) ->+ ( (Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier]),Int,Int))+data Inh_Rules = Inh_Rules {allTypeSigs_Inh_Rules :: !((Map Identifier Type)),allfields_Inh_Rules :: !(([(Identifier,Type,Maybe (Maybe Type))])),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)}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules +wrap_Rules (T_Rules sem ) (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 ) =+ (let ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules) = sem _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 + in (Syn_Rules _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules ))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules +sem_Rules_Cons (T_Rule hd_ ) (T_Rules tl_ ) =+ (T_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 ->+ (let _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinstDep :: (Seq Edge)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ _hdOallTypeSigs :: (Map Identifier Type)+ _hdOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _hdOallnts :: ([Identifier])+ _hdOaltAttrs :: (Map AltAttr Vertex)+ _hdOattrs :: ([(Identifier,Identifier)])+ _hdOchildInhs :: (Map Identifier Attributes)+ _hdOchildNts :: (Map Identifier NontermIdent)+ _hdOcon :: Identifier+ _hdOinh :: Attributes+ _hdOinhsOfChildren :: (Map Identifier Attributes)+ _hdOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _hdOnt :: Identifier+ _hdOo_case :: Bool+ _hdOo_cata :: Bool+ _hdOo_dovisit :: Bool+ _hdOo_newtypes :: Bool+ _hdOo_rename :: Bool+ _hdOo_sem :: Bool+ _hdOo_sig :: Bool+ _hdOo_wantvisit :: Bool+ _hdOprefix :: String+ _hdOsyn :: Attributes+ _hdOsynsOfChildren :: (Map Identifier Attributes)+ _tlOallTypeSigs :: (Map Identifier Type)+ _tlOallfields :: ([(Identifier,Type,Maybe (Maybe Type))])+ _tlOallnts :: ([Identifier])+ _tlOaltAttrs :: (Map AltAttr Vertex)+ _tlOattrs :: ([(Identifier,Identifier)])+ _tlOchildInhs :: (Map Identifier Attributes)+ _tlOchildNts :: (Map Identifier NontermIdent)+ _tlOcon :: Identifier+ _tlOinh :: Attributes+ _tlOinhsOfChildren :: (Map Identifier Attributes)+ _tlOmergeMap :: (Map Identifier (Identifier,[Identifier]))+ _tlOnt :: Identifier+ _tlOo_case :: Bool+ _tlOo_cata :: Bool+ _tlOo_dovisit :: Bool+ _tlOo_newtypes :: Bool+ _tlOo_rename :: Bool+ _tlOo_sem :: Bool+ _tlOo_sig :: Bool+ _tlOo_wantvisit :: Bool+ _tlOprefix :: String+ _tlOsyn :: Attributes+ _tlOsynsOfChildren :: (Map Identifier Attributes)+ _hdIdirectDep :: (Seq Edge)+ _hdIerrors :: (Seq Error)+ _hdIgathAltAttrs :: ([AltAttr])+ _hdIgathRules :: (Seq CRule)+ _hdIinstDep :: (Seq Edge)+ _hdIinstVars :: ([Identifier])+ _hdIlocVars :: ([Identifier])+ _hdInAutoRules :: Int+ _hdInExplicitRules :: Int+ _tlIdirectDep :: (Seq Edge)+ _tlIerrors :: (Seq Error)+ _tlIgathAltAttrs :: ([AltAttr])+ _tlIgathRules :: (Seq CRule)+ _tlIinstDep :: (Seq Edge)+ _tlIinstVars :: ([Identifier])+ _tlIlocVars :: ([Identifier])+ _tlInAutoRules :: Int+ _tlInExplicitRules :: Int+ -- use rule "Order.ag"(line 269, column 33)+ _lhsOdirectDep =+ ({-# LINE 269 "Order.ag" #-}+ _hdIdirectDep Seq.>< _tlIdirectDep+ {-# LINE 4553 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 4558 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ _hdIgathAltAttrs ++ _tlIgathAltAttrs+ {-# LINE 4563 "Order.hs" #-})+ -- use rule "Order.ag"(line 206, column 23)+ _lhsOgathRules =+ ({-# LINE 206 "Order.ag" #-}+ _hdIgathRules Seq.>< _tlIgathRules+ {-# LINE 4568 "Order.hs" #-})+ -- use rule "Order.ag"(line 312, column 31)+ _lhsOinstDep =+ ({-# LINE 312 "Order.ag" #-}+ _hdIinstDep Seq.>< _tlIinstDep+ {-# LINE 4573 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 86)+ _lhsOinstVars =+ ({-# LINE 677 "Order.ag" #-}+ _hdIinstVars ++ _tlIinstVars+ {-# LINE 4578 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 48)+ _lhsOlocVars =+ ({-# LINE 677 "Order.ag" #-}+ _hdIlocVars ++ _tlIlocVars+ {-# LINE 4583 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnAutoRules =+ ({-# LINE 61 "Order.ag" #-}+ _hdInAutoRules + _tlInAutoRules+ {-# LINE 4588 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 61 "Order.ag" #-}+ _hdInExplicitRules + _tlInExplicitRules+ {-# LINE 4593 "Order.hs" #-})+ -- copy rule (down)+ _hdOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 4598 "Order.hs" #-})+ -- copy rule (down)+ _hdOallfields =+ ({-# LINE 654 "Order.ag" #-}+ _lhsIallfields+ {-# LINE 4603 "Order.hs" #-})+ -- copy rule (down)+ _hdOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 4608 "Order.hs" #-})+ -- copy rule (down)+ _hdOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 4613 "Order.hs" #-})+ -- copy rule (down)+ _hdOattrs =+ ({-# LINE 654 "Order.ag" #-}+ _lhsIattrs+ {-# LINE 4618 "Order.hs" #-})+ -- copy rule (down)+ _hdOchildInhs =+ ({-# LINE 199 "Order.ag" #-}+ _lhsIchildInhs+ {-# LINE 4623 "Order.hs" #-})+ -- copy rule (down)+ _hdOchildNts =+ ({-# LINE 198 "Order.ag" #-}+ _lhsIchildNts+ {-# LINE 4628 "Order.hs" #-})+ -- copy rule (down)+ _hdOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 4633 "Order.hs" #-})+ -- copy rule (down)+ _hdOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 4638 "Order.hs" #-})+ -- copy rule (down)+ _hdOinhsOfChildren =+ ({-# LINE 339 "Order.ag" #-}+ _lhsIinhsOfChildren+ {-# LINE 4643 "Order.hs" #-})+ -- copy rule (down)+ _hdOmergeMap =+ ({-# LINE 362 "Order.ag" #-}+ _lhsImergeMap+ {-# LINE 4648 "Order.hs" #-})+ -- copy rule (down)+ _hdOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 4653 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_case =+ ({-# LINE 117 "Order.ag" #-}+ _lhsIo_case+ {-# LINE 4658 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_cata =+ ({-# LINE 111 "Order.ag" #-}+ _lhsIo_cata+ {-# LINE 4663 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_dovisit =+ ({-# LINE 116 "Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 4668 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_newtypes =+ ({-# LINE 110 "Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 4673 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_rename =+ ({-# LINE 114 "Order.ag" #-}+ _lhsIo_rename+ {-# LINE 4678 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_sem =+ ({-# LINE 113 "Order.ag" #-}+ _lhsIo_sem+ {-# LINE 4683 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_sig =+ ({-# LINE 112 "Order.ag" #-}+ _lhsIo_sig+ {-# LINE 4688 "Order.hs" #-})+ -- copy rule (down)+ _hdOo_wantvisit =+ ({-# LINE 115 "Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 4693 "Order.hs" #-})+ -- copy rule (down)+ _hdOprefix =+ ({-# LINE 118 "Order.ag" #-}+ _lhsIprefix+ {-# LINE 4698 "Order.hs" #-})+ -- copy rule (down)+ _hdOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 4703 "Order.hs" #-})+ -- copy rule (down)+ _hdOsynsOfChildren =+ ({-# LINE 339 "Order.ag" #-}+ _lhsIsynsOfChildren+ {-# LINE 4708 "Order.hs" #-})+ -- copy rule (down)+ _tlOallTypeSigs =+ ({-# LINE 533 "Order.ag" #-}+ _lhsIallTypeSigs+ {-# LINE 4713 "Order.hs" #-})+ -- copy rule (down)+ _tlOallfields =+ ({-# LINE 654 "Order.ag" #-}+ _lhsIallfields+ {-# LINE 4718 "Order.hs" #-})+ -- copy rule (down)+ _tlOallnts =+ ({-# LINE 647 "Order.ag" #-}+ _lhsIallnts+ {-# LINE 4723 "Order.hs" #-})+ -- copy rule (down)+ _tlOaltAttrs =+ ({-# LINE 186 "Order.ag" #-}+ _lhsIaltAttrs+ {-# LINE 4728 "Order.hs" #-})+ -- copy rule (down)+ _tlOattrs =+ ({-# LINE 654 "Order.ag" #-}+ _lhsIattrs+ {-# LINE 4733 "Order.hs" #-})+ -- copy rule (down)+ _tlOchildInhs =+ ({-# LINE 199 "Order.ag" #-}+ _lhsIchildInhs+ {-# LINE 4738 "Order.hs" #-})+ -- copy rule (down)+ _tlOchildNts =+ ({-# LINE 198 "Order.ag" #-}+ _lhsIchildNts+ {-# LINE 4743 "Order.hs" #-})+ -- copy rule (down)+ _tlOcon =+ ({-# LINE 90 "Order.ag" #-}+ _lhsIcon+ {-# LINE 4748 "Order.hs" #-})+ -- copy rule (down)+ _tlOinh =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIinh+ {-# LINE 4753 "Order.hs" #-})+ -- copy rule (down)+ _tlOinhsOfChildren =+ ({-# LINE 339 "Order.ag" #-}+ _lhsIinhsOfChildren+ {-# LINE 4758 "Order.hs" #-})+ -- copy rule (down)+ _tlOmergeMap =+ ({-# LINE 362 "Order.ag" #-}+ _lhsImergeMap+ {-# LINE 4763 "Order.hs" #-})+ -- copy rule (down)+ _tlOnt =+ ({-# LINE 89 "Order.ag" #-}+ _lhsInt+ {-# LINE 4768 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_case =+ ({-# LINE 117 "Order.ag" #-}+ _lhsIo_case+ {-# LINE 4773 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_cata =+ ({-# LINE 111 "Order.ag" #-}+ _lhsIo_cata+ {-# LINE 4778 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_dovisit =+ ({-# LINE 116 "Order.ag" #-}+ _lhsIo_dovisit+ {-# LINE 4783 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_newtypes =+ ({-# LINE 110 "Order.ag" #-}+ _lhsIo_newtypes+ {-# LINE 4788 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_rename =+ ({-# LINE 114 "Order.ag" #-}+ _lhsIo_rename+ {-# LINE 4793 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_sem =+ ({-# LINE 113 "Order.ag" #-}+ _lhsIo_sem+ {-# LINE 4798 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_sig =+ ({-# LINE 112 "Order.ag" #-}+ _lhsIo_sig+ {-# LINE 4803 "Order.hs" #-})+ -- copy rule (down)+ _tlOo_wantvisit =+ ({-# LINE 115 "Order.ag" #-}+ _lhsIo_wantvisit+ {-# LINE 4808 "Order.hs" #-})+ -- copy rule (down)+ _tlOprefix =+ ({-# LINE 118 "Order.ag" #-}+ _lhsIprefix+ {-# LINE 4813 "Order.hs" #-})+ -- copy rule (down)+ _tlOsyn =+ ({-# LINE 89 "Order.ag" #-}+ _lhsIsyn+ {-# LINE 4818 "Order.hs" #-})+ -- copy rule (down)+ _tlOsynsOfChildren =+ ({-# LINE 339 "Order.ag" #-}+ _lhsIsynsOfChildren+ {-# LINE 4823 "Order.hs" #-})+ ( _hdIdirectDep,_hdIerrors,_hdIgathAltAttrs,_hdIgathRules,_hdIinstDep,_hdIinstVars,_hdIlocVars,_hdInAutoRules,_hdInExplicitRules) =+ hd_ _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 + ( _tlIdirectDep,_tlIerrors,_tlIgathAltAttrs,_tlIgathRules,_tlIinstDep,_tlIinstVars,_tlIlocVars,_tlInAutoRules,_tlInExplicitRules) =+ tl_ _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 + in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))) )+sem_Rules_Nil :: T_Rules +sem_Rules_Nil =+ (T_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 ->+ (let _lhsOdirectDep :: (Seq Edge)+ _lhsOerrors :: (Seq Error)+ _lhsOgathAltAttrs :: ([AltAttr])+ _lhsOgathRules :: (Seq CRule)+ _lhsOinstDep :: (Seq Edge)+ _lhsOinstVars :: ([Identifier])+ _lhsOlocVars :: ([Identifier])+ _lhsOnAutoRules :: Int+ _lhsOnExplicitRules :: Int+ -- use rule "Order.ag"(line 269, column 33)+ _lhsOdirectDep =+ ({-# LINE 269 "Order.ag" #-}+ Seq.empty+ {-# LINE 4867 "Order.hs" #-})+ -- use rule "Order.ag"(line 84, column 70)+ _lhsOerrors =+ ({-# LINE 84 "Order.ag" #-}+ Seq.empty+ {-# LINE 4872 "Order.hs" #-})+ -- use rule "Order.ag"(line 170, column 68)+ _lhsOgathAltAttrs =+ ({-# LINE 170 "Order.ag" #-}+ []+ {-# LINE 4877 "Order.hs" #-})+ -- use rule "Order.ag"(line 206, column 23)+ _lhsOgathRules =+ ({-# LINE 206 "Order.ag" #-}+ Seq.empty+ {-# LINE 4882 "Order.hs" #-})+ -- use rule "Order.ag"(line 312, column 31)+ _lhsOinstDep =+ ({-# LINE 312 "Order.ag" #-}+ Seq.empty+ {-# LINE 4887 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 86)+ _lhsOinstVars =+ ({-# LINE 677 "Order.ag" #-}+ []+ {-# LINE 4892 "Order.hs" #-})+ -- use rule "Order.ag"(line 677, column 48)+ _lhsOlocVars =+ ({-# LINE 677 "Order.ag" #-}+ []+ {-# LINE 4897 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnAutoRules =+ ({-# LINE 61 "Order.ag" #-}+ 0+ {-# LINE 4902 "Order.hs" #-})+ -- use rule "Order.ag"(line 61, column 105)+ _lhsOnExplicitRules =+ ({-# LINE 61 "Order.ag" #-}+ 0+ {-# LINE 4907 "Order.hs" #-})+ in ( _lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars,_lhsOnAutoRules,_lhsOnExplicitRules))) )+-- TypeSig -----------------------------------------------------+{-+ visit 0:+ chained attribute:+ typeSigs : Map Identifier Type+ alternatives:+ alternative TypeSig:+ child name : {Identifier}+ child tp : {Type}+-}+-- cata+sem_TypeSig :: TypeSig ->+ T_TypeSig +sem_TypeSig (TypeSig _name _tp ) =+ (sem_TypeSig_TypeSig _name _tp )+-- semantic domain+newtype T_TypeSig = T_TypeSig ((Map Identifier Type) ->+ ( (Map Identifier Type)))+data Inh_TypeSig = Inh_TypeSig {typeSigs_Inh_TypeSig :: !((Map Identifier Type))}+data Syn_TypeSig = Syn_TypeSig {typeSigs_Syn_TypeSig :: !((Map Identifier Type))}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig +wrap_TypeSig (T_TypeSig sem ) (Inh_TypeSig _lhsItypeSigs ) =+ (let ( _lhsOtypeSigs) = sem _lhsItypeSigs + in (Syn_TypeSig _lhsOtypeSigs ))+sem_TypeSig_TypeSig :: Identifier ->+ Type ->+ T_TypeSig +sem_TypeSig_TypeSig name_ tp_ =+ (T_TypeSig (\ _lhsItypeSigs ->+ (let _lhsOtypeSigs :: (Map Identifier Type)+ -- "Order.ag"(line 531, column 13)+ _lhsOtypeSigs =+ ({-# LINE 531 "Order.ag" #-}+ Map.insert name_ tp_ _lhsItypeSigs+ {-# LINE 4945 "Order.hs" #-})+ in ( _lhsOtypeSigs))) )+-- TypeSigs ----------------------------------------------------+{-+ visit 0:+ chained attribute:+ typeSigs : Map Identifier Type+ alternatives:+ alternative Cons:+ child hd : TypeSig + child tl : TypeSigs + alternative Nil:+-}+-- cata+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 ((Map Identifier Type) ->+ ( (Map Identifier Type)))+data Inh_TypeSigs = Inh_TypeSigs {typeSigs_Inh_TypeSigs :: !((Map Identifier Type))}+data Syn_TypeSigs = Syn_TypeSigs {typeSigs_Syn_TypeSigs :: !((Map Identifier Type))}+wrap_TypeSigs :: T_TypeSigs ->+ Inh_TypeSigs ->+ Syn_TypeSigs +wrap_TypeSigs (T_TypeSigs sem ) (Inh_TypeSigs _lhsItypeSigs ) =+ (let ( _lhsOtypeSigs) = sem _lhsItypeSigs + in (Syn_TypeSigs _lhsOtypeSigs ))+sem_TypeSigs_Cons :: T_TypeSig ->+ T_TypeSigs ->+ T_TypeSigs +sem_TypeSigs_Cons (T_TypeSig hd_ ) (T_TypeSigs tl_ ) =+ (T_TypeSigs (\ _lhsItypeSigs ->+ (let _lhsOtypeSigs :: (Map Identifier Type)+ _hdOtypeSigs :: (Map Identifier Type)+ _tlOtypeSigs :: (Map Identifier Type)+ _hdItypeSigs :: (Map Identifier Type)+ _tlItypeSigs :: (Map Identifier Type)+ -- copy rule (up)+ _lhsOtypeSigs =+ ({-# LINE 527 "Order.ag" #-}+ _tlItypeSigs+ {-# LINE 4988 "Order.hs" #-})+ -- copy rule (down)+ _hdOtypeSigs =+ ({-# LINE 527 "Order.ag" #-}+ _lhsItypeSigs+ {-# LINE 4993 "Order.hs" #-})+ -- copy rule (chain)+ _tlOtypeSigs =+ ({-# LINE 527 "Order.ag" #-}+ _hdItypeSigs+ {-# LINE 4998 "Order.hs" #-})+ ( _hdItypeSigs) =+ hd_ _hdOtypeSigs + ( _tlItypeSigs) =+ tl_ _tlOtypeSigs + in ( _lhsOtypeSigs))) )+sem_TypeSigs_Nil :: T_TypeSigs +sem_TypeSigs_Nil =+ (T_TypeSigs (\ _lhsItypeSigs ->+ (let _lhsOtypeSigs :: (Map Identifier Type)+ -- copy rule (chain)+ _lhsOtypeSigs =+ ({-# LINE 527 "Order.ag" #-}+ _lhsItypeSigs+ {-# LINE 5012 "Order.hs" #-}) in ( _lhsOtypeSigs))) )
src-derived/Patterns.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (Patterns.ag)+-- UUAGC 0.9.30 (Patterns.ag) module Patterns where {-# LINE 2 "Patterns.ag" #-}
src-derived/PrintCode.hs view
@@ -1,3683 +1,3665 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.29 (PrintCode.ag)-module PrintCode where-{-# LINE 10 "PrintCode.ag" #-}--import Char (isAlphaNum)-import Pretty-import Code-import Patterns-import Options-import CommonTypes (attrname, _LOC, getName, nullIdent)-import Data.List(intersperse)-import System.IO-import System.Directory-import CommonTypes(BlockInfo, BlockType(..), identifier)-{-# LINE 18 "../src-derived/PrintCode.hs" #-}--{-# LINE 2 "./Code.ag" #-}--import Pretty-import Patterns-import Data.List(partition)-import Data.Set(Set)-import qualified Data.Set as Set-import Data.Map(Map)-import qualified Data.Map as Map-{-# LINE 29 "../src-derived/PrintCode.hs" #-}--{-# LINE 2 "./Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 36 "../src-derived/PrintCode.hs" #-}-{-# LINE 23 "PrintCode.ag" #-}--type PP_Docs = [PP_Doc]-{-# LINE 40 "../src-derived/PrintCode.hs" #-}--{-# LINE 27 "PrintCode.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 53 "../src-derived/PrintCode.hs" #-}--{-# LINE 293 "PrintCode.ag" #-}---reallySimple :: String -> Bool-reallySimple = and . map (\x -> isAlphaNum x || x=='_')--ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps-ppTuple False pps = "(" >|< pp_block " " ")" "," pps-ppUnboxedTuple True pps = "(# " >|< pp_block " " (concat $ replicate (length pps `max` 1) " #)") ",(# " pps-ppUnboxedTuple False pps = "(# " >|< pp_block " " " #)" "," pps--{-# LINE 66 "../src-derived/PrintCode.hs" #-}--{-# LINE 392 "PrintCode.ag" #-}--locname' n = "_loc_" ++ getName n-{-# LINE 71 "../src-derived/PrintCode.hs" #-}--{-# LINE 465 "PrintCode.ag" #-}--renderDocs :: [PP_Doc] -> String-renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""-{-# LINE 77 "../src-derived/PrintCode.hs" #-}--{-# LINE 512 "PrintCode.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 94 "../src-derived/PrintCode.hs" #-}--{-# LINE 143 "./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 113 "../src-derived/PrintCode.hs" #-}--- CaseAlt ------------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pps : PP_Docs- alternatives:- alternative CaseAlt:- child left : Lhs - child expr : Expr --}--- cata-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 (Bool ->- Options ->- String ->- ( PP_Docs))-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)}-wrap_CaseAlt :: T_CaseAlt ->- Inh_CaseAlt ->- Syn_CaseAlt -wrap_CaseAlt !(T_CaseAlt sem ) !(Inh_CaseAlt _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpps) =- (sem _lhsInested _lhsIoptions _lhsIoutputfile )- in (Syn_CaseAlt _lhsOpps ))-sem_CaseAlt_CaseAlt :: T_Lhs ->- T_Expr ->- T_CaseAlt -sem_CaseAlt_CaseAlt !(T_Lhs left_ ) !(T_Expr expr_ ) =- (T_CaseAlt (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 156 "PrintCode.hs" #-})) of- { !_exprOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 160 "PrintCode.hs" #-})) of- { !_exprOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 164 "PrintCode.hs" #-})) of- { !_exprOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 168 "PrintCode.hs" #-})) of- { !_leftOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 172 "PrintCode.hs" #-})) of- { !_leftOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 176 "PrintCode.hs" #-})) of- { !_leftOnested ->- (case (({-# LINE 415 "PrintCode.ag" #-}- False- {-# LINE 180 "PrintCode.hs" #-})) of- { !_leftOisDeclOfLet ->- (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of- { ( !_exprIpp) ->- (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of- { ( !_leftIpp) ->- (case (({-# LINE 217 "PrintCode.ag" #-}- ["{" >#< _leftIpp >#< "->", _exprIpp >#< "}"]- {-# LINE 188 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) }) })) )--- CaseAlts -----------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : CaseAlt - child tl : CaseAlts - alternative Nil:--}--- cata-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 (Bool ->- Options ->- String ->- ( PP_Docs))-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)}-wrap_CaseAlts :: T_CaseAlts ->- Inh_CaseAlts ->- Syn_CaseAlts -wrap_CaseAlts !(T_CaseAlts sem ) !(Inh_CaseAlts _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpps) =- (sem _lhsInested _lhsIoptions _lhsIoutputfile )- in (Syn_CaseAlts _lhsOpps ))-sem_CaseAlts_Cons :: T_CaseAlt ->- T_CaseAlts ->- T_CaseAlts -sem_CaseAlts_Cons !(T_CaseAlt hd_ ) !(T_CaseAlts tl_ ) =- (T_CaseAlts (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 234 "PrintCode.hs" #-})) of- { !_tlOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 238 "PrintCode.hs" #-})) of- { !_tlOoptions ->- (case (({-# LINE 55 "PrintCode.ag" #-}- _lhsInested- {-# LINE 242 "PrintCode.hs" #-})) of- { !_tlOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 246 "PrintCode.hs" #-})) of- { !_hdOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 250 "PrintCode.hs" #-})) of- { !_hdOoptions ->- (case (({-# LINE 55 "PrintCode.ag" #-}- _lhsInested- {-# LINE 254 "PrintCode.hs" #-})) of- { !_hdOnested ->- (case ((tl_ _tlOnested _tlOoptions _tlOoutputfile )) of- { ( !_tlIpps) ->- (case ((hd_ _hdOnested _hdOoptions _hdOoutputfile )) of- { ( !_hdIpps) ->- (case (({-# LINE 68 "PrintCode.ag" #-}- _hdIpps ++ _tlIpps- {-# LINE 262 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) })) )-sem_CaseAlts_Nil :: T_CaseAlts -sem_CaseAlts_Nil =- (T_CaseAlts (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 69 "PrintCode.ag" #-}- []- {-# LINE 272 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Chunk --------------------------------------------------------{-- visit 0:- inherited attributes:- importBlocks : PP_Doc- isDeclOfLet : Bool- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nested : Bool- options : Options- optionsLine : String- pragmaBlocks : String- textBlockMap : Map BlockInfo PP_Doc- textBlocks : PP_Doc- synthesized attributes:- appendCommon : [[PP_Doc]]- appendMain : [[PP_Doc]]- genSems : IO ()- imports : [String]- pps : PP_Docs- alternatives:- alternative Chunk:- child name : {String}- child comment : Decl - child info : Decls - child dataDef : Decls - child cataFun : Decls - child semDom : Decls - child semWrapper : Decls - child semFunctions : Decls - child semNames : {[String]}- visit 0:- local outputfile : _- local exports : _--}--- cata-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 (PP_Doc ->- Bool ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- Bool ->- Options ->- String ->- String ->- (Map BlockInfo PP_Doc) ->- PP_Doc ->- ( ([[PP_Doc]]),([[PP_Doc]]),(IO ()),([String]),PP_Docs))-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)}-wrap_Chunk :: T_Chunk ->- Inh_Chunk ->- Syn_Chunk -wrap_Chunk !(T_Chunk sem ) !(Inh_Chunk _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks ) =- (let ( !_lhsOappendCommon,!_lhsOappendMain,!_lhsOgenSems,!_lhsOimports,!_lhsOpps) =- (sem _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks )- in (Syn_Chunk _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps ))-sem_Chunk_Chunk :: String ->- T_Decl ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- ([String]) ->- T_Chunk -sem_Chunk_Chunk !name_ !(T_Decl comment_ ) !(T_Decls info_ ) !(T_Decls dataDef_ ) !(T_Decls cataFun_ ) !(T_Decls semDom_ ) !(T_Decls semWrapper_ ) !(T_Decls semFunctions_ ) !semNames_ =- (T_Chunk (\ (!_lhsIimportBlocks)- (!_lhsIisDeclOfLet)- (!_lhsImainFile)- (!_lhsImainName)- (!_lhsImoduleHeader)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoptionsLine)- (!_lhsIpragmaBlocks)- (!_lhsItextBlockMap)- (!_lhsItextBlocks) ->- (case (({-# LINE 43 "PrintCode.ag" #-}- if sepSemMods _lhsIoptions- then _lhsImainFile ++ "_" ++ name_ ++ ".hs"- else _lhsImainFile ++ ".hs"- {-# LINE 364 "PrintCode.hs" #-})) of- { !_outputfile ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _outputfile- {-# LINE 368 "PrintCode.hs" #-})) of- { !_semDomOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 372 "PrintCode.hs" #-})) of- { !_semDomOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 376 "PrintCode.hs" #-})) of- { !_semDomOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 380 "PrintCode.hs" #-})) of- { !_semDomOisDeclOfLet ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _outputfile- {-# LINE 384 "PrintCode.hs" #-})) of- { !_dataDefOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 388 "PrintCode.hs" #-})) of- { !_dataDefOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 392 "PrintCode.hs" #-})) of- { !_dataDefOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 396 "PrintCode.hs" #-})) of- { !_dataDefOisDeclOfLet ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _outputfile- {-# LINE 400 "PrintCode.hs" #-})) of- { !_commentOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 404 "PrintCode.hs" #-})) of- { !_commentOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 408 "PrintCode.hs" #-})) of- { !_commentOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 412 "PrintCode.hs" #-})) of- { !_commentOisDeclOfLet ->- (case ((semDom_ _semDomOisDeclOfLet _semDomOnested _semDomOoptions _semDomOoutputfile )) of- { ( !_semDomIpps) ->- (case ((dataDef_ _dataDefOisDeclOfLet _dataDefOnested _dataDefOoptions _dataDefOoutputfile )) of- { ( !_dataDefIpps) ->- (case ((comment_ _commentOisDeclOfLet _commentOnested _commentOoptions _commentOoutputfile )) of- { ( !_commentIpp) ->- (case (({-# LINE 479 "PrintCode.ag" #-}- [ [_commentIpp]- , _dataDefIpps- , _semDomIpps- ]- {-# LINE 425 "PrintCode.hs" #-})) of- { !_lhsOappendCommon ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _outputfile- {-# LINE 429 "PrintCode.hs" #-})) of- { !_semWrapperOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 433 "PrintCode.hs" #-})) of- { !_semWrapperOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 437 "PrintCode.hs" #-})) of- { !_semWrapperOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 441 "PrintCode.hs" #-})) of- { !_semWrapperOisDeclOfLet ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _outputfile- {-# LINE 445 "PrintCode.hs" #-})) of- { !_cataFunOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 449 "PrintCode.hs" #-})) of- { !_cataFunOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 453 "PrintCode.hs" #-})) of- { !_cataFunOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 457 "PrintCode.hs" #-})) of- { !_cataFunOisDeclOfLet ->- (case ((semWrapper_ _semWrapperOisDeclOfLet _semWrapperOnested _semWrapperOoptions _semWrapperOoutputfile )) of- { ( !_semWrapperIpps) ->- (case ((cataFun_ _cataFunOisDeclOfLet _cataFunOnested _cataFunOoptions _cataFunOoutputfile )) of- { ( !_cataFunIpps) ->- (case (({-# LINE 484 "PrintCode.ag" #-}- [ [_commentIpp]- , _cataFunIpps- , _semWrapperIpps- ]- {-# LINE 468 "PrintCode.hs" #-})) of- { !_lhsOappendMain ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _outputfile- {-# LINE 472 "PrintCode.hs" #-})) of- { !_semFunctionsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 476 "PrintCode.hs" #-})) of- { !_semFunctionsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 480 "PrintCode.hs" #-})) of- { !_semFunctionsOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 484 "PrintCode.hs" #-})) of- { !_semFunctionsOisDeclOfLet ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _outputfile- {-# LINE 488 "PrintCode.hs" #-})) of- { !_infoOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 492 "PrintCode.hs" #-})) of- { !_infoOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 496 "PrintCode.hs" #-})) of- { !_infoOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 500 "PrintCode.hs" #-})) of- { !_infoOisDeclOfLet ->- (case (({-# LINE 510 "PrintCode.ag" #-}- concat $ intersperse "," semNames_- {-# LINE 504 "PrintCode.hs" #-})) of- { !_exports ->- (case ((semFunctions_ _semFunctionsOisDeclOfLet _semFunctionsOnested _semFunctionsOoptions _semFunctionsOoutputfile )) of- { ( !_semFunctionsIpps) ->- (case ((info_ _infoOisDeclOfLet _infoOnested _infoOoptions _infoOoutputfile )) of- { ( !_infoIpps) ->- (case (({-# LINE 494 "PrintCode.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 523 "PrintCode.hs" #-})) of- { !_lhsOgenSems ->- (case (({-# LINE 473 "PrintCode.ag" #-}- ["import " ++ _lhsImainName ++ "_" ++ name_ ++ "\n"]- {-# LINE 527 "PrintCode.hs" #-})) of- { !_lhsOimports ->- (case (({-# LINE 96 "PrintCode.ag" #-}- _commentIpp- : _infoIpps- ++ _dataDefIpps- ++ _cataFunIpps- ++ _semDomIpps- ++ _semWrapperIpps- ++ _semFunctionsIpps- ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]- {-# LINE 538 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Chunks -------------------------------------------------------{-- visit 0:- inherited attributes:- importBlocks : PP_Doc- isDeclOfLet : Bool- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- nested : Bool- options : Options- optionsLine : String- pragmaBlocks : String- textBlockMap : Map BlockInfo PP_Doc- textBlocks : PP_Doc- synthesized attributes:- appendCommon : [[PP_Doc]]- appendMain : [[PP_Doc]]- genSems : IO ()- imports : [String]- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Chunk - child tl : Chunks - alternative Nil:--}--- cata-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 (PP_Doc ->- Bool ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- Bool ->- Options ->- String ->- String ->- (Map BlockInfo PP_Doc) ->- PP_Doc ->- ( ([[PP_Doc]]),([[PP_Doc]]),(IO ()),([String]),PP_Docs))-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)}-wrap_Chunks :: T_Chunks ->- Inh_Chunks ->- Syn_Chunks -wrap_Chunks !(T_Chunks sem ) !(Inh_Chunks _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks ) =- (let ( !_lhsOappendCommon,!_lhsOappendMain,!_lhsOgenSems,!_lhsOimports,!_lhsOpps) =- (sem _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks )- in (Syn_Chunks _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps ))-sem_Chunks_Cons :: T_Chunk ->- T_Chunks ->- T_Chunks -sem_Chunks_Cons !(T_Chunk hd_ ) !(T_Chunks tl_ ) =- (T_Chunks (\ (!_lhsIimportBlocks)- (!_lhsIisDeclOfLet)- (!_lhsImainFile)- (!_lhsImainName)- (!_lhsImoduleHeader)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoptionsLine)- (!_lhsIpragmaBlocks)- (!_lhsItextBlockMap)- (!_lhsItextBlocks) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 612 "PrintCode.hs" #-})) of- { !_tlOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 616 "PrintCode.hs" #-})) of- { !_tlOnested ->- (case (({-# LINE 430 "PrintCode.ag" #-}- _lhsImainFile- {-# LINE 620 "PrintCode.hs" #-})) of- { !_tlOmainFile ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 624 "PrintCode.hs" #-})) of- { !_tlOisDeclOfLet ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 628 "PrintCode.hs" #-})) of- { !_hdOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 632 "PrintCode.hs" #-})) of- { !_hdOnested ->- (case (({-# LINE 430 "PrintCode.ag" #-}- _lhsImainFile- {-# LINE 636 "PrintCode.hs" #-})) of- { !_hdOmainFile ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 640 "PrintCode.hs" #-})) of- { !_hdOisDeclOfLet ->- (case (({-# LINE 427 "PrintCode.ag" #-}- _lhsItextBlocks- {-# LINE 644 "PrintCode.hs" #-})) of- { !_tlOtextBlocks ->- (case (({-# LINE 428 "PrintCode.ag" #-}- _lhsItextBlockMap- {-# LINE 648 "PrintCode.hs" #-})) of- { !_tlOtextBlockMap ->- (case (({-# LINE 426 "PrintCode.ag" #-}- _lhsIpragmaBlocks- {-# LINE 652 "PrintCode.hs" #-})) of- { !_tlOpragmaBlocks ->- (case (({-# LINE 429 "PrintCode.ag" #-}- _lhsIoptionsLine- {-# LINE 656 "PrintCode.hs" #-})) of- { !_tlOoptionsLine ->- (case (({-# LINE 432 "PrintCode.ag" #-}- _lhsImoduleHeader- {-# LINE 660 "PrintCode.hs" #-})) of- { !_tlOmoduleHeader ->- (case (({-# LINE 431 "PrintCode.ag" #-}- _lhsImainName- {-# LINE 664 "PrintCode.hs" #-})) of- { !_tlOmainName ->- (case (({-# LINE 425 "PrintCode.ag" #-}- _lhsIimportBlocks- {-# LINE 668 "PrintCode.hs" #-})) of- { !_tlOimportBlocks ->- (case ((tl_ _tlOimportBlocks _tlOisDeclOfLet _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnested _tlOoptions _tlOoptionsLine _tlOpragmaBlocks _tlOtextBlockMap _tlOtextBlocks )) of- { ( !_tlIappendCommon,!_tlIappendMain,!_tlIgenSems,!_tlIimports,!_tlIpps) ->- (case (({-# LINE 427 "PrintCode.ag" #-}- _lhsItextBlocks- {-# LINE 674 "PrintCode.hs" #-})) of- { !_hdOtextBlocks ->- (case (({-# LINE 428 "PrintCode.ag" #-}- _lhsItextBlockMap- {-# LINE 678 "PrintCode.hs" #-})) of- { !_hdOtextBlockMap ->- (case (({-# LINE 426 "PrintCode.ag" #-}- _lhsIpragmaBlocks- {-# LINE 682 "PrintCode.hs" #-})) of- { !_hdOpragmaBlocks ->- (case (({-# LINE 429 "PrintCode.ag" #-}- _lhsIoptionsLine- {-# LINE 686 "PrintCode.hs" #-})) of- { !_hdOoptionsLine ->- (case (({-# LINE 432 "PrintCode.ag" #-}- _lhsImoduleHeader- {-# LINE 690 "PrintCode.hs" #-})) of- { !_hdOmoduleHeader ->- (case (({-# LINE 431 "PrintCode.ag" #-}- _lhsImainName- {-# LINE 694 "PrintCode.hs" #-})) of- { !_hdOmainName ->- (case (({-# LINE 425 "PrintCode.ag" #-}- _lhsIimportBlocks- {-# LINE 698 "PrintCode.hs" #-})) of- { !_hdOimportBlocks ->- (case ((hd_ _hdOimportBlocks _hdOisDeclOfLet _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnested _hdOoptions _hdOoptionsLine _hdOpragmaBlocks _hdOtextBlockMap _hdOtextBlocks )) of- { ( !_hdIappendCommon,!_hdIappendMain,!_hdIgenSems,!_hdIimports,!_hdIpps) ->- (case (({-# LINE 475 "PrintCode.ag" #-}- _hdIappendCommon ++ _tlIappendCommon- {-# LINE 704 "PrintCode.hs" #-})) of- { !_lhsOappendCommon ->- (case (({-# LINE 475 "PrintCode.ag" #-}- _hdIappendMain ++ _tlIappendMain- {-# LINE 708 "PrintCode.hs" #-})) of- { !_lhsOappendMain ->- (case (({-# LINE 490 "PrintCode.ag" #-}- _hdIgenSems >> _tlIgenSems- {-# LINE 712 "PrintCode.hs" #-})) of- { !_lhsOgenSems ->- (case (({-# LINE 470 "PrintCode.ag" #-}- _hdIimports ++ _tlIimports- {-# LINE 716 "PrintCode.hs" #-})) of- { !_lhsOimports ->- (case (({-# LINE 88 "PrintCode.ag" #-}- _hdIpps ++ _tlIpps- {-# LINE 720 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Chunks_Nil :: T_Chunks -sem_Chunks_Nil =- (T_Chunks (\ (!_lhsIimportBlocks)- (!_lhsIisDeclOfLet)- (!_lhsImainFile)- (!_lhsImainName)- (!_lhsImoduleHeader)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoptionsLine)- (!_lhsIpragmaBlocks)- (!_lhsItextBlockMap)- (!_lhsItextBlocks) ->- (case (({-# LINE 475 "PrintCode.ag" #-}- []- {-# LINE 738 "PrintCode.hs" #-})) of- { !_lhsOappendCommon ->- (case (({-# LINE 475 "PrintCode.ag" #-}- []- {-# LINE 742 "PrintCode.hs" #-})) of- { !_lhsOappendMain ->- (case (({-# LINE 490 "PrintCode.ag" #-}- return ()- {-# LINE 746 "PrintCode.hs" #-})) of- { !_lhsOgenSems ->- (case (({-# LINE 470 "PrintCode.ag" #-}- []- {-# LINE 750 "PrintCode.hs" #-})) of- { !_lhsOimports ->- (case (({-# LINE 89 "PrintCode.ag" #-}- []- {-# LINE 754 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) })) )--- DataAlt ------------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- strictPre : PP_Doc- synthesized attribute:- pp : PP_Doc- alternatives:- alternative DataAlt:- child name : {String}- child args : Types - alternative Record:- child name : {String}- child args : NamedTypes --}--- cata-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 (Bool ->- PP_Doc ->- ( PP_Doc))-data Inh_DataAlt = Inh_DataAlt {nested_Inh_DataAlt :: !(Bool),strictPre_Inh_DataAlt :: !(PP_Doc)}-data Syn_DataAlt = Syn_DataAlt {pp_Syn_DataAlt :: !(PP_Doc)}-wrap_DataAlt :: T_DataAlt ->- Inh_DataAlt ->- Syn_DataAlt -wrap_DataAlt !(T_DataAlt sem ) !(Inh_DataAlt _lhsInested _lhsIstrictPre ) =- (let ( !_lhsOpp) =- (sem _lhsInested _lhsIstrictPre )- in (Syn_DataAlt _lhsOpp ))-sem_DataAlt_DataAlt :: String ->- T_Types ->- T_DataAlt -sem_DataAlt_DataAlt !name_ !(T_Types args_ ) =- (T_DataAlt (\ (!_lhsInested)- (!_lhsIstrictPre) ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 801 "PrintCode.hs" #-})) of- { !_argsOnested ->- (case ((args_ _argsOnested )) of- { ( !_argsIpps) ->- (case (({-# LINE 220 "PrintCode.ag" #-}- name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens) _argsIpps)- {-# LINE 807 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_DataAlt_Record :: String ->- T_NamedTypes ->- T_DataAlt -sem_DataAlt_Record !name_ !(T_NamedTypes args_ ) =- (T_DataAlt (\ (!_lhsInested)- (!_lhsIstrictPre) ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 818 "PrintCode.hs" #-})) of- { !_argsOnested ->- (case ((args_ _argsOnested )) of- { ( !_argsIpps) ->- (case (({-# LINE 221 "PrintCode.ag" #-}- name_ >#< pp_block "{" "}" "," _argsIpps- {-# LINE 824 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )--- DataAlts -----------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- strictPre : PP_Doc- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : DataAlt - child tl : DataAlts - alternative Nil:--}--- cata-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 (Bool ->- PP_Doc ->- ( PP_Docs))-data Inh_DataAlts = Inh_DataAlts {nested_Inh_DataAlts :: !(Bool),strictPre_Inh_DataAlts :: !(PP_Doc)}-data Syn_DataAlts = Syn_DataAlts {pps_Syn_DataAlts :: !(PP_Docs)}-wrap_DataAlts :: T_DataAlts ->- Inh_DataAlts ->- Syn_DataAlts -wrap_DataAlts !(T_DataAlts sem ) !(Inh_DataAlts _lhsInested _lhsIstrictPre ) =- (let ( !_lhsOpps) =- (sem _lhsInested _lhsIstrictPre )- in (Syn_DataAlts _lhsOpps ))-sem_DataAlts_Cons :: T_DataAlt ->- T_DataAlts ->- T_DataAlts -sem_DataAlts_Cons !(T_DataAlt hd_ ) !(T_DataAlts tl_ ) =- (T_DataAlts (\ (!_lhsInested)- (!_lhsIstrictPre) ->- (case (({-# LINE 310 "PrintCode.ag" #-}- _lhsIstrictPre- {-# LINE 867 "PrintCode.hs" #-})) of- { !_tlOstrictPre ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 871 "PrintCode.hs" #-})) of- { !_tlOnested ->- (case (({-# LINE 310 "PrintCode.ag" #-}- _lhsIstrictPre- {-# LINE 875 "PrintCode.hs" #-})) of- { !_hdOstrictPre ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 879 "PrintCode.hs" #-})) of- { !_hdOnested ->- (case ((tl_ _tlOnested _tlOstrictPre )) of- { ( !_tlIpps) ->- (case ((hd_ _hdOnested _hdOstrictPre )) of- { ( !_hdIpp) ->- (case (({-# LINE 72 "PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 887 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) })) )-sem_DataAlts_Nil :: T_DataAlts -sem_DataAlts_Nil =- (T_DataAlts (\ (!_lhsInested)- (!_lhsIstrictPre) ->- (case (({-# LINE 73 "PrintCode.ag" #-}- []- {-# LINE 896 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Decl ---------------------------------------------------------{-- visit 0:- inherited attributes:- isDeclOfLet : Bool- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Bind:- child left : Lhs - child rhs : Expr - alternative BindLet:- child left : Lhs - child rhs : Expr - alternative Comment:- child txt : {String}- alternative Data:- child name : {String}- child params : {[String]}- child alts : DataAlts - child strict : {Bool}- child derivings : {[String]}- alternative Decl:- child left : Lhs - child rhs : Expr - child binds : {Set String}- child uses : {Set String}- alternative EvalDecl:- child nt : {String}- child left : Lhs - child rhs : Expr - visit 0:- local strat : _- alternative NewType:- child name : {String}- child params : {[String]}- child con : {String}- child tp : Type - alternative PragmaDecl:- child txt : {String}- alternative Resume:- child monadic : {Bool}- child nt : {String}- child left : Lhs - child rhs : Expr - alternative TSig:- child name : {String}- child tp : Type - alternative Type:- child name : {String}- child params : {[String]}- child tp : Type --}--- cata-sem_Decl :: Decl ->- T_Decl -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 !(Comment _txt ) =- (sem_Decl_Comment _txt )-sem_Decl !(Data _name _params _alts _strict _derivings ) =- (sem_Decl_Data _name _params (sem_DataAlts _alts ) _strict _derivings )-sem_Decl !(Decl _left _rhs _binds _uses ) =- (sem_Decl_Decl (sem_Lhs _left ) (sem_Expr _rhs ) _binds _uses )-sem_Decl !(EvalDecl _nt _left _rhs ) =- (sem_Decl_EvalDecl _nt (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(NewType _name _params _con _tp ) =- (sem_Decl_NewType _name _params _con (sem_Type _tp ) )-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 !(TSig _name _tp ) =- (sem_Decl_TSig _name (sem_Type _tp ) )-sem_Decl !(Type _name _params _tp ) =- (sem_Decl_Type _name _params (sem_Type _tp ) )--- semantic domain-newtype T_Decl = T_Decl (Bool ->- Bool ->- Options ->- String ->- ( PP_Doc))-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)}-wrap_Decl :: T_Decl ->- Inh_Decl ->- Syn_Decl -wrap_Decl !(T_Decl sem ) !(Inh_Decl _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpp) =- (sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile )- in (Syn_Decl _lhsOpp ))-sem_Decl_Bind :: T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_Bind !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1005 "PrintCode.hs" #-})) of- { !_rhsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1009 "PrintCode.hs" #-})) of- { !_rhsOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1013 "PrintCode.hs" #-})) of- { !_rhsOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1017 "PrintCode.hs" #-})) of- { !_leftOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1021 "PrintCode.hs" #-})) of- { !_leftOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1025 "PrintCode.hs" #-})) of- { !_leftOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1029 "PrintCode.hs" #-})) of- { !_leftOisDeclOfLet ->- (case ((rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile )) of- { ( !_rhsIpp) ->- (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of- { ( !_leftIpp) ->- (case (({-# LINE 108 "PrintCode.ag" #-}- _leftIpp >#< "<-" >#< _rhsIpp- {-# LINE 1037 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_BindLet :: T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_BindLet !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1050 "PrintCode.hs" #-})) of- { !_rhsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1054 "PrintCode.hs" #-})) of- { !_rhsOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1058 "PrintCode.hs" #-})) of- { !_rhsOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1062 "PrintCode.hs" #-})) of- { !_leftOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1066 "PrintCode.hs" #-})) of- { !_leftOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1070 "PrintCode.hs" #-})) of- { !_leftOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1074 "PrintCode.hs" #-})) of- { !_leftOisDeclOfLet ->- (case ((rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile )) of- { ( !_rhsIpp) ->- (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of- { ( !_leftIpp) ->- (case (({-# LINE 109 "PrintCode.ag" #-}- "let" >#< _leftIpp >#< "=" >#< _rhsIpp- {-# LINE 1082 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_Comment :: String ->- T_Decl -sem_Decl_Comment !txt_ =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 122 "PrintCode.ag" #-}- if '\n' `elem` txt_- then "{-" >-< vlist (lines txt_) >-< "-}"- else "--" >#< txt_- {-# LINE 1096 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Data :: String ->- ([String]) ->- T_DataAlts ->- Bool ->- ([String]) ->- T_Decl -sem_Decl_Data !name_ !params_ !(T_DataAlts alts_ ) !strict_ !derivings_ =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1112 "PrintCode.hs" #-})) of- { !_altsOnested ->- (case (({-# LINE 313 "PrintCode.ag" #-}- if strict_ then pp "!" else empty- {-# LINE 1116 "PrintCode.hs" #-})) of- { !_altsOstrictPre ->- (case ((alts_ _altsOnested _altsOstrictPre )) of- { ( !_altsIpps) ->- (case (({-# LINE 110 "PrintCode.ag" #-}- "data" >#< 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_)- )- {-# LINE 1130 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) })) )-sem_Decl_Decl :: T_Lhs ->- T_Expr ->- (Set String) ->- (Set String) ->- T_Decl -sem_Decl_Decl !(T_Lhs left_ ) !(T_Expr rhs_ ) !binds_ !uses_ =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1145 "PrintCode.hs" #-})) of- { !_rhsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1149 "PrintCode.hs" #-})) of- { !_rhsOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1153 "PrintCode.hs" #-})) of- { !_rhsOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1157 "PrintCode.hs" #-})) of- { !_leftOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1161 "PrintCode.hs" #-})) of- { !_leftOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1165 "PrintCode.hs" #-})) of- { !_leftOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1169 "PrintCode.hs" #-})) of- { !_leftOisDeclOfLet ->- (case ((rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile )) of- { ( !_rhsIpp) ->- (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of- { ( !_leftIpp) ->- (case (({-# LINE 106 "PrintCode.ag" #-}- _leftIpp >#< "="- >-< indent 4 _rhsIpp- {-# LINE 1178 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_EvalDecl :: String ->- T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_EvalDecl !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1192 "PrintCode.hs" #-})) of- { !_rhsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1196 "PrintCode.hs" #-})) of- { !_rhsOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1200 "PrintCode.hs" #-})) of- { !_rhsOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1204 "PrintCode.hs" #-})) of- { !_leftOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1208 "PrintCode.hs" #-})) of- { !_leftOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1212 "PrintCode.hs" #-})) of- { !_leftOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1216 "PrintCode.hs" #-})) of- { !_leftOisDeclOfLet ->- (case (({-# LINE 129 "PrintCode.ag" #-}- if breadthFirstStrict _lhsIoptions- then "strictEval"- else "lazyEval"- {-# LINE 1222 "PrintCode.hs" #-})) of- { !_strat ->- (case ((rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile )) of- { ( !_rhsIpp) ->- (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of- { ( !_leftIpp) ->- (case (({-# LINE 132 "PrintCode.ag" #-}- if breadthFirst _lhsIoptions- then _leftIpp >#< "=" >#< "case" >#< _strat >#< pp_parens _rhsIpp >#< "of"- >-< indent 4 (- pp_parens (nt_ >|< "_Syn" >#< "_val") >#< "-> _val"- )- else _leftIpp >#< "=" >#< _rhsIpp- {-# LINE 1235 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_NewType :: String ->- ([String]) ->- String ->- T_Type ->- T_Decl -sem_Decl_NewType !name_ !params_ !con_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1250 "PrintCode.hs" #-})) of- { !_tpOnested ->- (case ((tp_ _tpOnested )) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 119 "PrintCode.ag" #-}- "newtype" >#< hv_sp (name_ : params_) >#< "=" >#< con_ >#< pp_parens _tpIpp- {-# LINE 1256 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Decl_PragmaDecl :: String ->- T_Decl -sem_Decl_PragmaDecl !txt_ =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 125 "PrintCode.ag" #-}- "{-#" >#< text txt_ >#< "#-}"- {-# LINE 1268 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Resume :: Bool ->- String ->- T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_Resume !monadic_ !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1283 "PrintCode.hs" #-})) of- { !_rhsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1287 "PrintCode.hs" #-})) of- { !_rhsOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1291 "PrintCode.hs" #-})) of- { !_rhsOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1295 "PrintCode.hs" #-})) of- { !_leftOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1299 "PrintCode.hs" #-})) of- { !_leftOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1303 "PrintCode.hs" #-})) of- { !_leftOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1307 "PrintCode.hs" #-})) of- { !_leftOisDeclOfLet ->- (case ((rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile )) of- { ( !_rhsIpp) ->- (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of- { ( !_leftIpp) ->- (case (({-# LINE 126 "PrintCode.ag" #-}- if monadic_- then _leftIpp >#< "<-" >#< _rhsIpp- else _leftIpp >#< "=" >-< indent 4 _rhsIpp- {-# LINE 1317 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Decl_TSig :: String ->- T_Type ->- T_Decl -sem_Decl_TSig !name_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1330 "PrintCode.hs" #-})) of- { !_tpOnested ->- (case ((tp_ _tpOnested )) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 121 "PrintCode.ag" #-}- name_ >#< "::" >#< _tpIpp- {-# LINE 1336 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Decl_Type :: String ->- ([String]) ->- T_Type ->- T_Decl -sem_Decl_Type !name_ !params_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1350 "PrintCode.hs" #-})) of- { !_tpOnested ->- (case ((tp_ _tpOnested )) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 120 "PrintCode.ag" #-}- "type" >#< hv_sp (name_ : params_) >#< "=" >#< _tpIpp- {-# LINE 1356 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )--- Decls --------------------------------------------------------{-- visit 0:- inherited attributes:- isDeclOfLet : Bool- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Decl - child tl : Decls - alternative Nil:--}--- cata-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 (Bool ->- Bool ->- Options ->- String ->- ( PP_Docs))-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)}-wrap_Decls :: T_Decls ->- Inh_Decls ->- Syn_Decls -wrap_Decls !(T_Decls sem ) !(Inh_Decls _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpps) =- (sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile )- in (Syn_Decls _lhsOpps ))-sem_Decls_Cons :: T_Decl ->- T_Decls ->- T_Decls -sem_Decls_Cons !(T_Decl hd_ ) !(T_Decls tl_ ) =- (T_Decls (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1405 "PrintCode.hs" #-})) of- { !_tlOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1409 "PrintCode.hs" #-})) of- { !_tlOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1413 "PrintCode.hs" #-})) of- { !_tlOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1417 "PrintCode.hs" #-})) of- { !_tlOisDeclOfLet ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1421 "PrintCode.hs" #-})) of- { !_hdOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1425 "PrintCode.hs" #-})) of- { !_hdOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1429 "PrintCode.hs" #-})) of- { !_hdOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 1433 "PrintCode.hs" #-})) of- { !_hdOisDeclOfLet ->- (case ((tl_ _tlOisDeclOfLet _tlOnested _tlOoptions _tlOoutputfile )) of- { ( !_tlIpps) ->- (case ((hd_ _hdOisDeclOfLet _hdOnested _hdOoptions _hdOoutputfile )) of- { ( !_hdIpp) ->- (case (({-# LINE 84 "PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 1441 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) })) )-sem_Decls_Nil :: T_Decls -sem_Decls_Nil =- (T_Decls (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 85 "PrintCode.ag" #-}- []- {-# LINE 1452 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Expr ---------------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pp : PP_Doc- alternatives:- alternative App:- child name : {String}- child args : Exprs - alternative Case:- child expr : Expr - child alts : CaseAlts - alternative Do:- child stmts : Decls - child body : Expr - alternative InvokeExpr:- child nt : {String}- child expr : Expr - child args : Exprs - alternative Lambda:- child args : Exprs - child body : Expr - visit 0:- local addBang : _- local strictParams : _- alternative Let:- child decls : Decls - child body : Expr - alternative LineExpr:- child expr : Expr - alternative PragmaExpr:- child onLeftSide : {Bool}- child onNewLine : {Bool}- child txt : {String}- child expr : Expr - alternative ResultExpr:- child nt : {String}- child expr : Expr - alternative ResumeExpr:- child nt : {String}- child expr : Expr - child left : Lhs - child rhs : Expr - alternative SemFun:- child nt : {String}- child args : Exprs - child body : Expr - visit 0:- local addBang : _- local strictParams : _- alternative SimpleExpr:- child txt : {String}- alternative TextExpr:- child lns : {[String]}- alternative Trace:- child txt : {String}- child expr : Expr - alternative TupleExpr:- child exprs : Exprs - alternative TypedExpr:- child expr : Expr - child tp : Type - alternative UnboxedTupleExpr:- child exprs : Exprs --}--- cata-sem_Expr :: Expr ->- T_Expr -sem_Expr !(App _name _args ) =- (sem_Expr_App _name (sem_Exprs _args ) )-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 !(InvokeExpr _nt _expr _args ) =- (sem_Expr_InvokeExpr _nt (sem_Expr _expr ) (sem_Exprs _args ) )-sem_Expr !(Lambda _args _body ) =- (sem_Expr_Lambda (sem_Exprs _args ) (sem_Expr _body ) )-sem_Expr !(Let _decls _body ) =- (sem_Expr_Let (sem_Decls _decls ) (sem_Expr _body ) )-sem_Expr !(LineExpr _expr ) =- (sem_Expr_LineExpr (sem_Expr _expr ) )-sem_Expr !(PragmaExpr _onLeftSide _onNewLine _txt _expr ) =- (sem_Expr_PragmaExpr _onLeftSide _onNewLine _txt (sem_Expr _expr ) )-sem_Expr !(ResultExpr _nt _expr ) =- (sem_Expr_ResultExpr _nt (sem_Expr _expr ) )-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 ) )-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 !(TupleExpr _exprs ) =- (sem_Expr_TupleExpr (sem_Exprs _exprs ) )-sem_Expr !(TypedExpr _expr _tp ) =- (sem_Expr_TypedExpr (sem_Expr _expr ) (sem_Type _tp ) )-sem_Expr !(UnboxedTupleExpr _exprs ) =- (sem_Expr_UnboxedTupleExpr (sem_Exprs _exprs ) )--- semantic domain-newtype T_Expr = T_Expr (Bool ->- Options ->- String ->- ( PP_Doc))-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)}-wrap_Expr :: T_Expr ->- Inh_Expr ->- Syn_Expr -wrap_Expr !(T_Expr sem ) !(Inh_Expr _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpp) =- (sem _lhsInested _lhsIoptions _lhsIoutputfile )- in (Syn_Expr _lhsOpp ))-sem_Expr_App :: String ->- T_Exprs ->- T_Expr -sem_Expr_App !name_ !(T_Exprs args_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1584 "PrintCode.hs" #-})) of- { !_argsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1588 "PrintCode.hs" #-})) of- { !_argsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1592 "PrintCode.hs" #-})) of- { !_argsOnested ->- (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of- { ( !_argsIpps) ->- (case (({-# LINE 160 "PrintCode.ag" #-}- pp_parens $ name_ >#< hv_sp _argsIpps- {-# LINE 1598 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_Case :: T_Expr ->- T_CaseAlts ->- T_Expr -sem_Expr_Case !(T_Expr expr_ ) !(T_CaseAlts alts_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1610 "PrintCode.hs" #-})) of- { !_altsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1614 "PrintCode.hs" #-})) of- { !_altsOoptions ->- (case (({-# LINE 55 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1618 "PrintCode.hs" #-})) of- { !_altsOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1622 "PrintCode.hs" #-})) of- { !_exprOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1626 "PrintCode.hs" #-})) of- { !_exprOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1630 "PrintCode.hs" #-})) of- { !_exprOnested ->- (case ((alts_ _altsOnested _altsOoptions _altsOoutputfile )) of- { ( !_altsIpps) ->- (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of- { ( !_exprIpp) ->- (case (({-# LINE 143 "PrintCode.ag" #-}- pp_parens ( "case" >#< pp_parens _exprIpp >#< "of"- >-< (vlist _altsIpps)- )- {-# LINE 1640 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) })) )-sem_Expr_Do :: T_Decls ->- T_Expr ->- T_Expr -sem_Expr_Do !(T_Decls stmts_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1652 "PrintCode.hs" #-})) of- { !_bodyOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1656 "PrintCode.hs" #-})) of- { !_bodyOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1660 "PrintCode.hs" #-})) of- { !_bodyOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1664 "PrintCode.hs" #-})) of- { !_stmtsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1668 "PrintCode.hs" #-})) of- { !_stmtsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1672 "PrintCode.hs" #-})) of- { !_stmtsOnested ->- (case (({-# LINE 409 "PrintCode.ag" #-}- False- {-# LINE 1676 "PrintCode.hs" #-})) of- { !_stmtsOisDeclOfLet ->- (case ((body_ _bodyOnested _bodyOoptions _bodyOoutputfile )) of- { ( !_bodyIpp) ->- (case ((stmts_ _stmtsOisDeclOfLet _stmtsOnested _stmtsOoptions _stmtsOoutputfile )) of- { ( !_stmtsIpps) ->- (case (({-# LINE 146 "PrintCode.ag" #-}- pp_parens ( "do" >#< ( vlist _stmtsIpps- >-< ("return" >#< _bodyIpp))- )- {-# LINE 1686 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_InvokeExpr :: String ->- T_Expr ->- T_Exprs ->- T_Expr -sem_Expr_InvokeExpr !nt_ !(T_Expr expr_ ) !(T_Exprs args_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1699 "PrintCode.hs" #-})) of- { !_argsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1703 "PrintCode.hs" #-})) of- { !_argsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1707 "PrintCode.hs" #-})) of- { !_argsOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1711 "PrintCode.hs" #-})) of- { !_exprOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1715 "PrintCode.hs" #-})) of- { !_exprOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1719 "PrintCode.hs" #-})) of- { !_exprOnested ->- (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of- { ( !_argsIpps) ->- (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of- { ( !_exprIpp) ->- (case (({-# LINE 183 "PrintCode.ag" #-}- if breadthFirst _lhsIoptions- then "invoke" >#< pp_parens _exprIpp >#< pp_parens (- nt_ >|< "_Inh" >#< pp_parens (ppTuple False _argsIpps))- else _exprIpp >#< hv_sp _argsIpps- {-# LINE 1730 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) })) )-sem_Expr_Lambda :: T_Exprs ->- T_Expr ->- T_Expr -sem_Expr_Lambda !(T_Exprs args_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1742 "PrintCode.hs" #-})) of- { !_bodyOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1746 "PrintCode.hs" #-})) of- { !_bodyOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1750 "PrintCode.hs" #-})) of- { !_bodyOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1754 "PrintCode.hs" #-})) of- { !_argsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1758 "PrintCode.hs" #-})) of- { !_argsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1762 "PrintCode.hs" #-})) of- { !_argsOnested ->- (case (({-# LINE 152 "PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> pp_parens ("!" >|< p)- else id- {-# LINE 1768 "PrintCode.hs" #-})) of- { !_addBang ->- (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of- { ( !_argsIpps) ->- (case (({-# LINE 149 "PrintCode.ag" #-}- if strictSems _lhsIoptions- then _argsIpps- else []- {-# LINE 1776 "PrintCode.hs" #-})) of- { !_strictParams ->- (case ((body_ _bodyOnested _bodyOoptions _bodyOoutputfile )) of- { ( !_bodyIpp) ->- (case (({-# LINE 155 "PrintCode.ag" #-}- pp_parens ( "\\" >#< (vlist (map _addBang _argsIpps)) >#< "->"- >-< indent 4 (_strictParams `ppMultiSeqV` _bodyIpp)- )- {-# LINE 1784 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_Let :: T_Decls ->- T_Expr ->- T_Expr -sem_Expr_Let !(T_Decls decls_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1796 "PrintCode.hs" #-})) of- { !_bodyOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1800 "PrintCode.hs" #-})) of- { !_bodyOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1804 "PrintCode.hs" #-})) of- { !_bodyOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1808 "PrintCode.hs" #-})) of- { !_declsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1812 "PrintCode.hs" #-})) of- { !_declsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1816 "PrintCode.hs" #-})) of- { !_declsOnested ->- (case (({-# LINE 407 "PrintCode.ag" #-}- True- {-# LINE 1820 "PrintCode.hs" #-})) of- { !_declsOisDeclOfLet ->- (case ((body_ _bodyOnested _bodyOoptions _bodyOoutputfile )) of- { ( !_bodyIpp) ->- (case ((decls_ _declsOisDeclOfLet _declsOnested _declsOoptions _declsOoutputfile )) of- { ( !_declsIpps) ->- (case (({-# LINE 140 "PrintCode.ag" #-}- pp_parens ( "let" >#< (vlist _declsIpps)- >-< "in " >#< _bodyIpp- )- {-# LINE 1830 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_LineExpr :: T_Expr ->- T_Expr -sem_Expr_LineExpr !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1841 "PrintCode.hs" #-})) of- { !_exprOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1845 "PrintCode.hs" #-})) of- { !_exprOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1849 "PrintCode.hs" #-})) of- { !_exprOnested ->- (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of- { ( !_exprIpp) ->- (case (({-# LINE 177 "PrintCode.ag" #-}- _exprIpp >-< "{-# LINE" >#< ppWithLineNr (\n -> pp $ show $ n + 1) >#< show _lhsIoutputfile >#< "#-}"- {-# LINE 1855 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_PragmaExpr :: Bool ->- Bool ->- String ->- T_Expr ->- T_Expr -sem_Expr_PragmaExpr !onLeftSide_ !onNewLine_ !txt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1869 "PrintCode.hs" #-})) of- { !_exprOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1873 "PrintCode.hs" #-})) of- { !_exprOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1877 "PrintCode.hs" #-})) of- { !_exprOnested ->- (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of- { ( !_exprIpp) ->- (case (({-# LINE 166 "PrintCode.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 1893 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_ResultExpr :: String ->- T_Expr ->- T_Expr -sem_Expr_ResultExpr !nt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1905 "PrintCode.hs" #-})) of- { !_exprOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1909 "PrintCode.hs" #-})) of- { !_exprOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1913 "PrintCode.hs" #-})) of- { !_exprOnested ->- (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of- { ( !_exprIpp) ->- (case (({-# LINE 179 "PrintCode.ag" #-}- if breadthFirst _lhsIoptions- then "final" >#<- pp_parens (nt_ >|< "_Syn" >#< pp_parens _exprIpp)- else _exprIpp- {-# LINE 1922 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_ResumeExpr :: String ->- T_Expr ->- T_Lhs ->- T_Expr ->- T_Expr -sem_Expr_ResumeExpr !nt_ !(T_Expr expr_ ) !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1936 "PrintCode.hs" #-})) of- { !_rhsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1940 "PrintCode.hs" #-})) of- { !_rhsOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1944 "PrintCode.hs" #-})) of- { !_rhsOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1948 "PrintCode.hs" #-})) of- { !_leftOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1952 "PrintCode.hs" #-})) of- { !_leftOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1956 "PrintCode.hs" #-})) of- { !_leftOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 1960 "PrintCode.hs" #-})) of- { !_exprOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 1964 "PrintCode.hs" #-})) of- { !_exprOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 1968 "PrintCode.hs" #-})) of- { !_exprOnested ->- (case (({-# LINE 411 "PrintCode.ag" #-}- False- {-# LINE 1972 "PrintCode.hs" #-})) of- { !_leftOisDeclOfLet ->- (case ((rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile )) of- { ( !_rhsIpp) ->- (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of- { ( !_leftIpp) ->- (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of- { ( !_exprIpp) ->- (case (({-# LINE 187 "PrintCode.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 1993 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_SemFun :: String ->- T_Exprs ->- T_Expr ->- T_Expr -sem_Expr_SemFun !nt_ !(T_Exprs args_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2006 "PrintCode.hs" #-})) of- { !_bodyOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2010 "PrintCode.hs" #-})) of- { !_bodyOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2014 "PrintCode.hs" #-})) of- { !_bodyOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2018 "PrintCode.hs" #-})) of- { !_argsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2022 "PrintCode.hs" #-})) of- { !_argsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2026 "PrintCode.hs" #-})) of- { !_argsOnested ->- (case (({-# LINE 202 "PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> pp_parens ("!" >|< p)- else id- {-# LINE 2032 "PrintCode.hs" #-})) of- { !_addBang ->- (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of- { ( !_argsIpps) ->- (case (({-# LINE 199 "PrintCode.ag" #-}- if strictSems _lhsIoptions- then _argsIpps- else []- {-# LINE 2040 "PrintCode.hs" #-})) of- { !_strictParams ->- (case ((body_ _bodyOnested _bodyOoptions _bodyOoutputfile )) of- { ( !_bodyIpp) ->- (case (({-# LINE 205 "PrintCode.ag" #-}- if breadthFirst _lhsIoptions- then "Closure" >#< 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 2055 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_SimpleExpr :: String ->- T_Expr -sem_Expr_SimpleExpr !txt_ =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 161 "PrintCode.ag" #-}- text txt_- {-# LINE 2066 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_TextExpr :: ([String]) ->- T_Expr -sem_Expr_TextExpr !lns_ =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 162 "PrintCode.ag" #-}- vlist (map text lns_)- {-# LINE 2077 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_Trace :: String ->- T_Expr ->- T_Expr -sem_Expr_Trace !txt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2089 "PrintCode.hs" #-})) of- { !_exprOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2093 "PrintCode.hs" #-})) of- { !_exprOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2097 "PrintCode.hs" #-})) of- { !_exprOnested ->- (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of- { ( !_exprIpp) ->- (case (({-# LINE 163 "PrintCode.ag" #-}- "trace" >#< ( pp_parens ("\"" >|< text txt_ >|< "\"")- >-< pp_parens _exprIpp- )- {-# LINE 2105 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_TupleExpr :: T_Exprs ->- T_Expr -sem_Expr_TupleExpr !(T_Exprs exprs_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2116 "PrintCode.hs" #-})) of- { !_exprsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2120 "PrintCode.hs" #-})) of- { !_exprsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2124 "PrintCode.hs" #-})) of- { !_exprsOnested ->- (case ((exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile )) of- { ( !_exprsIpps) ->- (case (({-# LINE 158 "PrintCode.ag" #-}- ppTuple _lhsInested _exprsIpps- {-# LINE 2130 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_TypedExpr :: T_Expr ->- T_Type ->- T_Expr -sem_Expr_TypedExpr !(T_Expr expr_ ) !(T_Type tp_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2142 "PrintCode.hs" #-})) of- { !_tpOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2146 "PrintCode.hs" #-})) of- { !_exprOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2150 "PrintCode.hs" #-})) of- { !_exprOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2154 "PrintCode.hs" #-})) of- { !_exprOnested ->- (case ((tp_ _tpOnested )) of- { ( !_tpIpp,!_tpIprec) ->- (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of- { ( !_exprIpp) ->- (case (({-# LINE 178 "PrintCode.ag" #-}- pp_parens (_exprIpp >#< "::" >#< _tpIpp)- {-# LINE 2162 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) })) )-sem_Expr_UnboxedTupleExpr :: T_Exprs ->- T_Expr -sem_Expr_UnboxedTupleExpr !(T_Exprs exprs_ ) =- (T_Expr (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2173 "PrintCode.hs" #-})) of- { !_exprsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2177 "PrintCode.hs" #-})) of- { !_exprsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2181 "PrintCode.hs" #-})) of- { !_exprsOnested ->- (case ((exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile )) of- { ( !_exprsIpps) ->- (case (({-# LINE 159 "PrintCode.ag" #-}- ppUnboxedTuple _lhsInested _exprsIpps- {-# LINE 2187 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )--- Exprs --------------------------------------------------------{-- visit 0:- inherited attributes:- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Expr - child tl : Exprs - alternative Nil:--}--- cata-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 (Bool ->- Options ->- String ->- ( PP_Docs))-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)}-wrap_Exprs :: T_Exprs ->- Inh_Exprs ->- Syn_Exprs -wrap_Exprs !(T_Exprs sem ) !(Inh_Exprs _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpps) =- (sem _lhsInested _lhsIoptions _lhsIoutputfile )- in (Syn_Exprs _lhsOpps ))-sem_Exprs_Cons :: T_Expr ->- T_Exprs ->- T_Exprs -sem_Exprs_Cons !(T_Expr hd_ ) !(T_Exprs tl_ ) =- (T_Exprs (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2233 "PrintCode.hs" #-})) of- { !_tlOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2237 "PrintCode.hs" #-})) of- { !_tlOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2241 "PrintCode.hs" #-})) of- { !_tlOnested ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2245 "PrintCode.hs" #-})) of- { !_hdOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2249 "PrintCode.hs" #-})) of- { !_hdOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2253 "PrintCode.hs" #-})) of- { !_hdOnested ->- (case ((tl_ _tlOnested _tlOoptions _tlOoutputfile )) of- { ( !_tlIpps) ->- (case ((hd_ _hdOnested _hdOoptions _hdOoutputfile )) of- { ( !_hdIpp) ->- (case (({-# LINE 64 "PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 2261 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) })) )-sem_Exprs_Nil :: T_Exprs -sem_Exprs_Nil =- (T_Exprs (\ (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 65 "PrintCode.ag" #-}- []- {-# LINE 2271 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Lhs ----------------------------------------------------------{-- visit 0:- inherited attributes:- isDeclOfLet : Bool- nested : Bool- options : Options- outputfile : String- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Fun:- child name : {String}- child args : Exprs - visit 0:- local addBang : _- local strictGuard : _- local hasStrictVars : _- local addStrictGuard : _- alternative Pattern3:- child pat3 : Pattern - visit 0:- local hasStrictVars : _- local strictGuard : _- local addStrictGuard : _- alternative Pattern3SM:- child pat3 : Pattern - alternative TupleLhs:- child comps : {[String]}- visit 0:- local addBang : _- local hasStrictVars : _- local strictGuard : _- local addStrictGuard : _- alternative UnboxedTupleLhs:- child comps : {[String]}- visit 0:- local addBang : _- local hasStrictVars : _- local strictGuard : _- local addStrictGuard : _- alternative Unwrap:- child name : {String}- child sub : Lhs --}--- cata-sem_Lhs :: Lhs ->- T_Lhs -sem_Lhs !(Fun _name _args ) =- (sem_Lhs_Fun _name (sem_Exprs _args ) )-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 !(Unwrap _name _sub ) =- (sem_Lhs_Unwrap _name (sem_Lhs _sub ) )--- semantic domain-newtype T_Lhs = T_Lhs (Bool ->- Bool ->- Options ->- String ->- ( PP_Doc))-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)}-wrap_Lhs :: T_Lhs ->- Inh_Lhs ->- Syn_Lhs -wrap_Lhs !(T_Lhs sem ) !(Inh_Lhs _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile ) =- (let ( !_lhsOpp) =- (sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile )- in (Syn_Lhs _lhsOpp ))-sem_Lhs_Fun :: String ->- T_Exprs ->- T_Lhs -sem_Lhs_Fun !name_ !(T_Exprs args_ ) =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2359 "PrintCode.hs" #-})) of- { !_argsOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2363 "PrintCode.hs" #-})) of- { !_argsOoptions ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2367 "PrintCode.hs" #-})) of- { !_argsOnested ->- (case (({-# LINE 246 "PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> "!" >|< p- else id- {-# LINE 2373 "PrintCode.hs" #-})) of- { !_addBang ->- (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of- { ( !_argsIpps) ->- (case (({-# LINE 243 "PrintCode.ag" #-}- _argsIpps `ppMultiSeqH` (pp "True")- {-# LINE 2379 "PrintCode.hs" #-})) of- { !_strictGuard ->- (case (({-# LINE 242 "PrintCode.ag" #-}- not (null _argsIpps)- {-# LINE 2383 "PrintCode.hs" #-})) of- { !_hasStrictVars ->- (case (({-# LINE 241 "PrintCode.ag" #-}- if strictSems _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id- {-# LINE 2387 "PrintCode.hs" #-})) of- { !_addStrictGuard ->- (case (({-# LINE 254 "PrintCode.ag" #-}- _addStrictGuard (name_ >#< hv_sp (map _addBang _argsIpps))- {-# LINE 2391 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) }) })) )-sem_Lhs_Pattern3 :: T_Pattern ->- T_Lhs -sem_Lhs_Pattern3 !(T_Pattern pat3_ ) =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2403 "PrintCode.hs" #-})) of- { !_pat3Ooptions ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2407 "PrintCode.hs" #-})) of- { !_pat3OisDeclOfLet ->- (case (({-# LINE 373 "PrintCode.ag" #-}- False- {-# LINE 2411 "PrintCode.hs" #-})) of- { !_pat3ObelowIrrefutable ->- (case ((pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions )) of- { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->- (case (({-# LINE 233 "PrintCode.ag" #-}- not (null _pat3IstrictVars)- {-# LINE 2417 "PrintCode.hs" #-})) of- { !_hasStrictVars ->- (case (({-# LINE 232 "PrintCode.ag" #-}- _pat3IstrictVars `ppMultiSeqH` (pp "True")- {-# LINE 2421 "PrintCode.hs" #-})) of- { !_strictGuard ->- (case (({-# LINE 230 "PrintCode.ag" #-}- if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id- {-# LINE 2425 "PrintCode.hs" #-})) of- { !_addStrictGuard ->- (case (({-# LINE 250 "PrintCode.ag" #-}- _addStrictGuard _pat3Ipp- {-# LINE 2429 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) }) }) })) )-sem_Lhs_Pattern3SM :: T_Pattern ->- T_Lhs -sem_Lhs_Pattern3SM !(T_Pattern pat3_ ) =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2441 "PrintCode.hs" #-})) of- { !_pat3Ooptions ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2445 "PrintCode.hs" #-})) of- { !_pat3OisDeclOfLet ->- (case (({-# LINE 373 "PrintCode.ag" #-}- False- {-# LINE 2449 "PrintCode.hs" #-})) of- { !_pat3ObelowIrrefutable ->- (case ((pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions )) of- { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->- (case (({-# LINE 251 "PrintCode.ag" #-}- _pat3Ipp'- {-# LINE 2455 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Lhs_TupleLhs :: ([String]) ->- T_Lhs -sem_Lhs_TupleLhs !comps_ =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 246 "PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> "!" >|< p- else id- {-# LINE 2469 "PrintCode.hs" #-})) of- { !_addBang ->- (case (({-# LINE 238 "PrintCode.ag" #-}- not (null comps_)- {-# LINE 2473 "PrintCode.hs" #-})) of- { !_hasStrictVars ->- (case (({-# LINE 235 "PrintCode.ag" #-}- if stricterCases _lhsIoptions && not _lhsIisDeclOfLet- then map text comps_ `ppMultiSeqH` (pp "True")- else pp "True"- {-# LINE 2479 "PrintCode.hs" #-})) of- { !_strictGuard ->- (case (({-# LINE 230 "PrintCode.ag" #-}- if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id- {-# LINE 2483 "PrintCode.hs" #-})) of- { !_addStrictGuard ->- (case (({-# LINE 252 "PrintCode.ag" #-}- _addStrictGuard $ ppTuple _lhsInested (map (_addBang . text) comps_)- {-# LINE 2487 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Lhs_UnboxedTupleLhs :: ([String]) ->- T_Lhs -sem_Lhs_UnboxedTupleLhs !comps_ =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 246 "PrintCode.ag" #-}- if bangpats _lhsIoptions- then \p -> "!" >|< p- else id- {-# LINE 2501 "PrintCode.hs" #-})) of- { !_addBang ->- (case (({-# LINE 238 "PrintCode.ag" #-}- not (null comps_)- {-# LINE 2505 "PrintCode.hs" #-})) of- { !_hasStrictVars ->- (case (({-# LINE 235 "PrintCode.ag" #-}- if stricterCases _lhsIoptions && not _lhsIisDeclOfLet- then map text comps_ `ppMultiSeqH` (pp "True")- else pp "True"- {-# LINE 2511 "PrintCode.hs" #-})) of- { !_strictGuard ->- (case (({-# LINE 230 "PrintCode.ag" #-}- if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id- {-# LINE 2515 "PrintCode.hs" #-})) of- { !_addStrictGuard ->- (case (({-# LINE 253 "PrintCode.ag" #-}- _addStrictGuard $ ppUnboxedTuple _lhsInested (map (_addBang . text) comps_)- {-# LINE 2519 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Lhs_Unwrap :: String ->- T_Lhs ->- T_Lhs -sem_Lhs_Unwrap !name_ !(T_Lhs sub_ ) =- (T_Lhs (\ (!_lhsIisDeclOfLet)- (!_lhsInested)- (!_lhsIoptions)- (!_lhsIoutputfile) ->- (case (({-# LINE 39 "PrintCode.ag" #-}- _lhsIoutputfile- {-# LINE 2532 "PrintCode.hs" #-})) of- { !_subOoutputfile ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2536 "PrintCode.hs" #-})) of- { !_subOoptions ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2540 "PrintCode.hs" #-})) of- { !_subOnested ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2544 "PrintCode.hs" #-})) of- { !_subOisDeclOfLet ->- (case ((sub_ _subOisDeclOfLet _subOnested _subOoptions _subOoutputfile )) of- { ( !_subIpp) ->- (case (({-# LINE 255 "PrintCode.ag" #-}- pp_parens (name_ >#< _subIpp)- {-# LINE 2550 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) })) )--- NamedType ----------------------------------------------------{-- visit 0:- inherited attribute:- nested : Bool- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Named:- child strict : {Bool}- child name : {String}- child tp : Type --}--- cata-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 (Bool ->- ( PP_Doc))-data Inh_NamedType = Inh_NamedType {nested_Inh_NamedType :: !(Bool)}-data Syn_NamedType = Syn_NamedType {pp_Syn_NamedType :: !(PP_Doc)}-wrap_NamedType :: T_NamedType ->- Inh_NamedType ->- Syn_NamedType -wrap_NamedType !(T_NamedType sem ) !(Inh_NamedType _lhsInested ) =- (let ( !_lhsOpp) =- (sem _lhsInested )- in (Syn_NamedType _lhsOpp ))-sem_NamedType_Named :: Bool ->- String ->- T_Type ->- T_NamedType -sem_NamedType_Named !strict_ !name_ !(T_Type tp_ ) =- (T_NamedType (\ (!_lhsInested) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2591 "PrintCode.hs" #-})) of- { !_tpOnested ->- (case ((tp_ _tpOnested )) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 224 "PrintCode.ag" #-}- if strict_- then name_ >#< "::" >#< "!" >|< pp_parens _tpIpp- else name_ >#< "::" >#< _tpIpp- {-# LINE 2599 "PrintCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )--- NamedTypes ---------------------------------------------------{-- visit 0:- inherited attribute:- nested : Bool- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : NamedType - child tl : NamedTypes - alternative Nil:--}--- cata-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 (Bool ->- ( PP_Docs))-data Inh_NamedTypes = Inh_NamedTypes {nested_Inh_NamedTypes :: !(Bool)}-data Syn_NamedTypes = Syn_NamedTypes {pps_Syn_NamedTypes :: !(PP_Docs)}-wrap_NamedTypes :: T_NamedTypes ->- Inh_NamedTypes ->- Syn_NamedTypes -wrap_NamedTypes !(T_NamedTypes sem ) !(Inh_NamedTypes _lhsInested ) =- (let ( !_lhsOpps) =- (sem _lhsInested )- in (Syn_NamedTypes _lhsOpps ))-sem_NamedTypes_Cons :: T_NamedType ->- T_NamedTypes ->- T_NamedTypes -sem_NamedTypes_Cons !(T_NamedType hd_ ) !(T_NamedTypes tl_ ) =- (T_NamedTypes (\ (!_lhsInested) ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2639 "PrintCode.hs" #-})) of- { !_tlOnested ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 2643 "PrintCode.hs" #-})) of- { !_hdOnested ->- (case ((tl_ _tlOnested )) of- { ( !_tlIpps) ->- (case ((hd_ _hdOnested )) of- { ( !_hdIpp) ->- (case (({-# LINE 80 "PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 2651 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) })) )-sem_NamedTypes_Nil :: T_NamedTypes -sem_NamedTypes_Nil =- (T_NamedTypes (\ (!_lhsInested) ->- (case (({-# LINE 81 "PrintCode.ag" #-}- []- {-# LINE 2659 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attributes:- belowIrrefutable : Bool- isDeclOfLet : Bool- options : Options- synthesized attributes:- copy : SELF - isUnderscore : Bool- pp : PP_Doc- pp' : PP_Doc- strictVars : [PP_Doc]- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - child parts : Patterns - visit 0:- local copy : _- local ppVar : _- local addBang : _- local ppVarBang : _- local strictPatVars : _- local strictVar : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local copy : _- local addBang : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local copy : _- local addBang : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern !(Alias _field _attr _pat _parts ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )-sem_Pattern !(Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern !(Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern !(Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern !(Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (Bool ->- Bool ->- Options ->- ( Pattern ,Bool,PP_Doc,PP_Doc,([PP_Doc])))-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]))}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions ) =- (let ( !_lhsOcopy,!_lhsOisUnderscore,!_lhsOpp,!_lhsOpp',!_lhsOstrictVars) =- (sem _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions )- in (Syn_Pattern _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Patterns ->- T_Pattern -sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) !(T_Patterns parts_ ) =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2747 "PrintCode.hs" #-})) of- { !_partsOoptions ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2751 "PrintCode.hs" #-})) of- { !_partsOisDeclOfLet ->- (case (({-# LINE 366 "PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 2755 "PrintCode.hs" #-})) of- { !_partsObelowIrrefutable ->- (case ((parts_ _partsObelowIrrefutable _partsOisDeclOfLet _partsOoptions )) of- { ( !_partsIcopy,!_partsIpps,!_partsIpps',!_partsIstrictVars) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2761 "PrintCode.hs" #-})) of- { !_patOoptions ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2765 "PrintCode.hs" #-})) of- { !_patOisDeclOfLet ->- (case (({-# LINE 366 "PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 2769 "PrintCode.hs" #-})) of- { !_patObelowIrrefutable ->- (case ((pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions )) of- { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 2775 "PrintCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2779 "PrintCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 363 "PrintCode.ag" #-}- False- {-# LINE 2783 "PrintCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 352 "PrintCode.ag" #-}- pp (attrname False field_ attr_)- {-# LINE 2787 "PrintCode.hs" #-})) of- { !_ppVar ->- (case (({-# LINE 345 "PrintCode.ag" #-}- if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable- then \p -> "!" >|< p- else id- {-# LINE 2793 "PrintCode.hs" #-})) of- { !_addBang ->- (case (({-# LINE 353 "PrintCode.ag" #-}- _addBang $ _ppVar- {-# LINE 2797 "PrintCode.hs" #-})) of- { !_ppVarBang ->- (case (({-# LINE 354 "PrintCode.ag" #-}- if _patIisUnderscore- then _ppVarBang- else _ppVarBang >|< "@" >|< _patIpp- {-# LINE 2803 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 386 "PrintCode.ag" #-}- let attribute | field_ == _LOC || field_ == nullIdent = locname' attr_- | otherwise = attrname False field_ attr_- in attribute >|< "@" >|< _patIpp'- {-# LINE 2809 "PrintCode.hs" #-})) of- { !_lhsOpp' ->- (case (({-# LINE 326 "PrintCode.ag" #-}- if stricterCases _lhsIoptions && not _lhsIisDeclOfLet- then _patIstrictVars- else []- {-# LINE 2815 "PrintCode.hs" #-})) of- { !_strictPatVars ->- (case (({-# LINE 322 "PrintCode.ag" #-}- if strictCases _lhsIoptions && not _lhsIisDeclOfLet- then [_ppVar ]- else []- {-# LINE 2821 "PrintCode.hs" #-})) of- { !_strictVar ->- (case (({-# LINE 330 "PrintCode.ag" #-}- _strictVar ++ _strictPatVars- {-# LINE 2825 "PrintCode.hs" #-})) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2837 "PrintCode.hs" #-})) of- { !_patsOoptions ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2841 "PrintCode.hs" #-})) of- { !_patsOisDeclOfLet ->- (case (({-# LINE 366 "PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 2845 "PrintCode.hs" #-})) of- { !_patsObelowIrrefutable ->- (case ((pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions )) of- { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 2851 "PrintCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2855 "PrintCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 361 "PrintCode.ag" #-}- False- {-# LINE 2859 "PrintCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 345 "PrintCode.ag" #-}- if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable- then \p -> "!" >|< p- else id- {-# LINE 2865 "PrintCode.hs" #-})) of- { !_addBang ->- (case (({-# LINE 350 "PrintCode.ag" #-}- _addBang $ pp_parens $ name_ >#< hv_sp _patsIpps- {-# LINE 2869 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 384 "PrintCode.ag" #-}- pp_parens $ name_ >#< hv_sp (map pp_parens _patsIpps')- {-# LINE 2873 "PrintCode.hs" #-})) of- { !_lhsOpp' ->- (case (({-# LINE 319 "PrintCode.ag" #-}- _patsIstrictVars- {-# LINE 2877 "PrintCode.hs" #-})) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable !(T_Pattern pat_ ) =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2888 "PrintCode.hs" #-})) of- { !_patOoptions ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2892 "PrintCode.hs" #-})) of- { !_patOisDeclOfLet ->- (case (({-# LINE 369 "PrintCode.ag" #-}- True- {-# LINE 2896 "PrintCode.hs" #-})) of- { !_patObelowIrrefutable ->- (case ((pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions )) of- { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 2902 "PrintCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2906 "PrintCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 360 "PrintCode.ag" #-}- _patIisUnderscore- {-# LINE 2910 "PrintCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 357 "PrintCode.ag" #-}- text "~" >|< pp_parens _patIpp- {-# LINE 2914 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 389 "PrintCode.ag" #-}- text "~" >|< pp_parens _patIpp- {-# LINE 2918 "PrintCode.hs" #-})) of- { !_lhsOpp' ->- (case (({-# LINE 333 "PrintCode.ag" #-}- []- {-# LINE 2922 "PrintCode.hs" #-})) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 2934 "PrintCode.hs" #-})) of- { !_patsOoptions ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 2938 "PrintCode.hs" #-})) of- { !_patsOisDeclOfLet ->- (case (({-# LINE 366 "PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 2942 "PrintCode.hs" #-})) of- { !_patsObelowIrrefutable ->- (case ((pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions )) of- { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 2948 "PrintCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2952 "PrintCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 362 "PrintCode.ag" #-}- False- {-# LINE 2956 "PrintCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 345 "PrintCode.ag" #-}- if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable- then \p -> "!" >|< p- else id- {-# LINE 2962 "PrintCode.hs" #-})) of- { !_addBang ->- (case (({-# LINE 351 "PrintCode.ag" #-}- _addBang $ pp_block "(" ")" "," _patsIpps- {-# LINE 2966 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 385 "PrintCode.ag" #-}- pp_block "(" ")" "," _patsIpps'- {-# LINE 2970 "PrintCode.hs" #-})) of- { !_lhsOpp' ->- (case (({-# LINE 319 "PrintCode.ag" #-}- _patsIstrictVars- {-# LINE 2974 "PrintCode.hs" #-})) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore !pos_ =- (T_Pattern (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Underscore pos_- {-# LINE 2985 "PrintCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 2989 "PrintCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 364 "PrintCode.ag" #-}- True- {-# LINE 2993 "PrintCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 358 "PrintCode.ag" #-}- text "_"- {-# LINE 2997 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 390 "PrintCode.ag" #-}- text "_"- {-# LINE 3001 "PrintCode.hs" #-})) of- { !_lhsOpp' ->- (case (({-# LINE 319 "PrintCode.ag" #-}- []- {-# LINE 3005 "PrintCode.hs" #-})) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) })) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attributes:- belowIrrefutable : Bool- isDeclOfLet : Bool- options : Options- synthesized attributes:- copy : SELF - pps : [PP_Doc]- pps' : [PP_Doc]- strictVars : [PP_Doc]- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-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 (Bool ->- Bool ->- Options ->- ( Patterns ,([PP_Doc]),([PP_Doc]),([PP_Doc])))-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]))}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions ) =- (let ( !_lhsOcopy,!_lhsOpps,!_lhsOpps',!_lhsOstrictVars) =- (sem _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions )- in (Syn_Patterns _lhsOcopy _lhsOpps _lhsOpps' _lhsOstrictVars ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =- (T_Patterns (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 3058 "PrintCode.hs" #-})) of- { !_tlOoptions ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 3062 "PrintCode.hs" #-})) of- { !_tlOisDeclOfLet ->- (case (({-# LINE 366 "PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 3066 "PrintCode.hs" #-})) of- { !_tlObelowIrrefutable ->- (case ((tl_ _tlObelowIrrefutable _tlOisDeclOfLet _tlOoptions )) of- { ( !_tlIcopy,!_tlIpps,!_tlIpps',!_tlIstrictVars) ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _lhsIoptions- {-# LINE 3072 "PrintCode.hs" #-})) of- { !_hdOoptions ->- (case (({-# LINE 400 "PrintCode.ag" #-}- _lhsIisDeclOfLet- {-# LINE 3076 "PrintCode.hs" #-})) of- { !_hdOisDeclOfLet ->- (case (({-# LINE 366 "PrintCode.ag" #-}- _lhsIbelowIrrefutable- {-# LINE 3080 "PrintCode.hs" #-})) of- { !_hdObelowIrrefutable ->- (case ((hd_ _hdObelowIrrefutable _hdOisDeclOfLet _hdOoptions )) of- { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp,!_hdIpp',!_hdIstrictVars) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 3086 "PrintCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 3090 "PrintCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 340 "PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 3094 "PrintCode.hs" #-})) of- { !_lhsOpps ->- (case (({-# LINE 380 "PrintCode.ag" #-}- _hdIpp' : _tlIpps'- {-# LINE 3098 "PrintCode.hs" #-})) of- { !_lhsOpps' ->- (case (({-# LINE 319 "PrintCode.ag" #-}- _hdIstrictVars ++ _tlIstrictVars- {-# LINE 3102 "PrintCode.hs" #-})) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOpps,_lhsOpps',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ (!_lhsIbelowIrrefutable)- (!_lhsIisDeclOfLet)- (!_lhsIoptions) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- []- {-# LINE 3112 "PrintCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 3116 "PrintCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 341 "PrintCode.ag" #-}- []- {-# LINE 3120 "PrintCode.hs" #-})) of- { !_lhsOpps ->- (case (({-# LINE 381 "PrintCode.ag" #-}- []- {-# LINE 3124 "PrintCode.hs" #-})) of- { !_lhsOpps' ->- (case (({-# LINE 319 "PrintCode.ag" #-}- []- {-# LINE 3128 "PrintCode.hs" #-})) of- { !_lhsOstrictVars ->- ( _lhsOcopy,_lhsOpps,_lhsOpps',_lhsOstrictVars) }) }) }) }) })) )--- Program ------------------------------------------------------{-- visit 0:- inherited attributes:- importBlocks : PP_Doc- mainFile : String- mainName : String- moduleHeader : String -> String -> String -> Bool -> String- options : Options- optionsLine : String- pragmaBlocks : String- textBlockMap : Map BlockInfo PP_Doc- textBlocks : PP_Doc- synthesized attributes:- genIO : IO ()- output : PP_Docs- alternatives:- alternative Program:- child chunks : Chunks - child ordered : {Bool}- visit 0:- local options : _- local commonFile : _- local genCommonModule : _- local mainModuleFile : _- local genMainModule : _--}--- cata-sem_Program :: Program ->- T_Program -sem_Program !(Program _chunks _ordered ) =- (sem_Program_Program (sem_Chunks _chunks ) _ordered )--- semantic domain-newtype T_Program = T_Program (PP_Doc ->- String ->- String ->- (String -> String -> String -> Bool -> String) ->- Options ->- String ->- String ->- (Map BlockInfo PP_Doc) ->- PP_Doc ->- ( (IO ()),PP_Docs))-data Inh_Program = Inh_Program {importBlocks_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)}-wrap_Program :: T_Program ->- Inh_Program ->- Syn_Program -wrap_Program !(T_Program sem ) !(Inh_Program _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks ) =- (let ( !_lhsOgenIO,!_lhsOoutput) =- (sem _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks )- in (Syn_Program _lhsOgenIO _lhsOoutput ))-sem_Program_Program :: T_Chunks ->- Bool ->- T_Program -sem_Program_Program !(T_Chunks chunks_ ) !ordered_ =- (T_Program (\ (!_lhsIimportBlocks)- (!_lhsImainFile)- (!_lhsImainName)- (!_lhsImoduleHeader)- (!_lhsIoptions)- (!_lhsIoptionsLine)- (!_lhsIpragmaBlocks)- (!_lhsItextBlockMap)- (!_lhsItextBlocks) ->- (case (({-# LINE 428 "PrintCode.ag" #-}- _lhsItextBlockMap- {-# LINE 3198 "PrintCode.hs" #-})) of- { !_chunksOtextBlockMap ->- (case (({-# LINE 426 "PrintCode.ag" #-}- _lhsIpragmaBlocks- {-# LINE 3202 "PrintCode.hs" #-})) of- { !_chunksOpragmaBlocks ->- (case (({-# LINE 429 "PrintCode.ag" #-}- _lhsIoptionsLine- {-# LINE 3206 "PrintCode.hs" #-})) of- { !_chunksOoptionsLine ->- (case (({-# LINE 58 "PrintCode.ag" #-}- _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && ordered_ }- {-# LINE 3210 "PrintCode.hs" #-})) of- { !_options ->- (case (({-# LINE 49 "PrintCode.ag" #-}- _options- {-# LINE 3214 "PrintCode.hs" #-})) of- { !_chunksOoptions ->- (case (({-# LINE 432 "PrintCode.ag" #-}- _lhsImoduleHeader- {-# LINE 3218 "PrintCode.hs" #-})) of- { !_chunksOmoduleHeader ->- (case (({-# LINE 431 "PrintCode.ag" #-}- _lhsImainName- {-# LINE 3222 "PrintCode.hs" #-})) of- { !_chunksOmainName ->- (case (({-# LINE 430 "PrintCode.ag" #-}- _lhsImainFile- {-# LINE 3226 "PrintCode.hs" #-})) of- { !_chunksOmainFile ->- (case (({-# LINE 449 "PrintCode.ag" #-}- _lhsImainFile ++ "_common.hs"- {-# LINE 3230 "PrintCode.hs" #-})) of- { !_commonFile ->- (case (({-# LINE 403 "PrintCode.ag" #-}- False- {-# LINE 3234 "PrintCode.hs" #-})) of- { !_chunksOisDeclOfLet ->- (case (({-# LINE 61 "PrintCode.ag" #-}- nest _lhsIoptions- {-# LINE 3238 "PrintCode.hs" #-})) of- { !_chunksOnested ->- (case (({-# LINE 427 "PrintCode.ag" #-}- _lhsItextBlocks- {-# LINE 3242 "PrintCode.hs" #-})) of- { !_chunksOtextBlocks ->- (case (({-# LINE 425 "PrintCode.ag" #-}- _lhsIimportBlocks- {-# LINE 3246 "PrintCode.hs" #-})) of- { !_chunksOimportBlocks ->- (case ((chunks_ _chunksOimportBlocks _chunksOisDeclOfLet _chunksOmainFile _chunksOmainName _chunksOmoduleHeader _chunksOnested _chunksOoptions _chunksOoptionsLine _chunksOpragmaBlocks _chunksOtextBlockMap _chunksOtextBlocks )) of- { ( !_chunksIappendCommon,!_chunksIappendMain,!_chunksIgenSems,!_chunksIimports,!_chunksIpps) ->- (case (({-# LINE 450 "PrintCode.ag" #-}- writeModule _commonFile- ( [ pp $ _lhsIpragmaBlocks- , pp $ _lhsIoptionsLine- , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True- , _lhsIimportBlocks- , _lhsItextBlocks- ]- ++ map vlist _chunksIappendCommon- )- {-# LINE 3260 "PrintCode.hs" #-})) of- { !_genCommonModule ->- (case (({-# LINE 437 "PrintCode.ag" #-}- _lhsImainFile ++ ".hs"- {-# LINE 3264 "PrintCode.hs" #-})) of- { !_mainModuleFile ->- (case (({-# LINE 438 "PrintCode.ag" #-}- writeModule _mainModuleFile- ( [ pp $ _lhsIpragmaBlocks- , pp $ _lhsIoptionsLine- , pp $ _lhsImoduleHeader _lhsImainName "" "" False- , pp $ ("import " ++ _lhsImainName ++ "_common\n")- ]- ++ map pp _chunksIimports- ++ map vlist _chunksIappendMain- )- {-# LINE 3276 "PrintCode.hs" #-})) of- { !_genMainModule ->- (case (({-# LINE 461 "PrintCode.ag" #-}- do _genMainModule- _genCommonModule- _chunksIgenSems- {-# LINE 3282 "PrintCode.hs" #-})) of- { !_lhsOgenIO ->- (case (({-# LINE 93 "PrintCode.ag" #-}- _chunksIpps- {-# LINE 3286 "PrintCode.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOgenIO,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Type ---------------------------------------------------------{-- visit 0:- inherited attribute:- nested : Bool- synthesized attributes:- pp : PP_Doc- prec : Int- alternatives:- alternative Arr:- child left : Type - child right : Type - visit 0:- local r : _- local l : _- alternative CtxApp:- child left : {[(String, [String])]}- child right : Type - alternative List:- child tp : Type - alternative NontermType:- child name : {String}- child params : {[String]}- alternative SimpleType:- child txt : {String}- alternative TEither:- child left : Type - child right : Type - alternative TIntMap:- child value : Type - alternative TMap:- child key : Type - child value : Type - alternative TMaybe:- child tp : Type - alternative TupleType:- child tps : Types - alternative TypeApp:- child func : Type - child args : Types - alternative UnboxedTupleType:- child tps : Types --}--- cata-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 !(List _tp ) =- (sem_Type_List (sem_Type _tp ) )-sem_Type !(NontermType _name _params ) =- (sem_Type_NontermType _name _params )-sem_Type !(SimpleType _txt ) =- (sem_Type_SimpleType _txt )-sem_Type !(TEither _left _right ) =- (sem_Type_TEither (sem_Type _left ) (sem_Type _right ) )-sem_Type !(TIntMap _value ) =- (sem_Type_TIntMap (sem_Type _value ) )-sem_Type !(TMap _key _value ) =- (sem_Type_TMap (sem_Type _key ) (sem_Type _value ) )-sem_Type !(TMaybe _tp ) =- (sem_Type_TMaybe (sem_Type _tp ) )-sem_Type !(TupleType _tps ) =- (sem_Type_TupleType (sem_Types _tps ) )-sem_Type !(TypeApp _func _args ) =- (sem_Type_TypeApp (sem_Type _func ) (sem_Types _args ) )-sem_Type !(UnboxedTupleType _tps ) =- (sem_Type_UnboxedTupleType (sem_Types _tps ) )--- semantic domain-newtype T_Type = T_Type (Bool ->- ( PP_Doc,Int))-data Inh_Type = Inh_Type {nested_Inh_Type :: !(Bool)}-data Syn_Type = Syn_Type {pp_Syn_Type :: !(PP_Doc),prec_Syn_Type :: !(Int)}-wrap_Type :: T_Type ->- Inh_Type ->- Syn_Type -wrap_Type !(T_Type sem ) !(Inh_Type _lhsInested ) =- (let ( !_lhsOpp,!_lhsOprec) =- (sem _lhsInested )- in (Syn_Type _lhsOpp _lhsOprec ))-sem_Type_Arr :: T_Type ->- T_Type ->- T_Type -sem_Type_Arr !(T_Type left_ ) !(T_Type right_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3378 "PrintCode.hs" #-})) of- { !_rightOnested ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3382 "PrintCode.hs" #-})) of- { !_leftOnested ->- (case ((right_ _rightOnested )) of- { ( !_rightIpp,!_rightIprec) ->- (case (({-# LINE 261 "PrintCode.ag" #-}- if _rightIprec < 2 then pp_parens _rightIpp else _rightIpp- {-# LINE 3388 "PrintCode.hs" #-})) of- { !_r ->- (case ((left_ _leftOnested )) of- { ( !_leftIpp,!_leftIprec) ->- (case (({-# LINE 260 "PrintCode.ag" #-}- if _leftIprec <= 2 then pp_parens _leftIpp else _leftIpp- {-# LINE 3394 "PrintCode.hs" #-})) of- { !_l ->- (case (({-# LINE 259 "PrintCode.ag" #-}- _l >#< "->" >-< _r- {-# LINE 3398 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 258 "PrintCode.ag" #-}- 2- {-# LINE 3402 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) }) }) }) }) })) )-sem_Type_CtxApp :: ([(String, [String])]) ->- T_Type ->- T_Type -sem_Type_CtxApp !left_ !(T_Type right_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3412 "PrintCode.hs" #-})) of- { !_rightOnested ->- (case ((right_ _rightOnested )) of- { ( !_rightIpp,!_rightIprec) ->- (case (({-# LINE 267 "PrintCode.ag" #-}- (pp_block "(" ")" "," $ map (\(n,ns) -> hv_sp $ map pp (n:ns)) left_) >#< "=>" >#< _rightIpp- {-# LINE 3418 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 257 "PrintCode.ag" #-}- _rightIprec- {-# LINE 3422 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_List :: T_Type ->- T_Type -sem_Type_List !(T_Type tp_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3431 "PrintCode.hs" #-})) of- { !_tpOnested ->- (case ((tp_ _tpOnested )) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 276 "PrintCode.ag" #-}- "[" >|< _tpIpp >|< "]"- {-# LINE 3437 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 275 "PrintCode.ag" #-}- 5- {-# LINE 3441 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_NontermType :: String ->- ([String]) ->- T_Type -sem_Type_NontermType !name_ !params_ =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 282 "PrintCode.ag" #-}- text name_ >#< hv_sp params_- {-# LINE 3451 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 281 "PrintCode.ag" #-}- 5- {-# LINE 3455 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) })) )-sem_Type_SimpleType :: String ->- T_Type -sem_Type_SimpleType !txt_ =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 279 "PrintCode.ag" #-}- if reallySimple txt_ then text txt_ else pp_parens (text txt_)- {-# LINE 3464 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 278 "PrintCode.ag" #-}- 5- {-# LINE 3468 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) })) )-sem_Type_TEither :: T_Type ->- T_Type ->- T_Type -sem_Type_TEither !(T_Type left_ ) !(T_Type right_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3478 "PrintCode.hs" #-})) of- { !_rightOnested ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3482 "PrintCode.hs" #-})) of- { !_leftOnested ->- (case ((right_ _rightOnested )) of- { ( !_rightIpp,!_rightIprec) ->- (case ((left_ _leftOnested )) of- { ( !_leftIpp,!_leftIprec) ->- (case (({-# LINE 286 "PrintCode.ag" #-}- text "Either" >#< pp_parens _leftIpp >#< pp_parens _rightIpp- {-# LINE 3490 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 285 "PrintCode.ag" #-}- 5- {-# LINE 3494 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )-sem_Type_TIntMap :: T_Type ->- T_Type -sem_Type_TIntMap !(T_Type value_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3503 "PrintCode.hs" #-})) of- { !_valueOnested ->- (case ((value_ _valueOnested )) of- { ( !_valueIpp,!_valueIprec) ->- (case (({-# LINE 290 "PrintCode.ag" #-}- text "IntMap" >#< pp_parens _valueIpp- {-# LINE 3509 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 289 "PrintCode.ag" #-}- 5- {-# LINE 3513 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_TMap :: T_Type ->- T_Type ->- T_Type -sem_Type_TMap !(T_Type key_ ) !(T_Type value_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3523 "PrintCode.hs" #-})) of- { !_valueOnested ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3527 "PrintCode.hs" #-})) of- { !_keyOnested ->- (case ((value_ _valueOnested )) of- { ( !_valueIpp,!_valueIprec) ->- (case ((key_ _keyOnested )) of- { ( !_keyIpp,!_keyIprec) ->- (case (({-# LINE 288 "PrintCode.ag" #-}- text "Map" >#< pp_parens _keyIpp >#< pp_parens _valueIpp- {-# LINE 3535 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 287 "PrintCode.ag" #-}- 5- {-# LINE 3539 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )-sem_Type_TMaybe :: T_Type ->- T_Type -sem_Type_TMaybe !(T_Type tp_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3548 "PrintCode.hs" #-})) of- { !_tpOnested ->- (case ((tp_ _tpOnested )) of- { ( !_tpIpp,!_tpIprec) ->- (case (({-# LINE 284 "PrintCode.ag" #-}- text "Maybe" >#< _tpIpp- {-# LINE 3554 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 283 "PrintCode.ag" #-}- 5- {-# LINE 3558 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_TupleType :: T_Types ->- T_Type -sem_Type_TupleType !(T_Types tps_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3567 "PrintCode.hs" #-})) of- { !_tpsOnested ->- (case ((tps_ _tpsOnested )) of- { ( !_tpsIpps) ->- (case (({-# LINE 270 "PrintCode.ag" #-}- ppTuple _lhsInested _tpsIpps- {-# LINE 3573 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 269 "PrintCode.ag" #-}- 5- {-# LINE 3577 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_TypeApp :: T_Type ->- T_Types ->- T_Type -sem_Type_TypeApp !(T_Type func_ ) !(T_Types args_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3587 "PrintCode.hs" #-})) of- { !_argsOnested ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3591 "PrintCode.hs" #-})) of- { !_funcOnested ->- (case ((args_ _argsOnested )) of- { ( !_argsIpps) ->- (case ((func_ _funcOnested )) of- { ( !_funcIpp,!_funcIprec) ->- (case (({-# LINE 264 "PrintCode.ag" #-}- hv_sp (_funcIpp : _argsIpps)- {-# LINE 3599 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 257 "PrintCode.ag" #-}- _funcIprec- {-# LINE 3603 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )-sem_Type_UnboxedTupleType :: T_Types ->- T_Type -sem_Type_UnboxedTupleType !(T_Types tps_ ) =- (T_Type (\ (!_lhsInested) ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3612 "PrintCode.hs" #-})) of- { !_tpsOnested ->- (case ((tps_ _tpsOnested )) of- { ( !_tpsIpps) ->- (case (({-# LINE 273 "PrintCode.ag" #-}- ppUnboxedTuple _lhsInested _tpsIpps- {-# LINE 3618 "PrintCode.hs" #-})) of- { !_lhsOpp ->- (case (({-# LINE 272 "PrintCode.ag" #-}- 5- {-# LINE 3622 "PrintCode.hs" #-})) of- { !_lhsOprec ->- ( _lhsOpp,_lhsOprec) }) }) }) })) )--- Types --------------------------------------------------------{-- visit 0:- inherited attribute:- nested : Bool- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Type - child tl : Types - alternative Nil:--}--- cata-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 (Bool ->- ( PP_Docs))-data Inh_Types = Inh_Types {nested_Inh_Types :: !(Bool)}-data Syn_Types = Syn_Types {pps_Syn_Types :: !(PP_Docs)}-wrap_Types :: T_Types ->- Inh_Types ->- Syn_Types -wrap_Types !(T_Types sem ) !(Inh_Types _lhsInested ) =- (let ( !_lhsOpps) =- (sem _lhsInested )- in (Syn_Types _lhsOpps ))-sem_Types_Cons :: T_Type ->- T_Types ->- T_Types -sem_Types_Cons !(T_Type hd_ ) !(T_Types tl_ ) =- (T_Types (\ (!_lhsInested) ->- (case (({-# LINE 53 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3662 "PrintCode.hs" #-})) of- { !_tlOnested ->- (case (({-# LINE 51 "PrintCode.ag" #-}- _lhsInested- {-# LINE 3666 "PrintCode.hs" #-})) of- { !_hdOnested ->- (case ((tl_ _tlOnested )) of- { ( !_tlIpps) ->- (case ((hd_ _hdOnested )) of- { ( !_hdIpp,!_hdIprec) ->- (case (({-# LINE 76 "PrintCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 3674 "PrintCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) })) )-sem_Types_Nil :: T_Types -sem_Types_Nil =- (T_Types (\ (!_lhsInested) ->- (case (({-# LINE 77 "PrintCode.ag" #-}- []- {-# LINE 3682 "PrintCode.hs" #-})) of+-- UUAGC 0.9.30 (PrintCode.ag)+module PrintCode where+{-# LINE 10 "PrintCode.ag" #-}++import Char (isAlphaNum)+import Pretty+import Code+import Patterns+import Options+import CommonTypes (attrname, _LOC, getName, nullIdent)+import Data.List(intersperse)+import System.IO+import System.Directory+import CommonTypes(BlockInfo, BlockType(..), identifier)+{-# LINE 18 "../src-derived/PrintCode.hs" #-}++{-# LINE 2 "./Code.ag" #-}++import Pretty+import Patterns+import Data.List(partition)+import Data.Set(Set)+import qualified Data.Set as Set+import Data.Map(Map)+import qualified Data.Map as Map+{-# LINE 29 "../src-derived/PrintCode.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 36 "../src-derived/PrintCode.hs" #-}+{-# LINE 23 "PrintCode.ag" #-}++type PP_Docs = [PP_Doc]+{-# LINE 40 "../src-derived/PrintCode.hs" #-}++{-# LINE 27 "PrintCode.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 53 "../src-derived/PrintCode.hs" #-}++{-# LINE 293 "PrintCode.ag" #-}+++reallySimple :: String -> Bool+reallySimple = and . map (\x -> isAlphaNum x || x=='_')++ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps+ppTuple False pps = "(" >|< pp_block " " ")" "," pps+ppUnboxedTuple True pps = "(# " >|< pp_block " " (concat $ replicate (length pps `max` 1) " #)") ",(# " pps+ppUnboxedTuple False pps = "(# " >|< pp_block " " " #)" "," pps++{-# LINE 66 "../src-derived/PrintCode.hs" #-}++{-# LINE 392 "PrintCode.ag" #-}++locname' n = "_loc_" ++ getName n+{-# LINE 71 "../src-derived/PrintCode.hs" #-}++{-# LINE 465 "PrintCode.ag" #-}++renderDocs :: [PP_Doc] -> String+renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""+{-# LINE 77 "../src-derived/PrintCode.hs" #-}++{-# LINE 512 "PrintCode.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 94 "../src-derived/PrintCode.hs" #-}++{-# LINE 143 "./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 113 "../src-derived/PrintCode.hs" #-}+-- CaseAlt -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative CaseAlt:+ child left : Lhs + child expr : Expr +-}+-- cata+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 (Bool ->+ Options ->+ String ->+ ( PP_Docs))+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)}+wrap_CaseAlt :: T_CaseAlt ->+ Inh_CaseAlt ->+ Syn_CaseAlt +wrap_CaseAlt !(T_CaseAlt sem ) !(Inh_CaseAlt _lhsInested _lhsIoptions _lhsIoutputfile ) =+ (let ( !_lhsOpps) = sem _lhsInested _lhsIoptions _lhsIoutputfile + in (Syn_CaseAlt _lhsOpps ))+sem_CaseAlt_CaseAlt :: T_Lhs ->+ T_Expr ->+ T_CaseAlt +sem_CaseAlt_CaseAlt !(T_Lhs left_ ) !(T_Expr expr_ ) =+ (T_CaseAlt (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 155 "PrintCode.hs" #-})) of+ { !_exprOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 159 "PrintCode.hs" #-})) of+ { !_exprOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 163 "PrintCode.hs" #-})) of+ { !_exprOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 167 "PrintCode.hs" #-})) of+ { !_leftOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 171 "PrintCode.hs" #-})) of+ { !_leftOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 175 "PrintCode.hs" #-})) of+ { !_leftOnested ->+ (case (({-# LINE 415 "PrintCode.ag" #-}+ False+ {-# LINE 179 "PrintCode.hs" #-})) of+ { !_leftOisDeclOfLet ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of+ { ( !_exprIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of+ { ( !_leftIpp) ->+ (case (({-# LINE 217 "PrintCode.ag" #-}+ ["{" >#< _leftIpp >#< "->", _exprIpp >#< "}"]+ {-# LINE 187 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) }) })) )+-- CaseAlts ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : CaseAlt + child tl : CaseAlts + alternative Nil:+-}+-- cata+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 (Bool ->+ Options ->+ String ->+ ( PP_Docs))+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)}+wrap_CaseAlts :: T_CaseAlts ->+ Inh_CaseAlts ->+ Syn_CaseAlts +wrap_CaseAlts !(T_CaseAlts sem ) !(Inh_CaseAlts _lhsInested _lhsIoptions _lhsIoutputfile ) =+ (let ( !_lhsOpps) = sem _lhsInested _lhsIoptions _lhsIoutputfile + in (Syn_CaseAlts _lhsOpps ))+sem_CaseAlts_Cons :: T_CaseAlt ->+ T_CaseAlts ->+ T_CaseAlts +sem_CaseAlts_Cons !(T_CaseAlt hd_ ) !(T_CaseAlts tl_ ) =+ (T_CaseAlts (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 232 "PrintCode.hs" #-})) of+ { !_tlOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 236 "PrintCode.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 55 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 240 "PrintCode.hs" #-})) of+ { !_tlOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 244 "PrintCode.hs" #-})) of+ { !_hdOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 248 "PrintCode.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 55 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 252 "PrintCode.hs" #-})) of+ { !_hdOnested ->+ (case (tl_ _tlOnested _tlOoptions _tlOoutputfile ) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested _hdOoptions _hdOoutputfile ) of+ { ( !_hdIpps) ->+ (case (({-# LINE 68 "PrintCode.ag" #-}+ _hdIpps ++ _tlIpps+ {-# LINE 260 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) })) )+sem_CaseAlts_Nil :: T_CaseAlts +sem_CaseAlts_Nil =+ (T_CaseAlts (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 69 "PrintCode.ag" #-}+ []+ {-# LINE 270 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) })) )+-- Chunk -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ importBlocks : PP_Doc+ isDeclOfLet : Bool+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nested : Bool+ options : Options+ optionsLine : String+ pragmaBlocks : String+ textBlockMap : Map BlockInfo PP_Doc+ textBlocks : PP_Doc+ synthesized attributes:+ appendCommon : [[PP_Doc]]+ appendMain : [[PP_Doc]]+ genSems : IO ()+ imports : [String]+ pps : PP_Docs+ alternatives:+ alternative Chunk:+ child name : {String}+ child comment : Decl + child info : Decls + child dataDef : Decls + child cataFun : Decls + child semDom : Decls + child semWrapper : Decls + child semFunctions : Decls + child semNames : {[String]}+ visit 0:+ local outputfile : _+ local exports : _+-}+-- cata+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 (PP_Doc ->+ Bool ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ Bool ->+ Options ->+ String ->+ String ->+ (Map BlockInfo PP_Doc) ->+ PP_Doc ->+ ( ([[PP_Doc]]),([[PP_Doc]]),(IO ()),([String]),PP_Docs))+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)}+wrap_Chunk :: T_Chunk ->+ Inh_Chunk ->+ Syn_Chunk +wrap_Chunk !(T_Chunk sem ) !(Inh_Chunk _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks ) =+ (let ( !_lhsOappendCommon,!_lhsOappendMain,!_lhsOgenSems,!_lhsOimports,!_lhsOpps) = sem _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks + in (Syn_Chunk _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps ))+sem_Chunk_Chunk :: String ->+ T_Decl ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ ([String]) ->+ T_Chunk +sem_Chunk_Chunk !name_ !(T_Decl comment_ ) !(T_Decls info_ ) !(T_Decls dataDef_ ) !(T_Decls cataFun_ ) !(T_Decls semDom_ ) !(T_Decls semWrapper_ ) !(T_Decls semFunctions_ ) !semNames_ =+ (T_Chunk (\ (!_lhsIimportBlocks)+ (!_lhsIisDeclOfLet)+ (!_lhsImainFile)+ (!_lhsImainName)+ (!_lhsImoduleHeader)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoptionsLine)+ (!_lhsIpragmaBlocks)+ (!_lhsItextBlockMap)+ (!_lhsItextBlocks) ->+ (case (({-# LINE 43 "PrintCode.ag" #-}+ if sepSemMods _lhsIoptions+ then _lhsImainFile ++ "_" ++ name_ ++ ".hs"+ else _lhsImainFile ++ ".hs"+ {-# LINE 361 "PrintCode.hs" #-})) of+ { !_outputfile ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _outputfile+ {-# LINE 365 "PrintCode.hs" #-})) of+ { !_semDomOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 369 "PrintCode.hs" #-})) of+ { !_semDomOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 373 "PrintCode.hs" #-})) of+ { !_semDomOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 377 "PrintCode.hs" #-})) of+ { !_semDomOisDeclOfLet ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _outputfile+ {-# LINE 381 "PrintCode.hs" #-})) of+ { !_dataDefOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 385 "PrintCode.hs" #-})) of+ { !_dataDefOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 389 "PrintCode.hs" #-})) of+ { !_dataDefOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 393 "PrintCode.hs" #-})) of+ { !_dataDefOisDeclOfLet ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _outputfile+ {-# LINE 397 "PrintCode.hs" #-})) of+ { !_commentOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 401 "PrintCode.hs" #-})) of+ { !_commentOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 405 "PrintCode.hs" #-})) of+ { !_commentOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 409 "PrintCode.hs" #-})) of+ { !_commentOisDeclOfLet ->+ (case (semDom_ _semDomOisDeclOfLet _semDomOnested _semDomOoptions _semDomOoutputfile ) of+ { ( !_semDomIpps) ->+ (case (dataDef_ _dataDefOisDeclOfLet _dataDefOnested _dataDefOoptions _dataDefOoutputfile ) of+ { ( !_dataDefIpps) ->+ (case (comment_ _commentOisDeclOfLet _commentOnested _commentOoptions _commentOoutputfile ) of+ { ( !_commentIpp) ->+ (case (({-# LINE 479 "PrintCode.ag" #-}+ [ [_commentIpp]+ , _dataDefIpps+ , _semDomIpps+ ]+ {-# LINE 422 "PrintCode.hs" #-})) of+ { !_lhsOappendCommon ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _outputfile+ {-# LINE 426 "PrintCode.hs" #-})) of+ { !_semWrapperOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 430 "PrintCode.hs" #-})) of+ { !_semWrapperOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 434 "PrintCode.hs" #-})) of+ { !_semWrapperOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 438 "PrintCode.hs" #-})) of+ { !_semWrapperOisDeclOfLet ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _outputfile+ {-# LINE 442 "PrintCode.hs" #-})) of+ { !_cataFunOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 446 "PrintCode.hs" #-})) of+ { !_cataFunOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 450 "PrintCode.hs" #-})) of+ { !_cataFunOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 454 "PrintCode.hs" #-})) of+ { !_cataFunOisDeclOfLet ->+ (case (semWrapper_ _semWrapperOisDeclOfLet _semWrapperOnested _semWrapperOoptions _semWrapperOoutputfile ) of+ { ( !_semWrapperIpps) ->+ (case (cataFun_ _cataFunOisDeclOfLet _cataFunOnested _cataFunOoptions _cataFunOoutputfile ) of+ { ( !_cataFunIpps) ->+ (case (({-# LINE 484 "PrintCode.ag" #-}+ [ [_commentIpp]+ , _cataFunIpps+ , _semWrapperIpps+ ]+ {-# LINE 465 "PrintCode.hs" #-})) of+ { !_lhsOappendMain ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _outputfile+ {-# LINE 469 "PrintCode.hs" #-})) of+ { !_semFunctionsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 473 "PrintCode.hs" #-})) of+ { !_semFunctionsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 477 "PrintCode.hs" #-})) of+ { !_semFunctionsOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 481 "PrintCode.hs" #-})) of+ { !_semFunctionsOisDeclOfLet ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _outputfile+ {-# LINE 485 "PrintCode.hs" #-})) of+ { !_infoOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 489 "PrintCode.hs" #-})) of+ { !_infoOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 493 "PrintCode.hs" #-})) of+ { !_infoOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 497 "PrintCode.hs" #-})) of+ { !_infoOisDeclOfLet ->+ (case (({-# LINE 510 "PrintCode.ag" #-}+ concat $ intersperse "," semNames_+ {-# LINE 501 "PrintCode.hs" #-})) of+ { !_exports ->+ (case (semFunctions_ _semFunctionsOisDeclOfLet _semFunctionsOnested _semFunctionsOoptions _semFunctionsOoutputfile ) of+ { ( !_semFunctionsIpps) ->+ (case (info_ _infoOisDeclOfLet _infoOnested _infoOoptions _infoOoutputfile ) of+ { ( !_infoIpps) ->+ (case (({-# LINE 494 "PrintCode.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 520 "PrintCode.hs" #-})) of+ { !_lhsOgenSems ->+ (case (({-# LINE 473 "PrintCode.ag" #-}+ ["import " ++ _lhsImainName ++ "_" ++ name_ ++ "\n"]+ {-# LINE 524 "PrintCode.hs" #-})) of+ { !_lhsOimports ->+ (case (({-# LINE 96 "PrintCode.ag" #-}+ _commentIpp+ : _infoIpps+ ++ _dataDefIpps+ ++ _cataFunIpps+ ++ _semDomIpps+ ++ _semWrapperIpps+ ++ _semFunctionsIpps+ ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]+ {-# LINE 535 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Chunks ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ importBlocks : PP_Doc+ isDeclOfLet : Bool+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ nested : Bool+ options : Options+ optionsLine : String+ pragmaBlocks : String+ textBlockMap : Map BlockInfo PP_Doc+ textBlocks : PP_Doc+ synthesized attributes:+ appendCommon : [[PP_Doc]]+ appendMain : [[PP_Doc]]+ genSems : IO ()+ imports : [String]+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Chunk + child tl : Chunks + alternative Nil:+-}+-- cata+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 (PP_Doc ->+ Bool ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ Bool ->+ Options ->+ String ->+ String ->+ (Map BlockInfo PP_Doc) ->+ PP_Doc ->+ ( ([[PP_Doc]]),([[PP_Doc]]),(IO ()),([String]),PP_Docs))+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)}+wrap_Chunks :: T_Chunks ->+ Inh_Chunks ->+ Syn_Chunks +wrap_Chunks !(T_Chunks sem ) !(Inh_Chunks _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks ) =+ (let ( !_lhsOappendCommon,!_lhsOappendMain,!_lhsOgenSems,!_lhsOimports,!_lhsOpps) = sem _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks + in (Syn_Chunks _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps ))+sem_Chunks_Cons :: T_Chunk ->+ T_Chunks ->+ T_Chunks +sem_Chunks_Cons !(T_Chunk hd_ ) !(T_Chunks tl_ ) =+ (T_Chunks (\ (!_lhsIimportBlocks)+ (!_lhsIisDeclOfLet)+ (!_lhsImainFile)+ (!_lhsImainName)+ (!_lhsImoduleHeader)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoptionsLine)+ (!_lhsIpragmaBlocks)+ (!_lhsItextBlockMap)+ (!_lhsItextBlocks) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 608 "PrintCode.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 612 "PrintCode.hs" #-})) of+ { !_tlOnested ->+ (case (({-# LINE 430 "PrintCode.ag" #-}+ _lhsImainFile+ {-# LINE 616 "PrintCode.hs" #-})) of+ { !_tlOmainFile ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 620 "PrintCode.hs" #-})) of+ { !_tlOisDeclOfLet ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 624 "PrintCode.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 628 "PrintCode.hs" #-})) of+ { !_hdOnested ->+ (case (({-# LINE 430 "PrintCode.ag" #-}+ _lhsImainFile+ {-# LINE 632 "PrintCode.hs" #-})) of+ { !_hdOmainFile ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 636 "PrintCode.hs" #-})) of+ { !_hdOisDeclOfLet ->+ (case (({-# LINE 427 "PrintCode.ag" #-}+ _lhsItextBlocks+ {-# LINE 640 "PrintCode.hs" #-})) of+ { !_tlOtextBlocks ->+ (case (({-# LINE 428 "PrintCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 644 "PrintCode.hs" #-})) of+ { !_tlOtextBlockMap ->+ (case (({-# LINE 426 "PrintCode.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 648 "PrintCode.hs" #-})) of+ { !_tlOpragmaBlocks ->+ (case (({-# LINE 429 "PrintCode.ag" #-}+ _lhsIoptionsLine+ {-# LINE 652 "PrintCode.hs" #-})) of+ { !_tlOoptionsLine ->+ (case (({-# LINE 432 "PrintCode.ag" #-}+ _lhsImoduleHeader+ {-# LINE 656 "PrintCode.hs" #-})) of+ { !_tlOmoduleHeader ->+ (case (({-# LINE 431 "PrintCode.ag" #-}+ _lhsImainName+ {-# LINE 660 "PrintCode.hs" #-})) of+ { !_tlOmainName ->+ (case (({-# LINE 425 "PrintCode.ag" #-}+ _lhsIimportBlocks+ {-# LINE 664 "PrintCode.hs" #-})) of+ { !_tlOimportBlocks ->+ (case (tl_ _tlOimportBlocks _tlOisDeclOfLet _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnested _tlOoptions _tlOoptionsLine _tlOpragmaBlocks _tlOtextBlockMap _tlOtextBlocks ) of+ { ( !_tlIappendCommon,!_tlIappendMain,!_tlIgenSems,!_tlIimports,!_tlIpps) ->+ (case (({-# LINE 427 "PrintCode.ag" #-}+ _lhsItextBlocks+ {-# LINE 670 "PrintCode.hs" #-})) of+ { !_hdOtextBlocks ->+ (case (({-# LINE 428 "PrintCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 674 "PrintCode.hs" #-})) of+ { !_hdOtextBlockMap ->+ (case (({-# LINE 426 "PrintCode.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 678 "PrintCode.hs" #-})) of+ { !_hdOpragmaBlocks ->+ (case (({-# LINE 429 "PrintCode.ag" #-}+ _lhsIoptionsLine+ {-# LINE 682 "PrintCode.hs" #-})) of+ { !_hdOoptionsLine ->+ (case (({-# LINE 432 "PrintCode.ag" #-}+ _lhsImoduleHeader+ {-# LINE 686 "PrintCode.hs" #-})) of+ { !_hdOmoduleHeader ->+ (case (({-# LINE 431 "PrintCode.ag" #-}+ _lhsImainName+ {-# LINE 690 "PrintCode.hs" #-})) of+ { !_hdOmainName ->+ (case (({-# LINE 425 "PrintCode.ag" #-}+ _lhsIimportBlocks+ {-# LINE 694 "PrintCode.hs" #-})) of+ { !_hdOimportBlocks ->+ (case (hd_ _hdOimportBlocks _hdOisDeclOfLet _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnested _hdOoptions _hdOoptionsLine _hdOpragmaBlocks _hdOtextBlockMap _hdOtextBlocks ) of+ { ( !_hdIappendCommon,!_hdIappendMain,!_hdIgenSems,!_hdIimports,!_hdIpps) ->+ (case (({-# LINE 475 "PrintCode.ag" #-}+ _hdIappendCommon ++ _tlIappendCommon+ {-# LINE 700 "PrintCode.hs" #-})) of+ { !_lhsOappendCommon ->+ (case (({-# LINE 475 "PrintCode.ag" #-}+ _hdIappendMain ++ _tlIappendMain+ {-# LINE 704 "PrintCode.hs" #-})) of+ { !_lhsOappendMain ->+ (case (({-# LINE 490 "PrintCode.ag" #-}+ _hdIgenSems >> _tlIgenSems+ {-# LINE 708 "PrintCode.hs" #-})) of+ { !_lhsOgenSems ->+ (case (({-# LINE 470 "PrintCode.ag" #-}+ _hdIimports ++ _tlIimports+ {-# LINE 712 "PrintCode.hs" #-})) of+ { !_lhsOimports ->+ (case (({-# LINE 88 "PrintCode.ag" #-}+ _hdIpps ++ _tlIpps+ {-# LINE 716 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Chunks_Nil :: T_Chunks +sem_Chunks_Nil =+ (T_Chunks (\ (!_lhsIimportBlocks)+ (!_lhsIisDeclOfLet)+ (!_lhsImainFile)+ (!_lhsImainName)+ (!_lhsImoduleHeader)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoptionsLine)+ (!_lhsIpragmaBlocks)+ (!_lhsItextBlockMap)+ (!_lhsItextBlocks) ->+ (case (({-# LINE 475 "PrintCode.ag" #-}+ []+ {-# LINE 734 "PrintCode.hs" #-})) of+ { !_lhsOappendCommon ->+ (case (({-# LINE 475 "PrintCode.ag" #-}+ []+ {-# LINE 738 "PrintCode.hs" #-})) of+ { !_lhsOappendMain ->+ (case (({-# LINE 490 "PrintCode.ag" #-}+ return ()+ {-# LINE 742 "PrintCode.hs" #-})) of+ { !_lhsOgenSems ->+ (case (({-# LINE 470 "PrintCode.ag" #-}+ []+ {-# LINE 746 "PrintCode.hs" #-})) of+ { !_lhsOimports ->+ (case (({-# LINE 89 "PrintCode.ag" #-}+ []+ {-# LINE 750 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOappendCommon,_lhsOappendMain,_lhsOgenSems,_lhsOimports,_lhsOpps) }) }) }) }) })) )+-- DataAlt -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ strictPre : PP_Doc+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative DataAlt:+ child name : {String}+ child args : Types + alternative Record:+ child name : {String}+ child args : NamedTypes +-}+-- cata+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 (Bool ->+ PP_Doc ->+ ( PP_Doc))+data Inh_DataAlt = Inh_DataAlt {nested_Inh_DataAlt :: !(Bool),strictPre_Inh_DataAlt :: !(PP_Doc)}+data Syn_DataAlt = Syn_DataAlt {pp_Syn_DataAlt :: !(PP_Doc)}+wrap_DataAlt :: T_DataAlt ->+ Inh_DataAlt ->+ Syn_DataAlt +wrap_DataAlt !(T_DataAlt sem ) !(Inh_DataAlt _lhsInested _lhsIstrictPre ) =+ (let ( !_lhsOpp) = sem _lhsInested _lhsIstrictPre + in (Syn_DataAlt _lhsOpp ))+sem_DataAlt_DataAlt :: String ->+ T_Types ->+ T_DataAlt +sem_DataAlt_DataAlt !name_ !(T_Types args_ ) =+ (T_DataAlt (\ (!_lhsInested)+ (!_lhsIstrictPre) ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 796 "PrintCode.hs" #-})) of+ { !_argsOnested ->+ (case (args_ _argsOnested ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 220 "PrintCode.ag" #-}+ name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens) _argsIpps)+ {-# LINE 802 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_DataAlt_Record :: String ->+ T_NamedTypes ->+ T_DataAlt +sem_DataAlt_Record !name_ !(T_NamedTypes args_ ) =+ (T_DataAlt (\ (!_lhsInested)+ (!_lhsIstrictPre) ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 813 "PrintCode.hs" #-})) of+ { !_argsOnested ->+ (case (args_ _argsOnested ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 221 "PrintCode.ag" #-}+ name_ >#< pp_block "{" "}" "," _argsIpps+ {-# LINE 819 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+-- DataAlts ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ strictPre : PP_Doc+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : DataAlt + child tl : DataAlts + alternative Nil:+-}+-- cata+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 (Bool ->+ PP_Doc ->+ ( PP_Docs))+data Inh_DataAlts = Inh_DataAlts {nested_Inh_DataAlts :: !(Bool),strictPre_Inh_DataAlts :: !(PP_Doc)}+data Syn_DataAlts = Syn_DataAlts {pps_Syn_DataAlts :: !(PP_Docs)}+wrap_DataAlts :: T_DataAlts ->+ Inh_DataAlts ->+ Syn_DataAlts +wrap_DataAlts !(T_DataAlts sem ) !(Inh_DataAlts _lhsInested _lhsIstrictPre ) =+ (let ( !_lhsOpps) = sem _lhsInested _lhsIstrictPre + in (Syn_DataAlts _lhsOpps ))+sem_DataAlts_Cons :: T_DataAlt ->+ T_DataAlts ->+ T_DataAlts +sem_DataAlts_Cons !(T_DataAlt hd_ ) !(T_DataAlts tl_ ) =+ (T_DataAlts (\ (!_lhsInested)+ (!_lhsIstrictPre) ->+ (case (({-# LINE 310 "PrintCode.ag" #-}+ _lhsIstrictPre+ {-# LINE 861 "PrintCode.hs" #-})) of+ { !_tlOstrictPre ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 865 "PrintCode.hs" #-})) of+ { !_tlOnested ->+ (case (({-# LINE 310 "PrintCode.ag" #-}+ _lhsIstrictPre+ {-# LINE 869 "PrintCode.hs" #-})) of+ { !_hdOstrictPre ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 873 "PrintCode.hs" #-})) of+ { !_hdOnested ->+ (case (tl_ _tlOnested _tlOstrictPre ) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested _hdOstrictPre ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 72 "PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 881 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) })) )+sem_DataAlts_Nil :: T_DataAlts +sem_DataAlts_Nil =+ (T_DataAlts (\ (!_lhsInested)+ (!_lhsIstrictPre) ->+ (case (({-# LINE 73 "PrintCode.ag" #-}+ []+ {-# LINE 890 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) })) )+-- Decl --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isDeclOfLet : Bool+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Bind:+ child left : Lhs + child rhs : Expr + alternative BindLet:+ child left : Lhs + child rhs : Expr + alternative Comment:+ child txt : {String}+ alternative Data:+ child name : {String}+ child params : {[String]}+ child alts : DataAlts + child strict : {Bool}+ child derivings : {[String]}+ alternative Decl:+ child left : Lhs + child rhs : Expr + child binds : {Set String}+ child uses : {Set String}+ alternative EvalDecl:+ child nt : {String}+ child left : Lhs + child rhs : Expr + visit 0:+ local strat : _+ alternative NewType:+ child name : {String}+ child params : {[String]}+ child con : {String}+ child tp : Type + alternative PragmaDecl:+ child txt : {String}+ alternative Resume:+ child monadic : {Bool}+ child nt : {String}+ child left : Lhs + child rhs : Expr + alternative TSig:+ child name : {String}+ child tp : Type + alternative Type:+ child name : {String}+ child params : {[String]}+ child tp : Type +-}+-- cata+sem_Decl :: Decl ->+ T_Decl +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 !(Comment _txt ) =+ (sem_Decl_Comment _txt )+sem_Decl !(Data _name _params _alts _strict _derivings ) =+ (sem_Decl_Data _name _params (sem_DataAlts _alts ) _strict _derivings )+sem_Decl !(Decl _left _rhs _binds _uses ) =+ (sem_Decl_Decl (sem_Lhs _left ) (sem_Expr _rhs ) _binds _uses )+sem_Decl !(EvalDecl _nt _left _rhs ) =+ (sem_Decl_EvalDecl _nt (sem_Lhs _left ) (sem_Expr _rhs ) )+sem_Decl !(NewType _name _params _con _tp ) =+ (sem_Decl_NewType _name _params _con (sem_Type _tp ) )+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 !(TSig _name _tp ) =+ (sem_Decl_TSig _name (sem_Type _tp ) )+sem_Decl !(Type _name _params _tp ) =+ (sem_Decl_Type _name _params (sem_Type _tp ) )+-- semantic domain+newtype T_Decl = T_Decl (Bool ->+ Bool ->+ Options ->+ String ->+ ( PP_Doc))+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)}+wrap_Decl :: T_Decl ->+ Inh_Decl ->+ Syn_Decl +wrap_Decl !(T_Decl sem ) !(Inh_Decl _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile ) =+ (let ( !_lhsOpp) = sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile + in (Syn_Decl _lhsOpp ))+sem_Decl_Bind :: T_Lhs ->+ T_Expr ->+ T_Decl +sem_Decl_Bind !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 998 "PrintCode.hs" #-})) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1002 "PrintCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1006 "PrintCode.hs" #-})) of+ { !_rhsOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1010 "PrintCode.hs" #-})) of+ { !_leftOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1014 "PrintCode.hs" #-})) of+ { !_leftOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1018 "PrintCode.hs" #-})) of+ { !_leftOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1022 "PrintCode.hs" #-})) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of+ { ( !_leftIpp) ->+ (case (({-# LINE 108 "PrintCode.ag" #-}+ _leftIpp >#< "<-" >#< _rhsIpp+ {-# LINE 1030 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )+sem_Decl_BindLet :: T_Lhs ->+ T_Expr ->+ T_Decl +sem_Decl_BindLet !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1043 "PrintCode.hs" #-})) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1047 "PrintCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1051 "PrintCode.hs" #-})) of+ { !_rhsOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1055 "PrintCode.hs" #-})) of+ { !_leftOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1059 "PrintCode.hs" #-})) of+ { !_leftOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1063 "PrintCode.hs" #-})) of+ { !_leftOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1067 "PrintCode.hs" #-})) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of+ { ( !_leftIpp) ->+ (case (({-# LINE 109 "PrintCode.ag" #-}+ "let" >#< _leftIpp >#< "=" >#< _rhsIpp+ {-# LINE 1075 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )+sem_Decl_Comment :: String ->+ T_Decl +sem_Decl_Comment !txt_ =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 122 "PrintCode.ag" #-}+ if '\n' `elem` txt_+ then "{-" >-< vlist (lines txt_) >-< "-}"+ else "--" >#< txt_+ {-# LINE 1089 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Decl_Data :: String ->+ ([String]) ->+ T_DataAlts ->+ Bool ->+ ([String]) ->+ T_Decl +sem_Decl_Data !name_ !params_ !(T_DataAlts alts_ ) !strict_ !derivings_ =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1105 "PrintCode.hs" #-})) of+ { !_altsOnested ->+ (case (({-# LINE 313 "PrintCode.ag" #-}+ if strict_ then pp "!" else empty+ {-# LINE 1109 "PrintCode.hs" #-})) of+ { !_altsOstrictPre ->+ (case (alts_ _altsOnested _altsOstrictPre ) of+ { ( !_altsIpps) ->+ (case (({-# LINE 110 "PrintCode.ag" #-}+ "data" >#< 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_)+ )+ {-# LINE 1123 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) })) )+sem_Decl_Decl :: T_Lhs ->+ T_Expr ->+ (Set String) ->+ (Set String) ->+ T_Decl +sem_Decl_Decl !(T_Lhs left_ ) !(T_Expr rhs_ ) !binds_ !uses_ =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1138 "PrintCode.hs" #-})) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1142 "PrintCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1146 "PrintCode.hs" #-})) of+ { !_rhsOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1150 "PrintCode.hs" #-})) of+ { !_leftOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1154 "PrintCode.hs" #-})) of+ { !_leftOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1158 "PrintCode.hs" #-})) of+ { !_leftOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1162 "PrintCode.hs" #-})) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of+ { ( !_leftIpp) ->+ (case (({-# LINE 106 "PrintCode.ag" #-}+ _leftIpp >#< "="+ >-< indent 4 _rhsIpp+ {-# LINE 1171 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )+sem_Decl_EvalDecl :: String ->+ T_Lhs ->+ T_Expr ->+ T_Decl +sem_Decl_EvalDecl !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1185 "PrintCode.hs" #-})) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1189 "PrintCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1193 "PrintCode.hs" #-})) of+ { !_rhsOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1197 "PrintCode.hs" #-})) of+ { !_leftOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1201 "PrintCode.hs" #-})) of+ { !_leftOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1205 "PrintCode.hs" #-})) of+ { !_leftOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1209 "PrintCode.hs" #-})) of+ { !_leftOisDeclOfLet ->+ (case (({-# LINE 129 "PrintCode.ag" #-}+ if breadthFirstStrict _lhsIoptions+ then "strictEval"+ else "lazyEval"+ {-# LINE 1215 "PrintCode.hs" #-})) of+ { !_strat ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of+ { ( !_leftIpp) ->+ (case (({-# LINE 132 "PrintCode.ag" #-}+ if breadthFirst _lhsIoptions+ then _leftIpp >#< "=" >#< "case" >#< _strat >#< pp_parens _rhsIpp >#< "of"+ >-< indent 4 (+ pp_parens (nt_ >|< "_Syn" >#< "_val") >#< "-> _val"+ )+ else _leftIpp >#< "=" >#< _rhsIpp+ {-# LINE 1228 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })) )+sem_Decl_NewType :: String ->+ ([String]) ->+ String ->+ T_Type ->+ T_Decl +sem_Decl_NewType !name_ !params_ !con_ !(T_Type tp_ ) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1243 "PrintCode.hs" #-})) of+ { !_tpOnested ->+ (case (tp_ _tpOnested ) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 119 "PrintCode.ag" #-}+ "newtype" >#< hv_sp (name_ : params_) >#< "=" >#< con_ >#< pp_parens _tpIpp+ {-# LINE 1249 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Decl_PragmaDecl :: String ->+ T_Decl +sem_Decl_PragmaDecl !txt_ =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 125 "PrintCode.ag" #-}+ "{-#" >#< text txt_ >#< "#-}"+ {-# LINE 1261 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Decl_Resume :: Bool ->+ String ->+ T_Lhs ->+ T_Expr ->+ T_Decl +sem_Decl_Resume !monadic_ !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1276 "PrintCode.hs" #-})) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1280 "PrintCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1284 "PrintCode.hs" #-})) of+ { !_rhsOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1288 "PrintCode.hs" #-})) of+ { !_leftOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1292 "PrintCode.hs" #-})) of+ { !_leftOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1296 "PrintCode.hs" #-})) of+ { !_leftOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1300 "PrintCode.hs" #-})) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of+ { ( !_leftIpp) ->+ (case (({-# LINE 126 "PrintCode.ag" #-}+ if monadic_+ then _leftIpp >#< "<-" >#< _rhsIpp+ else _leftIpp >#< "=" >-< indent 4 _rhsIpp+ {-# LINE 1310 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )+sem_Decl_TSig :: String ->+ T_Type ->+ T_Decl +sem_Decl_TSig !name_ !(T_Type tp_ ) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1323 "PrintCode.hs" #-})) of+ { !_tpOnested ->+ (case (tp_ _tpOnested ) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 121 "PrintCode.ag" #-}+ name_ >#< "::" >#< _tpIpp+ {-# LINE 1329 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Decl_Type :: String ->+ ([String]) ->+ T_Type ->+ T_Decl +sem_Decl_Type !name_ !params_ !(T_Type tp_ ) =+ (T_Decl (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1343 "PrintCode.hs" #-})) of+ { !_tpOnested ->+ (case (tp_ _tpOnested ) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 120 "PrintCode.ag" #-}+ "type" >#< hv_sp (name_ : params_) >#< "=" >#< _tpIpp+ {-# LINE 1349 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+-- Decls -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isDeclOfLet : Bool+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Decl + child tl : Decls + alternative Nil:+-}+-- cata+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 (Bool ->+ Bool ->+ Options ->+ String ->+ ( PP_Docs))+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)}+wrap_Decls :: T_Decls ->+ Inh_Decls ->+ Syn_Decls +wrap_Decls !(T_Decls sem ) !(Inh_Decls _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile ) =+ (let ( !_lhsOpps) = sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile + in (Syn_Decls _lhsOpps ))+sem_Decls_Cons :: T_Decl ->+ T_Decls ->+ T_Decls +sem_Decls_Cons !(T_Decl hd_ ) !(T_Decls tl_ ) =+ (T_Decls (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1397 "PrintCode.hs" #-})) of+ { !_tlOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1401 "PrintCode.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1405 "PrintCode.hs" #-})) of+ { !_tlOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1409 "PrintCode.hs" #-})) of+ { !_tlOisDeclOfLet ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1413 "PrintCode.hs" #-})) of+ { !_hdOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1417 "PrintCode.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1421 "PrintCode.hs" #-})) of+ { !_hdOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 1425 "PrintCode.hs" #-})) of+ { !_hdOisDeclOfLet ->+ (case (tl_ _tlOisDeclOfLet _tlOnested _tlOoptions _tlOoutputfile ) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOisDeclOfLet _hdOnested _hdOoptions _hdOoutputfile ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 84 "PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 1433 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) })) )+sem_Decls_Nil :: T_Decls +sem_Decls_Nil =+ (T_Decls (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 85 "PrintCode.ag" #-}+ []+ {-# LINE 1444 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) })) )+-- Expr --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative App:+ child name : {String}+ child args : Exprs + alternative Case:+ child expr : Expr + child alts : CaseAlts + alternative Do:+ child stmts : Decls + child body : Expr + alternative InvokeExpr:+ child nt : {String}+ child expr : Expr + child args : Exprs + alternative Lambda:+ child args : Exprs + child body : Expr + visit 0:+ local addBang : _+ local strictParams : _+ alternative Let:+ child decls : Decls + child body : Expr + alternative LineExpr:+ child expr : Expr + alternative PragmaExpr:+ child onLeftSide : {Bool}+ child onNewLine : {Bool}+ child txt : {String}+ child expr : Expr + alternative ResultExpr:+ child nt : {String}+ child expr : Expr + alternative ResumeExpr:+ child nt : {String}+ child expr : Expr + child left : Lhs + child rhs : Expr + alternative SemFun:+ child nt : {String}+ child args : Exprs + child body : Expr + visit 0:+ local addBang : _+ local strictParams : _+ alternative SimpleExpr:+ child txt : {String}+ alternative TextExpr:+ child lns : {[String]}+ alternative Trace:+ child txt : {String}+ child expr : Expr + alternative TupleExpr:+ child exprs : Exprs + alternative TypedExpr:+ child expr : Expr + child tp : Type + alternative UnboxedTupleExpr:+ child exprs : Exprs +-}+-- cata+sem_Expr :: Expr ->+ T_Expr +sem_Expr !(App _name _args ) =+ (sem_Expr_App _name (sem_Exprs _args ) )+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 !(InvokeExpr _nt _expr _args ) =+ (sem_Expr_InvokeExpr _nt (sem_Expr _expr ) (sem_Exprs _args ) )+sem_Expr !(Lambda _args _body ) =+ (sem_Expr_Lambda (sem_Exprs _args ) (sem_Expr _body ) )+sem_Expr !(Let _decls _body ) =+ (sem_Expr_Let (sem_Decls _decls ) (sem_Expr _body ) )+sem_Expr !(LineExpr _expr ) =+ (sem_Expr_LineExpr (sem_Expr _expr ) )+sem_Expr !(PragmaExpr _onLeftSide _onNewLine _txt _expr ) =+ (sem_Expr_PragmaExpr _onLeftSide _onNewLine _txt (sem_Expr _expr ) )+sem_Expr !(ResultExpr _nt _expr ) =+ (sem_Expr_ResultExpr _nt (sem_Expr _expr ) )+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 ) )+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 !(TupleExpr _exprs ) =+ (sem_Expr_TupleExpr (sem_Exprs _exprs ) )+sem_Expr !(TypedExpr _expr _tp ) =+ (sem_Expr_TypedExpr (sem_Expr _expr ) (sem_Type _tp ) )+sem_Expr !(UnboxedTupleExpr _exprs ) =+ (sem_Expr_UnboxedTupleExpr (sem_Exprs _exprs ) )+-- semantic domain+newtype T_Expr = T_Expr (Bool ->+ Options ->+ String ->+ ( PP_Doc))+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)}+wrap_Expr :: T_Expr ->+ Inh_Expr ->+ Syn_Expr +wrap_Expr !(T_Expr sem ) !(Inh_Expr _lhsInested _lhsIoptions _lhsIoutputfile ) =+ (let ( !_lhsOpp) = sem _lhsInested _lhsIoptions _lhsIoutputfile + in (Syn_Expr _lhsOpp ))+sem_Expr_App :: String ->+ T_Exprs ->+ T_Expr +sem_Expr_App !name_ !(T_Exprs args_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1575 "PrintCode.hs" #-})) of+ { !_argsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1579 "PrintCode.hs" #-})) of+ { !_argsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1583 "PrintCode.hs" #-})) of+ { !_argsOnested ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 160 "PrintCode.ag" #-}+ pp_parens $ name_ >#< hv_sp _argsIpps+ {-# LINE 1589 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Expr_Case :: T_Expr ->+ T_CaseAlts ->+ T_Expr +sem_Expr_Case !(T_Expr expr_ ) !(T_CaseAlts alts_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1601 "PrintCode.hs" #-})) of+ { !_altsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1605 "PrintCode.hs" #-})) of+ { !_altsOoptions ->+ (case (({-# LINE 55 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1609 "PrintCode.hs" #-})) of+ { !_altsOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1613 "PrintCode.hs" #-})) of+ { !_exprOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1617 "PrintCode.hs" #-})) of+ { !_exprOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1621 "PrintCode.hs" #-})) of+ { !_exprOnested ->+ (case (alts_ _altsOnested _altsOoptions _altsOoutputfile ) of+ { ( !_altsIpps) ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 143 "PrintCode.ag" #-}+ pp_parens ( "case" >#< pp_parens _exprIpp >#< "of"+ >-< (vlist _altsIpps)+ )+ {-# LINE 1631 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) })) )+sem_Expr_Do :: T_Decls ->+ T_Expr ->+ T_Expr +sem_Expr_Do !(T_Decls stmts_ ) !(T_Expr body_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1643 "PrintCode.hs" #-})) of+ { !_bodyOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1647 "PrintCode.hs" #-})) of+ { !_bodyOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1651 "PrintCode.hs" #-})) of+ { !_bodyOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1655 "PrintCode.hs" #-})) of+ { !_stmtsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1659 "PrintCode.hs" #-})) of+ { !_stmtsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1663 "PrintCode.hs" #-})) of+ { !_stmtsOnested ->+ (case (({-# LINE 409 "PrintCode.ag" #-}+ False+ {-# LINE 1667 "PrintCode.hs" #-})) of+ { !_stmtsOisDeclOfLet ->+ (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile ) of+ { ( !_bodyIpp) ->+ (case (stmts_ _stmtsOisDeclOfLet _stmtsOnested _stmtsOoptions _stmtsOoutputfile ) of+ { ( !_stmtsIpps) ->+ (case (({-# LINE 146 "PrintCode.ag" #-}+ pp_parens ( "do" >#< ( vlist _stmtsIpps+ >-< ("return" >#< _bodyIpp))+ )+ {-# LINE 1677 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )+sem_Expr_InvokeExpr :: String ->+ T_Expr ->+ T_Exprs ->+ T_Expr +sem_Expr_InvokeExpr !nt_ !(T_Expr expr_ ) !(T_Exprs args_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1690 "PrintCode.hs" #-})) of+ { !_argsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1694 "PrintCode.hs" #-})) of+ { !_argsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1698 "PrintCode.hs" #-})) of+ { !_argsOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1702 "PrintCode.hs" #-})) of+ { !_exprOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1706 "PrintCode.hs" #-})) of+ { !_exprOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1710 "PrintCode.hs" #-})) of+ { !_exprOnested ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of+ { ( !_argsIpps) ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 183 "PrintCode.ag" #-}+ if breadthFirst _lhsIoptions+ then "invoke" >#< pp_parens _exprIpp >#< pp_parens (+ nt_ >|< "_Inh" >#< pp_parens (ppTuple False _argsIpps))+ else _exprIpp >#< hv_sp _argsIpps+ {-# LINE 1721 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) })) )+sem_Expr_Lambda :: T_Exprs ->+ T_Expr ->+ T_Expr +sem_Expr_Lambda !(T_Exprs args_ ) !(T_Expr body_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1733 "PrintCode.hs" #-})) of+ { !_bodyOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1737 "PrintCode.hs" #-})) of+ { !_bodyOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1741 "PrintCode.hs" #-})) of+ { !_bodyOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1745 "PrintCode.hs" #-})) of+ { !_argsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1749 "PrintCode.hs" #-})) of+ { !_argsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1753 "PrintCode.hs" #-})) of+ { !_argsOnested ->+ (case (({-# LINE 152 "PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> pp_parens ("!" >|< p)+ else id+ {-# LINE 1759 "PrintCode.hs" #-})) of+ { !_addBang ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 149 "PrintCode.ag" #-}+ if strictSems _lhsIoptions+ then _argsIpps+ else []+ {-# LINE 1767 "PrintCode.hs" #-})) of+ { !_strictParams ->+ (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile ) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 155 "PrintCode.ag" #-}+ pp_parens ( "\\" >#< (vlist (map _addBang _argsIpps)) >#< "->"+ >-< indent 4 (_strictParams `ppMultiSeqV` _bodyIpp)+ )+ {-# LINE 1775 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })) )+sem_Expr_Let :: T_Decls ->+ T_Expr ->+ T_Expr +sem_Expr_Let !(T_Decls decls_ ) !(T_Expr body_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1787 "PrintCode.hs" #-})) of+ { !_bodyOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1791 "PrintCode.hs" #-})) of+ { !_bodyOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1795 "PrintCode.hs" #-})) of+ { !_bodyOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1799 "PrintCode.hs" #-})) of+ { !_declsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1803 "PrintCode.hs" #-})) of+ { !_declsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1807 "PrintCode.hs" #-})) of+ { !_declsOnested ->+ (case (({-# LINE 407 "PrintCode.ag" #-}+ True+ {-# LINE 1811 "PrintCode.hs" #-})) of+ { !_declsOisDeclOfLet ->+ (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile ) of+ { ( !_bodyIpp) ->+ (case (decls_ _declsOisDeclOfLet _declsOnested _declsOoptions _declsOoutputfile ) of+ { ( !_declsIpps) ->+ (case (({-# LINE 140 "PrintCode.ag" #-}+ pp_parens ( "let" >#< (vlist _declsIpps)+ >-< "in " >#< _bodyIpp+ )+ {-# LINE 1821 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )+sem_Expr_LineExpr :: T_Expr ->+ T_Expr +sem_Expr_LineExpr !(T_Expr expr_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1832 "PrintCode.hs" #-})) of+ { !_exprOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1836 "PrintCode.hs" #-})) of+ { !_exprOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1840 "PrintCode.hs" #-})) of+ { !_exprOnested ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 177 "PrintCode.ag" #-}+ _exprIpp >-< "{-# LINE" >#< ppWithLineNr (\n -> pp $ show $ n + 1) >#< show _lhsIoutputfile >#< "#-}"+ {-# LINE 1846 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Expr_PragmaExpr :: Bool ->+ Bool ->+ String ->+ T_Expr ->+ T_Expr +sem_Expr_PragmaExpr !onLeftSide_ !onNewLine_ !txt_ !(T_Expr expr_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1860 "PrintCode.hs" #-})) of+ { !_exprOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1864 "PrintCode.hs" #-})) of+ { !_exprOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1868 "PrintCode.hs" #-})) of+ { !_exprOnested ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 166 "PrintCode.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 1884 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Expr_ResultExpr :: String ->+ T_Expr ->+ T_Expr +sem_Expr_ResultExpr !nt_ !(T_Expr expr_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1896 "PrintCode.hs" #-})) of+ { !_exprOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1900 "PrintCode.hs" #-})) of+ { !_exprOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1904 "PrintCode.hs" #-})) of+ { !_exprOnested ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 179 "PrintCode.ag" #-}+ if breadthFirst _lhsIoptions+ then "final" >#<+ pp_parens (nt_ >|< "_Syn" >#< pp_parens _exprIpp)+ else _exprIpp+ {-# LINE 1913 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Expr_ResumeExpr :: String ->+ T_Expr ->+ T_Lhs ->+ T_Expr ->+ T_Expr +sem_Expr_ResumeExpr !nt_ !(T_Expr expr_ ) !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1927 "PrintCode.hs" #-})) of+ { !_rhsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1931 "PrintCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1935 "PrintCode.hs" #-})) of+ { !_rhsOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1939 "PrintCode.hs" #-})) of+ { !_leftOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1943 "PrintCode.hs" #-})) of+ { !_leftOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1947 "PrintCode.hs" #-})) of+ { !_leftOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1951 "PrintCode.hs" #-})) of+ { !_exprOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 1955 "PrintCode.hs" #-})) of+ { !_exprOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 1959 "PrintCode.hs" #-})) of+ { !_exprOnested ->+ (case (({-# LINE 411 "PrintCode.ag" #-}+ False+ {-# LINE 1963 "PrintCode.hs" #-})) of+ { !_leftOisDeclOfLet ->+ (case (rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile ) of+ { ( !_rhsIpp) ->+ (case (left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile ) of+ { ( !_leftIpp) ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 187 "PrintCode.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 1984 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Expr_SemFun :: String ->+ T_Exprs ->+ T_Expr ->+ T_Expr +sem_Expr_SemFun !nt_ !(T_Exprs args_ ) !(T_Expr body_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 1997 "PrintCode.hs" #-})) of+ { !_bodyOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2001 "PrintCode.hs" #-})) of+ { !_bodyOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2005 "PrintCode.hs" #-})) of+ { !_bodyOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2009 "PrintCode.hs" #-})) of+ { !_argsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2013 "PrintCode.hs" #-})) of+ { !_argsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2017 "PrintCode.hs" #-})) of+ { !_argsOnested ->+ (case (({-# LINE 202 "PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> pp_parens ("!" >|< p)+ else id+ {-# LINE 2023 "PrintCode.hs" #-})) of+ { !_addBang ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 199 "PrintCode.ag" #-}+ if strictSems _lhsIoptions+ then _argsIpps+ else []+ {-# LINE 2031 "PrintCode.hs" #-})) of+ { !_strictParams ->+ (case (body_ _bodyOnested _bodyOoptions _bodyOoutputfile ) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 205 "PrintCode.ag" #-}+ if breadthFirst _lhsIoptions+ then "Closure" >#< 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 2046 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) }) }) })) )+sem_Expr_SimpleExpr :: String ->+ T_Expr +sem_Expr_SimpleExpr !txt_ =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 161 "PrintCode.ag" #-}+ text txt_+ {-# LINE 2057 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Expr_TextExpr :: ([String]) ->+ T_Expr +sem_Expr_TextExpr !lns_ =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 162 "PrintCode.ag" #-}+ vlist (map text lns_)+ {-# LINE 2068 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Expr_Trace :: String ->+ T_Expr ->+ T_Expr +sem_Expr_Trace !txt_ !(T_Expr expr_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2080 "PrintCode.hs" #-})) of+ { !_exprOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2084 "PrintCode.hs" #-})) of+ { !_exprOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2088 "PrintCode.hs" #-})) of+ { !_exprOnested ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 163 "PrintCode.ag" #-}+ "trace" >#< ( pp_parens ("\"" >|< text txt_ >|< "\"")+ >-< pp_parens _exprIpp+ )+ {-# LINE 2096 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Expr_TupleExpr :: T_Exprs ->+ T_Expr +sem_Expr_TupleExpr !(T_Exprs exprs_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2107 "PrintCode.hs" #-})) of+ { !_exprsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2111 "PrintCode.hs" #-})) of+ { !_exprsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2115 "PrintCode.hs" #-})) of+ { !_exprsOnested ->+ (case (exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile ) of+ { ( !_exprsIpps) ->+ (case (({-# LINE 158 "PrintCode.ag" #-}+ ppTuple _lhsInested _exprsIpps+ {-# LINE 2121 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Expr_TypedExpr :: T_Expr ->+ T_Type ->+ T_Expr +sem_Expr_TypedExpr !(T_Expr expr_ ) !(T_Type tp_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2133 "PrintCode.hs" #-})) of+ { !_tpOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2137 "PrintCode.hs" #-})) of+ { !_exprOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2141 "PrintCode.hs" #-})) of+ { !_exprOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2145 "PrintCode.hs" #-})) of+ { !_exprOnested ->+ (case (tp_ _tpOnested ) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (expr_ _exprOnested _exprOoptions _exprOoutputfile ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 178 "PrintCode.ag" #-}+ pp_parens (_exprIpp >#< "::" >#< _tpIpp)+ {-# LINE 2153 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) })) )+sem_Expr_UnboxedTupleExpr :: T_Exprs ->+ T_Expr +sem_Expr_UnboxedTupleExpr !(T_Exprs exprs_ ) =+ (T_Expr (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2164 "PrintCode.hs" #-})) of+ { !_exprsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2168 "PrintCode.hs" #-})) of+ { !_exprsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2172 "PrintCode.hs" #-})) of+ { !_exprsOnested ->+ (case (exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile ) of+ { ( !_exprsIpps) ->+ (case (({-# LINE 159 "PrintCode.ag" #-}+ ppUnboxedTuple _lhsInested _exprsIpps+ {-# LINE 2178 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+-- Exprs -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Expr + child tl : Exprs + alternative Nil:+-}+-- cata+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 (Bool ->+ Options ->+ String ->+ ( PP_Docs))+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)}+wrap_Exprs :: T_Exprs ->+ Inh_Exprs ->+ Syn_Exprs +wrap_Exprs !(T_Exprs sem ) !(Inh_Exprs _lhsInested _lhsIoptions _lhsIoutputfile ) =+ (let ( !_lhsOpps) = sem _lhsInested _lhsIoptions _lhsIoutputfile + in (Syn_Exprs _lhsOpps ))+sem_Exprs_Cons :: T_Expr ->+ T_Exprs ->+ T_Exprs +sem_Exprs_Cons !(T_Expr hd_ ) !(T_Exprs tl_ ) =+ (T_Exprs (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2223 "PrintCode.hs" #-})) of+ { !_tlOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2227 "PrintCode.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2231 "PrintCode.hs" #-})) of+ { !_tlOnested ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2235 "PrintCode.hs" #-})) of+ { !_hdOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2239 "PrintCode.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2243 "PrintCode.hs" #-})) of+ { !_hdOnested ->+ (case (tl_ _tlOnested _tlOoptions _tlOoutputfile ) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested _hdOoptions _hdOoutputfile ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 64 "PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 2251 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) })) )+sem_Exprs_Nil :: T_Exprs +sem_Exprs_Nil =+ (T_Exprs (\ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 65 "PrintCode.ag" #-}+ []+ {-# LINE 2261 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) })) )+-- Lhs ---------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isDeclOfLet : Bool+ nested : Bool+ options : Options+ outputfile : String+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Fun:+ child name : {String}+ child args : Exprs + visit 0:+ local addBang : _+ local strictGuard : _+ local hasStrictVars : _+ local addStrictGuard : _+ alternative Pattern3:+ child pat3 : Pattern + visit 0:+ local hasStrictVars : _+ local strictGuard : _+ local addStrictGuard : _+ alternative Pattern3SM:+ child pat3 : Pattern + alternative TupleLhs:+ child comps : {[String]}+ visit 0:+ local addBang : _+ local hasStrictVars : _+ local strictGuard : _+ local addStrictGuard : _+ alternative UnboxedTupleLhs:+ child comps : {[String]}+ visit 0:+ local addBang : _+ local hasStrictVars : _+ local strictGuard : _+ local addStrictGuard : _+ alternative Unwrap:+ child name : {String}+ child sub : Lhs +-}+-- cata+sem_Lhs :: Lhs ->+ T_Lhs +sem_Lhs !(Fun _name _args ) =+ (sem_Lhs_Fun _name (sem_Exprs _args ) )+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 !(Unwrap _name _sub ) =+ (sem_Lhs_Unwrap _name (sem_Lhs _sub ) )+-- semantic domain+newtype T_Lhs = T_Lhs (Bool ->+ Bool ->+ Options ->+ String ->+ ( PP_Doc))+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)}+wrap_Lhs :: T_Lhs ->+ Inh_Lhs ->+ Syn_Lhs +wrap_Lhs !(T_Lhs sem ) !(Inh_Lhs _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile ) =+ (let ( !_lhsOpp) = sem _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile + in (Syn_Lhs _lhsOpp ))+sem_Lhs_Fun :: String ->+ T_Exprs ->+ T_Lhs +sem_Lhs_Fun !name_ !(T_Exprs args_ ) =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2348 "PrintCode.hs" #-})) of+ { !_argsOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2352 "PrintCode.hs" #-})) of+ { !_argsOoptions ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2356 "PrintCode.hs" #-})) of+ { !_argsOnested ->+ (case (({-# LINE 246 "PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> "!" >|< p+ else id+ {-# LINE 2362 "PrintCode.hs" #-})) of+ { !_addBang ->+ (case (args_ _argsOnested _argsOoptions _argsOoutputfile ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 243 "PrintCode.ag" #-}+ _argsIpps `ppMultiSeqH` (pp "True")+ {-# LINE 2368 "PrintCode.hs" #-})) of+ { !_strictGuard ->+ (case (({-# LINE 242 "PrintCode.ag" #-}+ not (null _argsIpps)+ {-# LINE 2372 "PrintCode.hs" #-})) of+ { !_hasStrictVars ->+ (case (({-# LINE 241 "PrintCode.ag" #-}+ if strictSems _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2376 "PrintCode.hs" #-})) of+ { !_addStrictGuard ->+ (case (({-# LINE 254 "PrintCode.ag" #-}+ _addStrictGuard (name_ >#< hv_sp (map _addBang _argsIpps))+ {-# LINE 2380 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) }) })) )+sem_Lhs_Pattern3 :: T_Pattern ->+ T_Lhs +sem_Lhs_Pattern3 !(T_Pattern pat3_ ) =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2392 "PrintCode.hs" #-})) of+ { !_pat3Ooptions ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2396 "PrintCode.hs" #-})) of+ { !_pat3OisDeclOfLet ->+ (case (({-# LINE 373 "PrintCode.ag" #-}+ False+ {-# LINE 2400 "PrintCode.hs" #-})) of+ { !_pat3ObelowIrrefutable ->+ (case (pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions ) of+ { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->+ (case (({-# LINE 233 "PrintCode.ag" #-}+ not (null _pat3IstrictVars)+ {-# LINE 2406 "PrintCode.hs" #-})) of+ { !_hasStrictVars ->+ (case (({-# LINE 232 "PrintCode.ag" #-}+ _pat3IstrictVars `ppMultiSeqH` (pp "True")+ {-# LINE 2410 "PrintCode.hs" #-})) of+ { !_strictGuard ->+ (case (({-# LINE 230 "PrintCode.ag" #-}+ if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2414 "PrintCode.hs" #-})) of+ { !_addStrictGuard ->+ (case (({-# LINE 250 "PrintCode.ag" #-}+ _addStrictGuard _pat3Ipp+ {-# LINE 2418 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) }) }) })) )+sem_Lhs_Pattern3SM :: T_Pattern ->+ T_Lhs +sem_Lhs_Pattern3SM !(T_Pattern pat3_ ) =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2430 "PrintCode.hs" #-})) of+ { !_pat3Ooptions ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2434 "PrintCode.hs" #-})) of+ { !_pat3OisDeclOfLet ->+ (case (({-# LINE 373 "PrintCode.ag" #-}+ False+ {-# LINE 2438 "PrintCode.hs" #-})) of+ { !_pat3ObelowIrrefutable ->+ (case (pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions ) of+ { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->+ (case (({-# LINE 251 "PrintCode.ag" #-}+ _pat3Ipp'+ {-# LINE 2444 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Lhs_TupleLhs :: ([String]) ->+ T_Lhs +sem_Lhs_TupleLhs !comps_ =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 246 "PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> "!" >|< p+ else id+ {-# LINE 2458 "PrintCode.hs" #-})) of+ { !_addBang ->+ (case (({-# LINE 238 "PrintCode.ag" #-}+ not (null comps_)+ {-# LINE 2462 "PrintCode.hs" #-})) of+ { !_hasStrictVars ->+ (case (({-# LINE 235 "PrintCode.ag" #-}+ if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+ then map text comps_ `ppMultiSeqH` (pp "True")+ else pp "True"+ {-# LINE 2468 "PrintCode.hs" #-})) of+ { !_strictGuard ->+ (case (({-# LINE 230 "PrintCode.ag" #-}+ if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2472 "PrintCode.hs" #-})) of+ { !_addStrictGuard ->+ (case (({-# LINE 252 "PrintCode.ag" #-}+ _addStrictGuard $ ppTuple _lhsInested (map (_addBang . text) comps_)+ {-# LINE 2476 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Lhs_UnboxedTupleLhs :: ([String]) ->+ T_Lhs +sem_Lhs_UnboxedTupleLhs !comps_ =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 246 "PrintCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> "!" >|< p+ else id+ {-# LINE 2490 "PrintCode.hs" #-})) of+ { !_addBang ->+ (case (({-# LINE 238 "PrintCode.ag" #-}+ not (null comps_)+ {-# LINE 2494 "PrintCode.hs" #-})) of+ { !_hasStrictVars ->+ (case (({-# LINE 235 "PrintCode.ag" #-}+ if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+ then map text comps_ `ppMultiSeqH` (pp "True")+ else pp "True"+ {-# LINE 2500 "PrintCode.hs" #-})) of+ { !_strictGuard ->+ (case (({-# LINE 230 "PrintCode.ag" #-}+ if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2504 "PrintCode.hs" #-})) of+ { !_addStrictGuard ->+ (case (({-# LINE 253 "PrintCode.ag" #-}+ _addStrictGuard $ ppUnboxedTuple _lhsInested (map (_addBang . text) comps_)+ {-# LINE 2508 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Lhs_Unwrap :: String ->+ T_Lhs ->+ T_Lhs +sem_Lhs_Unwrap !name_ !(T_Lhs sub_ ) =+ (T_Lhs (\ (!_lhsIisDeclOfLet)+ (!_lhsInested)+ (!_lhsIoptions)+ (!_lhsIoutputfile) ->+ (case (({-# LINE 39 "PrintCode.ag" #-}+ _lhsIoutputfile+ {-# LINE 2521 "PrintCode.hs" #-})) of+ { !_subOoutputfile ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2525 "PrintCode.hs" #-})) of+ { !_subOoptions ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2529 "PrintCode.hs" #-})) of+ { !_subOnested ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2533 "PrintCode.hs" #-})) of+ { !_subOisDeclOfLet ->+ (case (sub_ _subOisDeclOfLet _subOnested _subOoptions _subOoutputfile ) of+ { ( !_subIpp) ->+ (case (({-# LINE 255 "PrintCode.ag" #-}+ pp_parens (name_ >#< _subIpp)+ {-# LINE 2539 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) })) )+-- NamedType ---------------------------------------------------+{-+ visit 0:+ inherited attribute:+ nested : Bool+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Named:+ child strict : {Bool}+ child name : {String}+ child tp : Type +-}+-- cata+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 (Bool ->+ ( PP_Doc))+data Inh_NamedType = Inh_NamedType {nested_Inh_NamedType :: !(Bool)}+data Syn_NamedType = Syn_NamedType {pp_Syn_NamedType :: !(PP_Doc)}+wrap_NamedType :: T_NamedType ->+ Inh_NamedType ->+ Syn_NamedType +wrap_NamedType !(T_NamedType sem ) !(Inh_NamedType _lhsInested ) =+ (let ( !_lhsOpp) = sem _lhsInested + in (Syn_NamedType _lhsOpp ))+sem_NamedType_Named :: Bool ->+ String ->+ T_Type ->+ T_NamedType +sem_NamedType_Named !strict_ !name_ !(T_Type tp_ ) =+ (T_NamedType (\ (!_lhsInested) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2579 "PrintCode.hs" #-})) of+ { !_tpOnested ->+ (case (tp_ _tpOnested ) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 224 "PrintCode.ag" #-}+ if strict_+ then name_ >#< "::" >#< "!" >|< pp_parens _tpIpp+ else name_ >#< "::" >#< _tpIpp+ {-# LINE 2587 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+-- NamedTypes --------------------------------------------------+{-+ visit 0:+ inherited attribute:+ nested : Bool+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : NamedType + child tl : NamedTypes + alternative Nil:+-}+-- cata+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 (Bool ->+ ( PP_Docs))+data Inh_NamedTypes = Inh_NamedTypes {nested_Inh_NamedTypes :: !(Bool)}+data Syn_NamedTypes = Syn_NamedTypes {pps_Syn_NamedTypes :: !(PP_Docs)}+wrap_NamedTypes :: T_NamedTypes ->+ Inh_NamedTypes ->+ Syn_NamedTypes +wrap_NamedTypes !(T_NamedTypes sem ) !(Inh_NamedTypes _lhsInested ) =+ (let ( !_lhsOpps) = sem _lhsInested + in (Syn_NamedTypes _lhsOpps ))+sem_NamedTypes_Cons :: T_NamedType ->+ T_NamedTypes ->+ T_NamedTypes +sem_NamedTypes_Cons !(T_NamedType hd_ ) !(T_NamedTypes tl_ ) =+ (T_NamedTypes (\ (!_lhsInested) ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2626 "PrintCode.hs" #-})) of+ { !_tlOnested ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 2630 "PrintCode.hs" #-})) of+ { !_hdOnested ->+ (case (tl_ _tlOnested ) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 80 "PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 2638 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) })) )+sem_NamedTypes_Nil :: T_NamedTypes +sem_NamedTypes_Nil =+ (T_NamedTypes (\ (!_lhsInested) ->+ (case (({-# LINE 81 "PrintCode.ag" #-}+ []+ {-# LINE 2646 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) })) )+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ belowIrrefutable : Bool+ isDeclOfLet : Bool+ options : Options+ synthesized attributes:+ copy : SELF + isUnderscore : Bool+ pp : PP_Doc+ pp' : PP_Doc+ strictVars : [PP_Doc]+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + child parts : Patterns + visit 0:+ local copy : _+ local ppVar : _+ local addBang : _+ local ppVarBang : _+ local strictPatVars : _+ local strictVar : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local copy : _+ local addBang : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local copy : _+ local addBang : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern +sem_Pattern !(Alias _field _attr _pat _parts ) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )+sem_Pattern !(Constr _name _pats ) =+ (sem_Pattern_Constr _name (sem_Patterns _pats ) )+sem_Pattern !(Irrefutable _pat ) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat ) )+sem_Pattern !(Product _pos _pats ) =+ (sem_Pattern_Product _pos (sem_Patterns _pats ) )+sem_Pattern !(Underscore _pos ) =+ (sem_Pattern_Underscore _pos )+-- semantic domain+newtype T_Pattern = T_Pattern (Bool ->+ Bool ->+ Options ->+ ( Pattern ,Bool,PP_Doc,PP_Doc,([PP_Doc])))+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]))}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern +wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions ) =+ (let ( !_lhsOcopy,!_lhsOisUnderscore,!_lhsOpp,!_lhsOpp',!_lhsOstrictVars) = sem _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions + in (Syn_Pattern _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars ))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) !(T_Patterns parts_ ) =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2733 "PrintCode.hs" #-})) of+ { !_partsOoptions ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2737 "PrintCode.hs" #-})) of+ { !_partsOisDeclOfLet ->+ (case (({-# LINE 366 "PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 2741 "PrintCode.hs" #-})) of+ { !_partsObelowIrrefutable ->+ (case (parts_ _partsObelowIrrefutable _partsOisDeclOfLet _partsOoptions ) of+ { ( !_partsIcopy,!_partsIpps,!_partsIpps',!_partsIstrictVars) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2747 "PrintCode.hs" #-})) of+ { !_patOoptions ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2751 "PrintCode.hs" #-})) of+ { !_patOisDeclOfLet ->+ (case (({-# LINE 366 "PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 2755 "PrintCode.hs" #-})) of+ { !_patObelowIrrefutable ->+ (case (pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions ) of+ { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Alias field_ attr_ _patIcopy _partsIcopy+ {-# LINE 2761 "PrintCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2765 "PrintCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 363 "PrintCode.ag" #-}+ False+ {-# LINE 2769 "PrintCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 352 "PrintCode.ag" #-}+ pp (attrname False field_ attr_)+ {-# LINE 2773 "PrintCode.hs" #-})) of+ { !_ppVar ->+ (case (({-# LINE 345 "PrintCode.ag" #-}+ if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+ then \p -> "!" >|< p+ else id+ {-# LINE 2779 "PrintCode.hs" #-})) of+ { !_addBang ->+ (case (({-# LINE 353 "PrintCode.ag" #-}+ _addBang $ _ppVar+ {-# LINE 2783 "PrintCode.hs" #-})) of+ { !_ppVarBang ->+ (case (({-# LINE 354 "PrintCode.ag" #-}+ if _patIisUnderscore+ then _ppVarBang+ else _ppVarBang >|< "@" >|< _patIpp+ {-# LINE 2789 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 386 "PrintCode.ag" #-}+ let attribute | field_ == _LOC || field_ == nullIdent = locname' attr_+ | otherwise = attrname False field_ attr_+ in attribute >|< "@" >|< _patIpp'+ {-# LINE 2795 "PrintCode.hs" #-})) of+ { !_lhsOpp' ->+ (case (({-# LINE 326 "PrintCode.ag" #-}+ if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+ then _patIstrictVars+ else []+ {-# LINE 2801 "PrintCode.hs" #-})) of+ { !_strictPatVars ->+ (case (({-# LINE 322 "PrintCode.ag" #-}+ if strictCases _lhsIoptions && not _lhsIisDeclOfLet+ then [_ppVar ]+ else []+ {-# LINE 2807 "PrintCode.hs" #-})) of+ { !_strictVar ->+ (case (({-# LINE 330 "PrintCode.ag" #-}+ _strictVar ++ _strictPatVars+ {-# LINE 2811 "PrintCode.hs" #-})) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2823 "PrintCode.hs" #-})) of+ { !_patsOoptions ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2827 "PrintCode.hs" #-})) of+ { !_patsOisDeclOfLet ->+ (case (({-# LINE 366 "PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 2831 "PrintCode.hs" #-})) of+ { !_patsObelowIrrefutable ->+ (case (pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions ) of+ { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 2837 "PrintCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2841 "PrintCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 361 "PrintCode.ag" #-}+ False+ {-# LINE 2845 "PrintCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 345 "PrintCode.ag" #-}+ if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+ then \p -> "!" >|< p+ else id+ {-# LINE 2851 "PrintCode.hs" #-})) of+ { !_addBang ->+ (case (({-# LINE 350 "PrintCode.ag" #-}+ _addBang $ pp_parens $ name_ >#< hv_sp _patsIpps+ {-# LINE 2855 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 384 "PrintCode.ag" #-}+ pp_parens $ name_ >#< hv_sp (map pp_parens _patsIpps')+ {-# LINE 2859 "PrintCode.hs" #-})) of+ { !_lhsOpp' ->+ (case (({-# LINE 319 "PrintCode.ag" #-}+ _patsIstrictVars+ {-# LINE 2863 "PrintCode.hs" #-})) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) })) )+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern +sem_Pattern_Irrefutable !(T_Pattern pat_ ) =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2874 "PrintCode.hs" #-})) of+ { !_patOoptions ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2878 "PrintCode.hs" #-})) of+ { !_patOisDeclOfLet ->+ (case (({-# LINE 369 "PrintCode.ag" #-}+ True+ {-# LINE 2882 "PrintCode.hs" #-})) of+ { !_patObelowIrrefutable ->+ (case (pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions ) of+ { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 2888 "PrintCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2892 "PrintCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 360 "PrintCode.ag" #-}+ _patIisUnderscore+ {-# LINE 2896 "PrintCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 357 "PrintCode.ag" #-}+ text "~" >|< pp_parens _patIpp+ {-# LINE 2900 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 389 "PrintCode.ag" #-}+ text "~" >|< pp_parens _patIpp+ {-# LINE 2904 "PrintCode.hs" #-})) of+ { !_lhsOpp' ->+ (case (({-# LINE 333 "PrintCode.ag" #-}+ []+ {-# LINE 2908 "PrintCode.hs" #-})) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) })) )+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 2920 "PrintCode.hs" #-})) of+ { !_patsOoptions ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 2924 "PrintCode.hs" #-})) of+ { !_patsOisDeclOfLet ->+ (case (({-# LINE 366 "PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 2928 "PrintCode.hs" #-})) of+ { !_patsObelowIrrefutable ->+ (case (pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions ) of+ { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 2934 "PrintCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2938 "PrintCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 362 "PrintCode.ag" #-}+ False+ {-# LINE 2942 "PrintCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 345 "PrintCode.ag" #-}+ if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+ then \p -> "!" >|< p+ else id+ {-# LINE 2948 "PrintCode.hs" #-})) of+ { !_addBang ->+ (case (({-# LINE 351 "PrintCode.ag" #-}+ _addBang $ pp_block "(" ")" "," _patsIpps+ {-# LINE 2952 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 385 "PrintCode.ag" #-}+ pp_block "(" ")" "," _patsIpps'+ {-# LINE 2956 "PrintCode.hs" #-})) of+ { !_lhsOpp' ->+ (case (({-# LINE 319 "PrintCode.ag" #-}+ _patsIstrictVars+ {-# LINE 2960 "PrintCode.hs" #-})) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) })) )+sem_Pattern_Underscore :: Pos ->+ T_Pattern +sem_Pattern_Underscore !pos_ =+ (T_Pattern (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Underscore pos_+ {-# LINE 2971 "PrintCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 2975 "PrintCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 364 "PrintCode.ag" #-}+ True+ {-# LINE 2979 "PrintCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 358 "PrintCode.ag" #-}+ text "_"+ {-# LINE 2983 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 390 "PrintCode.ag" #-}+ text "_"+ {-# LINE 2987 "PrintCode.hs" #-})) of+ { !_lhsOpp' ->+ (case (({-# LINE 319 "PrintCode.ag" #-}+ []+ {-# LINE 2991 "PrintCode.hs" #-})) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) })) )+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ belowIrrefutable : Bool+ isDeclOfLet : Bool+ options : Options+ synthesized attributes:+ copy : SELF + pps : [PP_Doc]+ pps' : [PP_Doc]+ strictVars : [PP_Doc]+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+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 (Bool ->+ Bool ->+ Options ->+ ( Patterns ,([PP_Doc]),([PP_Doc]),([PP_Doc])))+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]))}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns +wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions ) =+ (let ( !_lhsOcopy,!_lhsOpps,!_lhsOpps',!_lhsOstrictVars) = sem _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions + in (Syn_Patterns _lhsOcopy _lhsOpps _lhsOpps' _lhsOstrictVars ))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns +sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =+ (T_Patterns (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 3043 "PrintCode.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 3047 "PrintCode.hs" #-})) of+ { !_tlOisDeclOfLet ->+ (case (({-# LINE 366 "PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 3051 "PrintCode.hs" #-})) of+ { !_tlObelowIrrefutable ->+ (case (tl_ _tlObelowIrrefutable _tlOisDeclOfLet _tlOoptions ) of+ { ( !_tlIcopy,!_tlIpps,!_tlIpps',!_tlIstrictVars) ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _lhsIoptions+ {-# LINE 3057 "PrintCode.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 400 "PrintCode.ag" #-}+ _lhsIisDeclOfLet+ {-# LINE 3061 "PrintCode.hs" #-})) of+ { !_hdOisDeclOfLet ->+ (case (({-# LINE 366 "PrintCode.ag" #-}+ _lhsIbelowIrrefutable+ {-# LINE 3065 "PrintCode.hs" #-})) of+ { !_hdObelowIrrefutable ->+ (case (hd_ _hdObelowIrrefutable _hdOisDeclOfLet _hdOoptions ) of+ { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp,!_hdIpp',!_hdIstrictVars) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 3071 "PrintCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 3075 "PrintCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 340 "PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 3079 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ (case (({-# LINE 380 "PrintCode.ag" #-}+ _hdIpp' : _tlIpps'+ {-# LINE 3083 "PrintCode.hs" #-})) of+ { !_lhsOpps' ->+ (case (({-# LINE 319 "PrintCode.ag" #-}+ _hdIstrictVars ++ _tlIstrictVars+ {-# LINE 3087 "PrintCode.hs" #-})) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOpps,_lhsOpps',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil =+ (T_Patterns (\ (!_lhsIbelowIrrefutable)+ (!_lhsIisDeclOfLet)+ (!_lhsIoptions) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ []+ {-# LINE 3097 "PrintCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 3101 "PrintCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 341 "PrintCode.ag" #-}+ []+ {-# LINE 3105 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ (case (({-# LINE 381 "PrintCode.ag" #-}+ []+ {-# LINE 3109 "PrintCode.hs" #-})) of+ { !_lhsOpps' ->+ (case (({-# LINE 319 "PrintCode.ag" #-}+ []+ {-# LINE 3113 "PrintCode.hs" #-})) of+ { !_lhsOstrictVars ->+ ( _lhsOcopy,_lhsOpps,_lhsOpps',_lhsOstrictVars) }) }) }) }) })) )+-- Program -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ importBlocks : PP_Doc+ mainFile : String+ mainName : String+ moduleHeader : String -> String -> String -> Bool -> String+ options : Options+ optionsLine : String+ pragmaBlocks : String+ textBlockMap : Map BlockInfo PP_Doc+ textBlocks : PP_Doc+ synthesized attributes:+ genIO : IO ()+ output : PP_Docs+ alternatives:+ alternative Program:+ child chunks : Chunks + child ordered : {Bool}+ visit 0:+ local options : _+ local commonFile : _+ local genCommonModule : _+ local mainModuleFile : _+ local genMainModule : _+-}+-- cata+sem_Program :: Program ->+ T_Program +sem_Program !(Program _chunks _ordered ) =+ (sem_Program_Program (sem_Chunks _chunks ) _ordered )+-- semantic domain+newtype T_Program = T_Program (PP_Doc ->+ String ->+ String ->+ (String -> String -> String -> Bool -> String) ->+ Options ->+ String ->+ String ->+ (Map BlockInfo PP_Doc) ->+ PP_Doc ->+ ( (IO ()),PP_Docs))+data Inh_Program = Inh_Program {importBlocks_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)}+wrap_Program :: T_Program ->+ Inh_Program ->+ Syn_Program +wrap_Program !(T_Program sem ) !(Inh_Program _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks ) =+ (let ( !_lhsOgenIO,!_lhsOoutput) = sem _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks + in (Syn_Program _lhsOgenIO _lhsOoutput ))+sem_Program_Program :: T_Chunks ->+ Bool ->+ T_Program +sem_Program_Program !(T_Chunks chunks_ ) !ordered_ =+ (T_Program (\ (!_lhsIimportBlocks)+ (!_lhsImainFile)+ (!_lhsImainName)+ (!_lhsImoduleHeader)+ (!_lhsIoptions)+ (!_lhsIoptionsLine)+ (!_lhsIpragmaBlocks)+ (!_lhsItextBlockMap)+ (!_lhsItextBlocks) ->+ (case (({-# LINE 428 "PrintCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 3182 "PrintCode.hs" #-})) of+ { !_chunksOtextBlockMap ->+ (case (({-# LINE 426 "PrintCode.ag" #-}+ _lhsIpragmaBlocks+ {-# LINE 3186 "PrintCode.hs" #-})) of+ { !_chunksOpragmaBlocks ->+ (case (({-# LINE 429 "PrintCode.ag" #-}+ _lhsIoptionsLine+ {-# LINE 3190 "PrintCode.hs" #-})) of+ { !_chunksOoptionsLine ->+ (case (({-# LINE 58 "PrintCode.ag" #-}+ _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && ordered_ }+ {-# LINE 3194 "PrintCode.hs" #-})) of+ { !_options ->+ (case (({-# LINE 49 "PrintCode.ag" #-}+ _options+ {-# LINE 3198 "PrintCode.hs" #-})) of+ { !_chunksOoptions ->+ (case (({-# LINE 432 "PrintCode.ag" #-}+ _lhsImoduleHeader+ {-# LINE 3202 "PrintCode.hs" #-})) of+ { !_chunksOmoduleHeader ->+ (case (({-# LINE 431 "PrintCode.ag" #-}+ _lhsImainName+ {-# LINE 3206 "PrintCode.hs" #-})) of+ { !_chunksOmainName ->+ (case (({-# LINE 430 "PrintCode.ag" #-}+ _lhsImainFile+ {-# LINE 3210 "PrintCode.hs" #-})) of+ { !_chunksOmainFile ->+ (case (({-# LINE 449 "PrintCode.ag" #-}+ _lhsImainFile ++ "_common.hs"+ {-# LINE 3214 "PrintCode.hs" #-})) of+ { !_commonFile ->+ (case (({-# LINE 403 "PrintCode.ag" #-}+ False+ {-# LINE 3218 "PrintCode.hs" #-})) of+ { !_chunksOisDeclOfLet ->+ (case (({-# LINE 61 "PrintCode.ag" #-}+ nest _lhsIoptions+ {-# LINE 3222 "PrintCode.hs" #-})) of+ { !_chunksOnested ->+ (case (({-# LINE 427 "PrintCode.ag" #-}+ _lhsItextBlocks+ {-# LINE 3226 "PrintCode.hs" #-})) of+ { !_chunksOtextBlocks ->+ (case (({-# LINE 425 "PrintCode.ag" #-}+ _lhsIimportBlocks+ {-# LINE 3230 "PrintCode.hs" #-})) of+ { !_chunksOimportBlocks ->+ (case (chunks_ _chunksOimportBlocks _chunksOisDeclOfLet _chunksOmainFile _chunksOmainName _chunksOmoduleHeader _chunksOnested _chunksOoptions _chunksOoptionsLine _chunksOpragmaBlocks _chunksOtextBlockMap _chunksOtextBlocks ) of+ { ( !_chunksIappendCommon,!_chunksIappendMain,!_chunksIgenSems,!_chunksIimports,!_chunksIpps) ->+ (case (({-# LINE 450 "PrintCode.ag" #-}+ writeModule _commonFile+ ( [ pp $ _lhsIpragmaBlocks+ , pp $ _lhsIoptionsLine+ , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True+ , _lhsIimportBlocks+ , _lhsItextBlocks+ ]+ ++ map vlist _chunksIappendCommon+ )+ {-# LINE 3244 "PrintCode.hs" #-})) of+ { !_genCommonModule ->+ (case (({-# LINE 437 "PrintCode.ag" #-}+ _lhsImainFile ++ ".hs"+ {-# LINE 3248 "PrintCode.hs" #-})) of+ { !_mainModuleFile ->+ (case (({-# LINE 438 "PrintCode.ag" #-}+ writeModule _mainModuleFile+ ( [ pp $ _lhsIpragmaBlocks+ , pp $ _lhsIoptionsLine+ , pp $ _lhsImoduleHeader _lhsImainName "" "" False+ , pp $ ("import " ++ _lhsImainName ++ "_common\n")+ ]+ ++ map pp _chunksIimports+ ++ map vlist _chunksIappendMain+ )+ {-# LINE 3260 "PrintCode.hs" #-})) of+ { !_genMainModule ->+ (case (({-# LINE 461 "PrintCode.ag" #-}+ do _genMainModule+ _genCommonModule+ _chunksIgenSems+ {-# LINE 3266 "PrintCode.hs" #-})) of+ { !_lhsOgenIO ->+ (case (({-# LINE 93 "PrintCode.ag" #-}+ _chunksIpps+ {-# LINE 3270 "PrintCode.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOgenIO,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Type --------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ nested : Bool+ synthesized attributes:+ pp : PP_Doc+ prec : Int+ alternatives:+ alternative Arr:+ child left : Type + child right : Type + visit 0:+ local r : _+ local l : _+ alternative CtxApp:+ child left : {[(String, [String])]}+ child right : Type + alternative List:+ child tp : Type + alternative NontermType:+ child name : {String}+ child params : {[String]}+ alternative SimpleType:+ child txt : {String}+ alternative TEither:+ child left : Type + child right : Type + alternative TIntMap:+ child value : Type + alternative TMap:+ child key : Type + child value : Type + alternative TMaybe:+ child tp : Type + alternative TupleType:+ child tps : Types + alternative TypeApp:+ child func : Type + child args : Types + alternative UnboxedTupleType:+ child tps : Types +-}+-- cata+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 !(List _tp ) =+ (sem_Type_List (sem_Type _tp ) )+sem_Type !(NontermType _name _params ) =+ (sem_Type_NontermType _name _params )+sem_Type !(SimpleType _txt ) =+ (sem_Type_SimpleType _txt )+sem_Type !(TEither _left _right ) =+ (sem_Type_TEither (sem_Type _left ) (sem_Type _right ) )+sem_Type !(TIntMap _value ) =+ (sem_Type_TIntMap (sem_Type _value ) )+sem_Type !(TMap _key _value ) =+ (sem_Type_TMap (sem_Type _key ) (sem_Type _value ) )+sem_Type !(TMaybe _tp ) =+ (sem_Type_TMaybe (sem_Type _tp ) )+sem_Type !(TupleType _tps ) =+ (sem_Type_TupleType (sem_Types _tps ) )+sem_Type !(TypeApp _func _args ) =+ (sem_Type_TypeApp (sem_Type _func ) (sem_Types _args ) )+sem_Type !(UnboxedTupleType _tps ) =+ (sem_Type_UnboxedTupleType (sem_Types _tps ) )+-- semantic domain+newtype T_Type = T_Type (Bool ->+ ( PP_Doc,Int))+data Inh_Type = Inh_Type {nested_Inh_Type :: !(Bool)}+data Syn_Type = Syn_Type {pp_Syn_Type :: !(PP_Doc),prec_Syn_Type :: !(Int)}+wrap_Type :: T_Type ->+ Inh_Type ->+ Syn_Type +wrap_Type !(T_Type sem ) !(Inh_Type _lhsInested ) =+ (let ( !_lhsOpp,!_lhsOprec) = sem _lhsInested + in (Syn_Type _lhsOpp _lhsOprec ))+sem_Type_Arr :: T_Type ->+ T_Type ->+ T_Type +sem_Type_Arr !(T_Type left_ ) !(T_Type right_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3361 "PrintCode.hs" #-})) of+ { !_rightOnested ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3365 "PrintCode.hs" #-})) of+ { !_leftOnested ->+ (case (right_ _rightOnested ) of+ { ( !_rightIpp,!_rightIprec) ->+ (case (({-# LINE 261 "PrintCode.ag" #-}+ if _rightIprec < 2 then pp_parens _rightIpp else _rightIpp+ {-# LINE 3371 "PrintCode.hs" #-})) of+ { !_r ->+ (case (left_ _leftOnested ) of+ { ( !_leftIpp,!_leftIprec) ->+ (case (({-# LINE 260 "PrintCode.ag" #-}+ if _leftIprec <= 2 then pp_parens _leftIpp else _leftIpp+ {-# LINE 3377 "PrintCode.hs" #-})) of+ { !_l ->+ (case (({-# LINE 259 "PrintCode.ag" #-}+ _l >#< "->" >-< _r+ {-# LINE 3381 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 258 "PrintCode.ag" #-}+ 2+ {-# LINE 3385 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) }) }) }) }) })) )+sem_Type_CtxApp :: ([(String, [String])]) ->+ T_Type ->+ T_Type +sem_Type_CtxApp !left_ !(T_Type right_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3395 "PrintCode.hs" #-})) of+ { !_rightOnested ->+ (case (right_ _rightOnested ) of+ { ( !_rightIpp,!_rightIprec) ->+ (case (({-# LINE 267 "PrintCode.ag" #-}+ (pp_block "(" ")" "," $ map (\(n,ns) -> hv_sp $ map pp (n:ns)) left_) >#< "=>" >#< _rightIpp+ {-# LINE 3401 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 257 "PrintCode.ag" #-}+ _rightIprec+ {-# LINE 3405 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })) )+sem_Type_List :: T_Type ->+ T_Type +sem_Type_List !(T_Type tp_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3414 "PrintCode.hs" #-})) of+ { !_tpOnested ->+ (case (tp_ _tpOnested ) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 276 "PrintCode.ag" #-}+ "[" >|< _tpIpp >|< "]"+ {-# LINE 3420 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 275 "PrintCode.ag" #-}+ 5+ {-# LINE 3424 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })) )+sem_Type_NontermType :: String ->+ ([String]) ->+ T_Type +sem_Type_NontermType !name_ !params_ =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 282 "PrintCode.ag" #-}+ text name_ >#< hv_sp params_+ {-# LINE 3434 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 281 "PrintCode.ag" #-}+ 5+ {-# LINE 3438 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) })) )+sem_Type_SimpleType :: String ->+ T_Type +sem_Type_SimpleType !txt_ =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 279 "PrintCode.ag" #-}+ if reallySimple txt_ then text txt_ else pp_parens (text txt_)+ {-# LINE 3447 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 278 "PrintCode.ag" #-}+ 5+ {-# LINE 3451 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) })) )+sem_Type_TEither :: T_Type ->+ T_Type ->+ T_Type +sem_Type_TEither !(T_Type left_ ) !(T_Type right_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3461 "PrintCode.hs" #-})) of+ { !_rightOnested ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3465 "PrintCode.hs" #-})) of+ { !_leftOnested ->+ (case (right_ _rightOnested ) of+ { ( !_rightIpp,!_rightIprec) ->+ (case (left_ _leftOnested ) of+ { ( !_leftIpp,!_leftIprec) ->+ (case (({-# LINE 286 "PrintCode.ag" #-}+ text "Either" >#< pp_parens _leftIpp >#< pp_parens _rightIpp+ {-# LINE 3473 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 285 "PrintCode.ag" #-}+ 5+ {-# LINE 3477 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )+sem_Type_TIntMap :: T_Type ->+ T_Type +sem_Type_TIntMap !(T_Type value_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3486 "PrintCode.hs" #-})) of+ { !_valueOnested ->+ (case (value_ _valueOnested ) of+ { ( !_valueIpp,!_valueIprec) ->+ (case (({-# LINE 290 "PrintCode.ag" #-}+ text "IntMap" >#< pp_parens _valueIpp+ {-# LINE 3492 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 289 "PrintCode.ag" #-}+ 5+ {-# LINE 3496 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })) )+sem_Type_TMap :: T_Type ->+ T_Type ->+ T_Type +sem_Type_TMap !(T_Type key_ ) !(T_Type value_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3506 "PrintCode.hs" #-})) of+ { !_valueOnested ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3510 "PrintCode.hs" #-})) of+ { !_keyOnested ->+ (case (value_ _valueOnested ) of+ { ( !_valueIpp,!_valueIprec) ->+ (case (key_ _keyOnested ) of+ { ( !_keyIpp,!_keyIprec) ->+ (case (({-# LINE 288 "PrintCode.ag" #-}+ text "Map" >#< pp_parens _keyIpp >#< pp_parens _valueIpp+ {-# LINE 3518 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 287 "PrintCode.ag" #-}+ 5+ {-# LINE 3522 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )+sem_Type_TMaybe :: T_Type ->+ T_Type +sem_Type_TMaybe !(T_Type tp_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3531 "PrintCode.hs" #-})) of+ { !_tpOnested ->+ (case (tp_ _tpOnested ) of+ { ( !_tpIpp,!_tpIprec) ->+ (case (({-# LINE 284 "PrintCode.ag" #-}+ text "Maybe" >#< _tpIpp+ {-# LINE 3537 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 283 "PrintCode.ag" #-}+ 5+ {-# LINE 3541 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })) )+sem_Type_TupleType :: T_Types ->+ T_Type +sem_Type_TupleType !(T_Types tps_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3550 "PrintCode.hs" #-})) of+ { !_tpsOnested ->+ (case (tps_ _tpsOnested ) of+ { ( !_tpsIpps) ->+ (case (({-# LINE 270 "PrintCode.ag" #-}+ ppTuple _lhsInested _tpsIpps+ {-# LINE 3556 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 269 "PrintCode.ag" #-}+ 5+ {-# LINE 3560 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })) )+sem_Type_TypeApp :: T_Type ->+ T_Types ->+ T_Type +sem_Type_TypeApp !(T_Type func_ ) !(T_Types args_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3570 "PrintCode.hs" #-})) of+ { !_argsOnested ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3574 "PrintCode.hs" #-})) of+ { !_funcOnested ->+ (case (args_ _argsOnested ) of+ { ( !_argsIpps) ->+ (case (func_ _funcOnested ) of+ { ( !_funcIpp,!_funcIprec) ->+ (case (({-# LINE 264 "PrintCode.ag" #-}+ hv_sp (_funcIpp : _argsIpps)+ {-# LINE 3582 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 257 "PrintCode.ag" #-}+ _funcIprec+ {-# LINE 3586 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )+sem_Type_UnboxedTupleType :: T_Types ->+ T_Type +sem_Type_UnboxedTupleType !(T_Types tps_ ) =+ (T_Type (\ (!_lhsInested) ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3595 "PrintCode.hs" #-})) of+ { !_tpsOnested ->+ (case (tps_ _tpsOnested ) of+ { ( !_tpsIpps) ->+ (case (({-# LINE 273 "PrintCode.ag" #-}+ ppUnboxedTuple _lhsInested _tpsIpps+ {-# LINE 3601 "PrintCode.hs" #-})) of+ { !_lhsOpp ->+ (case (({-# LINE 272 "PrintCode.ag" #-}+ 5+ {-# LINE 3605 "PrintCode.hs" #-})) of+ { !_lhsOprec ->+ ( _lhsOpp,_lhsOprec) }) }) }) })) )+-- Types -------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ nested : Bool+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Type + child tl : Types + alternative Nil:+-}+-- cata+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 (Bool ->+ ( PP_Docs))+data Inh_Types = Inh_Types {nested_Inh_Types :: !(Bool)}+data Syn_Types = Syn_Types {pps_Syn_Types :: !(PP_Docs)}+wrap_Types :: T_Types ->+ Inh_Types ->+ Syn_Types +wrap_Types !(T_Types sem ) !(Inh_Types _lhsInested ) =+ (let ( !_lhsOpps) = sem _lhsInested + in (Syn_Types _lhsOpps ))+sem_Types_Cons :: T_Type ->+ T_Types ->+ T_Types +sem_Types_Cons !(T_Type hd_ ) !(T_Types tl_ ) =+ (T_Types (\ (!_lhsInested) ->+ (case (({-# LINE 53 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3644 "PrintCode.hs" #-})) of+ { !_tlOnested ->+ (case (({-# LINE 51 "PrintCode.ag" #-}+ _lhsInested+ {-# LINE 3648 "PrintCode.hs" #-})) of+ { !_hdOnested ->+ (case (tl_ _tlOnested ) of+ { ( !_tlIpps) ->+ (case (hd_ _hdOnested ) of+ { ( !_hdIpp,!_hdIprec) ->+ (case (({-# LINE 76 "PrintCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 3656 "PrintCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) })) )+sem_Types_Nil :: T_Types +sem_Types_Nil =+ (T_Types (\ (!_lhsInested) ->+ (case (({-# LINE 77 "PrintCode.ag" #-}+ []+ {-# LINE 3664 "PrintCode.hs" #-})) of { !_lhsOpps -> ( _lhsOpps) })) )
src-derived/PrintErrorMessages.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (PrintErrorMessages.ag)+-- UUAGC 0.9.30 (PrintErrorMessages.ag) module PrintErrorMessages where {-# LINE 4 "PrintErrorMessages.ag" #-} @@ -438,8 +438,7 @@ Inh_Error -> Syn_Error wrap_Error (T_Error sem ) (Inh_Error _lhsIoptions _lhsIverbose ) =- (let ( _lhsOme,_lhsOpp) =- (sem _lhsIoptions _lhsIverbose )+ (let ( _lhsOme,_lhsOpp) = sem _lhsIoptions _lhsIverbose in (Syn_Error _lhsOme _lhsOpp )) sem_Error_ChildAsLocal :: NontermIdent -> ConstructorIdent ->@@ -465,17 +464,17 @@ ] act = wfill ["The generated program probably contains a type error or has undefined variables."] in ppError (isError _lhsIoptions _me) (getPos var_) mesg pat help act _lhsIverbose- {-# LINE 469 "PrintErrorMessages.hs" #-})+ {-# LINE 468 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} ChildAsLocal nt_ con_ var_- {-# LINE 474 "PrintErrorMessages.hs" #-})+ {-# LINE 473 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 479 "PrintErrorMessages.hs" #-})+ {-# LINE 478 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_CustomError :: Bool -> Pos ->@@ -493,17 +492,17 @@ help = wfill ["not available."] act = wfill ["unknown"] in ppError (isError _lhsIoptions _me) pos_ mesg_ pat help act False- {-# LINE 497 "PrintErrorMessages.hs" #-})+ {-# LINE 496 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} CustomError isWarning_ pos_ mesg_- {-# LINE 502 "PrintErrorMessages.hs" #-})+ {-# LINE 501 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 507 "PrintErrorMessages.hs" #-})+ {-# LINE 506 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_CyclicSet :: Identifier -> T_Error @@ -523,17 +522,17 @@ ] act = wfill ["The nonterminal set", getName name_, "is considered to be empty."] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 527 "PrintErrorMessages.hs" #-})+ {-# LINE 526 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} CyclicSet name_- {-# LINE 532 "PrintErrorMessages.hs" #-})+ {-# LINE 531 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 537 "PrintErrorMessages.hs" #-})+ {-# LINE 536 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DirectCirc :: NontermIdent -> Bool ->@@ -554,17 +553,17 @@ act | o_visit_ = text "An unoptimized version was generated. It might hang when run." | otherwise = text "The generated program might hang when run." in ppError (isError _lhsIoptions _me) noPos mesg pat help act _lhsIverbose- {-# LINE 558 "PrintErrorMessages.hs" #-})+ {-# LINE 557 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DirectCirc nt_ o_visit_ cyclic_- {-# LINE 563 "PrintErrorMessages.hs" #-})+ {-# LINE 562 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 568 "PrintErrorMessages.hs" #-})+ {-# LINE 567 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupAlt :: NontermIdent -> ConstructorIdent ->@@ -596,17 +595,17 @@ ,"is considered valid. All other alternatives have been discarded." ] in ppError (isError _lhsIoptions _me) (getPos con_) mesg pat help act _lhsIverbose- {-# LINE 600 "PrintErrorMessages.hs" #-})+ {-# LINE 599 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupAlt nt_ con_ occ1_- {-# LINE 605 "PrintErrorMessages.hs" #-})+ {-# LINE 604 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 610 "PrintErrorMessages.hs" #-})+ {-# LINE 609 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupChild :: NontermIdent -> ConstructorIdent ->@@ -638,17 +637,17 @@ ,"All others have been discarded." ] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 642 "PrintErrorMessages.hs" #-})+ {-# LINE 641 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupChild nt_ con_ name_ occ1_- {-# LINE 647 "PrintErrorMessages.hs" #-})+ {-# LINE 646 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 652 "PrintErrorMessages.hs" #-})+ {-# LINE 651 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupInhAttr :: NontermIdent -> Identifier ->@@ -678,17 +677,17 @@ ,"All others have been discarded. The generated program will probably not run." ] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 682 "PrintErrorMessages.hs" #-})+ {-# LINE 681 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupInhAttr nt_ attr_ occ1_- {-# LINE 687 "PrintErrorMessages.hs" #-})+ {-# LINE 686 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 692 "PrintErrorMessages.hs" #-})+ {-# LINE 691 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupRule :: NontermIdent -> ConstructorIdent ->@@ -719,17 +718,17 @@ ] act = wfill ["The last rule given is considered valid. All others have been discarded."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 723 "PrintErrorMessages.hs" #-})+ {-# LINE 722 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupRule nt_ con_ field_ attr_ occ1_- {-# LINE 728 "PrintErrorMessages.hs" #-})+ {-# LINE 727 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 733 "PrintErrorMessages.hs" #-})+ {-# LINE 732 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupRuleName :: NontermIdent -> ConstructorIdent ->@@ -755,17 +754,17 @@ ] act = wfill ["Compilation cannot continue."] in ppError (isError _lhsIoptions _me) (getPos nm_) mesg pat help act _lhsIverbose- {-# LINE 759 "PrintErrorMessages.hs" #-})+ {-# LINE 758 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupRuleName nt_ con_ nm_- {-# LINE 764 "PrintErrorMessages.hs" #-})+ {-# LINE 763 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 769 "PrintErrorMessages.hs" #-})+ {-# LINE 768 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupSet :: NontermIdent -> NontermIdent ->@@ -793,17 +792,17 @@ act = wfill [ "The clashing nonterminal set will be ignored." ] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 797 "PrintErrorMessages.hs" #-})+ {-# LINE 796 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupSet name_ occ1_- {-# LINE 802 "PrintErrorMessages.hs" #-})+ {-# LINE 801 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 807 "PrintErrorMessages.hs" #-})+ {-# LINE 806 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupSig :: NontermIdent -> ConstructorIdent ->@@ -831,17 +830,17 @@ ] act = wfill ["The last typesignature given is considered valid. All others have been discarded."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 835 "PrintErrorMessages.hs" #-})+ {-# LINE 834 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupSig nt_ con_ attr_- {-# LINE 840 "PrintErrorMessages.hs" #-})+ {-# LINE 839 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 845 "PrintErrorMessages.hs" #-})+ {-# LINE 844 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupSynAttr :: NontermIdent -> Identifier ->@@ -871,17 +870,17 @@ ,"All others have been discarded. The generated program will probably not run." ] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 875 "PrintErrorMessages.hs" #-})+ {-# LINE 874 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupSynAttr nt_ attr_ occ1_- {-# LINE 880 "PrintErrorMessages.hs" #-})+ {-# LINE 879 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 885 "PrintErrorMessages.hs" #-})+ {-# LINE 884 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupSynonym :: NontermIdent -> NontermIdent ->@@ -910,17 +909,17 @@ act = wfill [ "The clashing type synonym will be ignored." ] in ppError (isError _lhsIoptions _me) (getPos nt_) mesg pat help act _lhsIverbose- {-# LINE 914 "PrintErrorMessages.hs" #-})+ {-# LINE 913 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupSynonym nt_ occ1_- {-# LINE 919 "PrintErrorMessages.hs" #-})+ {-# LINE 918 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 924 "PrintErrorMessages.hs" #-})+ {-# LINE 923 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_DupUnique :: NontermIdent -> ConstructorIdent ->@@ -948,17 +947,17 @@ ] act = wfill ["Unpredicatable sharing of unique numbers may occur."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 952 "PrintErrorMessages.hs" #-})+ {-# LINE 951 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} DupUnique nt_ con_ attr_- {-# LINE 957 "PrintErrorMessages.hs" #-})+ {-# LINE 956 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 962 "PrintErrorMessages.hs" #-})+ {-# LINE 961 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_InducedCirc :: NontermIdent -> CInterface ->@@ -980,17 +979,17 @@ >-< vlist (map showEdgeLong cyclic_) act = text "An unoptimized version was generated. It might hang when run." in ppError (isError _lhsIoptions _me) noPos mesg pat help act _lhsIverbose- {-# LINE 984 "PrintErrorMessages.hs" #-})+ {-# LINE 983 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} InducedCirc nt_ cinter_ cyclic_- {-# LINE 989 "PrintErrorMessages.hs" #-})+ {-# LINE 988 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 994 "PrintErrorMessages.hs" #-})+ {-# LINE 993 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_InstCirc :: NontermIdent -> ConstructorIdent ->@@ -1017,17 +1016,17 @@ act | o_visit_ = text "An unoptimized version was generated. It might hang when run." | otherwise = text "The generated program might hang when run." in ppError (isError _lhsIoptions _me) (getPos (attr_)) mesg pat help act _lhsIverbose- {-# LINE 1021 "PrintErrorMessages.hs" #-})+ {-# LINE 1020 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} InstCirc nt_ con_ attr_ o_visit_ path_- {-# LINE 1026 "PrintErrorMessages.hs" #-})+ {-# LINE 1025 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1031 "PrintErrorMessages.hs" #-})+ {-# LINE 1030 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_LocalCirc :: NontermIdent -> ConstructorIdent ->@@ -1054,17 +1053,17 @@ act | o_visit_ = text "An unoptimized version was generated. It might hang when run." | otherwise = text "The generated program might hang when run." in ppError (isError _lhsIoptions _me) (getPos (attr_)) mesg pat help act _lhsIverbose- {-# LINE 1058 "PrintErrorMessages.hs" #-})+ {-# LINE 1057 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} LocalCirc nt_ con_ attr_ o_visit_ path_- {-# LINE 1063 "PrintErrorMessages.hs" #-})+ {-# LINE 1062 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1068 "PrintErrorMessages.hs" #-})+ {-# LINE 1067 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_MissingInstSig :: NontermIdent -> ConstructorIdent ->@@ -1091,17 +1090,17 @@ ] act = wfill ["It is not possible to proceed without this signature."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1095 "PrintErrorMessages.hs" #-})+ {-# LINE 1094 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} MissingInstSig nt_ con_ attr_- {-# LINE 1100 "PrintErrorMessages.hs" #-})+ {-# LINE 1099 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1105 "PrintErrorMessages.hs" #-})+ {-# LINE 1104 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_MissingNamedRule :: NontermIdent -> Identifier ->@@ -1125,17 +1124,17 @@ ] act = wfill ["Compilation cannot continue."] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 1129 "PrintErrorMessages.hs" #-})+ {-# LINE 1128 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} MissingNamedRule nt_ con_ name_- {-# LINE 1134 "PrintErrorMessages.hs" #-})+ {-# LINE 1133 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1139 "PrintErrorMessages.hs" #-})+ {-# LINE 1138 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_MissingRule :: NontermIdent -> ConstructorIdent ->@@ -1161,17 +1160,17 @@ ] act = wfill ["The value of the attribute has been set to undefined."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1165 "PrintErrorMessages.hs" #-})+ {-# LINE 1164 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} MissingRule nt_ con_ field_ attr_- {-# LINE 1170 "PrintErrorMessages.hs" #-})+ {-# LINE 1169 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1175 "PrintErrorMessages.hs" #-})+ {-# LINE 1174 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_MissingSyn :: NontermIdent -> Identifier ->@@ -1198,17 +1197,17 @@ ] act = wfill ["It is not possible to proceed without this declaration."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1202 "PrintErrorMessages.hs" #-})+ {-# LINE 1201 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} MissingSyn nt_ attr_- {-# LINE 1207 "PrintErrorMessages.hs" #-})+ {-# LINE 1206 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1212 "PrintErrorMessages.hs" #-})+ {-# LINE 1211 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_MissingTypeSig :: NontermIdent -> ConstructorIdent ->@@ -1235,17 +1234,17 @@ ] act = wfill ["The type signatures of semantic functions are not generated."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1239 "PrintErrorMessages.hs" #-})+ {-# LINE 1238 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} MissingTypeSig nt_ con_ attr_- {-# LINE 1244 "PrintErrorMessages.hs" #-})+ {-# LINE 1243 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1249 "PrintErrorMessages.hs" #-})+ {-# LINE 1248 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_MissingUnique :: NontermIdent -> Identifier ->@@ -1272,17 +1271,17 @@ ] act = wfill ["It is not possible to proceed without this declaration."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1276 "PrintErrorMessages.hs" #-})+ {-# LINE 1275 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} MissingUnique nt_ attr_- {-# LINE 1281 "PrintErrorMessages.hs" #-})+ {-# LINE 1280 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1286 "PrintErrorMessages.hs" #-})+ {-# LINE 1285 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_ParserError :: Pos -> String ->@@ -1301,17 +1300,17 @@ help = text "" act = text action_ in ppError (isError _lhsIoptions _me) pos_ mesg pat help act _lhsIverbose- {-# LINE 1305 "PrintErrorMessages.hs" #-})+ {-# LINE 1304 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} ParserError pos_ problem_ action_- {-# LINE 1310 "PrintErrorMessages.hs" #-})+ {-# LINE 1309 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1315 "PrintErrorMessages.hs" #-})+ {-# LINE 1314 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_SuperfluousRule :: NontermIdent -> ConstructorIdent ->@@ -1337,17 +1336,17 @@ ] act = wfill ["The rule has been ignored."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1341 "PrintErrorMessages.hs" #-})+ {-# LINE 1340 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} SuperfluousRule nt_ con_ field_ attr_- {-# LINE 1346 "PrintErrorMessages.hs" #-})+ {-# LINE 1345 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1351 "PrintErrorMessages.hs" #-})+ {-# LINE 1350 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_UndefAlt :: NontermIdent -> ConstructorIdent ->@@ -1370,17 +1369,17 @@ ] act = wfill ["All rules for the unknown alternative have been ignored."] in ppError (isError _lhsIoptions _me) (getPos con_) mesg pat help act _lhsIverbose- {-# LINE 1374 "PrintErrorMessages.hs" #-})+ {-# LINE 1373 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} UndefAlt nt_ con_- {-# LINE 1379 "PrintErrorMessages.hs" #-})+ {-# LINE 1378 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1384 "PrintErrorMessages.hs" #-})+ {-# LINE 1383 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_UndefAttr :: NontermIdent -> ConstructorIdent ->@@ -1413,17 +1412,17 @@ ] act = wfill ["The generated program will not run."] in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose- {-# LINE 1417 "PrintErrorMessages.hs" #-})+ {-# LINE 1416 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} UndefAttr nt_ con_ field_ attr_ isOut_- {-# LINE 1422 "PrintErrorMessages.hs" #-})+ {-# LINE 1421 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1427 "PrintErrorMessages.hs" #-})+ {-# LINE 1426 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_UndefChild :: NontermIdent -> ConstructorIdent ->@@ -1450,17 +1449,17 @@ ] act = wfill ["All rules for the unknown field have been ignored."] in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose- {-# LINE 1454 "PrintErrorMessages.hs" #-})+ {-# LINE 1453 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} UndefChild nt_ con_ name_- {-# LINE 1459 "PrintErrorMessages.hs" #-})+ {-# LINE 1458 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1464 "PrintErrorMessages.hs" #-})+ {-# LINE 1463 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_UndefLocal :: NontermIdent -> ConstructorIdent ->@@ -1487,17 +1486,17 @@ ] act = wfill ["The generated program will not run."] in ppError (isError _lhsIoptions _me) (getPos var_) mesg pat help act _lhsIverbose- {-# LINE 1491 "PrintErrorMessages.hs" #-})+ {-# LINE 1490 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} UndefLocal nt_ con_ var_- {-# LINE 1496 "PrintErrorMessages.hs" #-})+ {-# LINE 1495 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1501 "PrintErrorMessages.hs" #-})+ {-# LINE 1500 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) sem_Error_UndefNont :: NontermIdent -> T_Error @@ -1517,17 +1516,17 @@ ] act = wfill ["Everything regarding the unknown nonterminal has been ignored."] in ppError (isError _lhsIoptions _me) (getPos nt_) mesg pat help act _lhsIverbose- {-# LINE 1521 "PrintErrorMessages.hs" #-})+ {-# LINE 1520 "PrintErrorMessages.hs" #-}) -- self rule _me = ({-# LINE 60 "PrintErrorMessages.ag" #-} UndefNont nt_- {-# LINE 1526 "PrintErrorMessages.hs" #-})+ {-# LINE 1525 "PrintErrorMessages.hs" #-}) -- self rule _lhsOme = ({-# LINE 60 "PrintErrorMessages.ag" #-} _me- {-# LINE 1531 "PrintErrorMessages.hs" #-})+ {-# LINE 1530 "PrintErrorMessages.hs" #-}) in ( _lhsOme,_lhsOpp))) ) -- Errors ------------------------------------------------------ {-@@ -1560,8 +1559,7 @@ Inh_Errors -> Syn_Errors wrap_Errors (T_Errors sem ) (Inh_Errors _lhsIoptions ) =- (let ( _lhsOpp) =- (sem _lhsIoptions )+ (let ( _lhsOpp) = sem _lhsIoptions in (Syn_Errors _lhsOpp )) sem_Errors_Cons :: T_Error -> T_Errors ->@@ -1579,31 +1577,31 @@ _verbose = ({-# LINE 67 "PrintErrorMessages.ag" #-} verbose _lhsIoptions- {-# LINE 1583 "PrintErrorMessages.hs" #-})+ {-# LINE 1581 "PrintErrorMessages.hs" #-}) -- use rule "PrintErrorMessages.ag"(line 63, column 49) _lhsOpp = ({-# LINE 63 "PrintErrorMessages.ag" #-} _hdIpp >-< _tlIpp- {-# LINE 1588 "PrintErrorMessages.hs" #-})+ {-# LINE 1586 "PrintErrorMessages.hs" #-}) -- copy rule (down) _hdOoptions = ({-# LINE 59 "PrintErrorMessages.ag" #-} _lhsIoptions- {-# LINE 1593 "PrintErrorMessages.hs" #-})+ {-# LINE 1591 "PrintErrorMessages.hs" #-}) -- copy rule (from local) _hdOverbose = ({-# LINE 59 "PrintErrorMessages.ag" #-} _verbose- {-# LINE 1598 "PrintErrorMessages.hs" #-})+ {-# LINE 1596 "PrintErrorMessages.hs" #-}) -- copy rule (down) _tlOoptions = ({-# LINE 63 "PrintErrorMessages.ag" #-} _lhsIoptions- {-# LINE 1603 "PrintErrorMessages.hs" #-})+ {-# LINE 1601 "PrintErrorMessages.hs" #-}) ( _hdIme,_hdIpp) =- (hd_ _hdOoptions _hdOverbose )+ hd_ _hdOoptions _hdOverbose ( _tlIpp) =- (tl_ _tlOoptions )+ tl_ _tlOoptions in ( _lhsOpp))) ) sem_Errors_Nil :: T_Errors sem_Errors_Nil =@@ -1613,10 +1611,10 @@ _verbose = ({-# LINE 67 "PrintErrorMessages.ag" #-} verbose _lhsIoptions- {-# LINE 1617 "PrintErrorMessages.hs" #-})+ {-# LINE 1615 "PrintErrorMessages.hs" #-}) -- use rule "PrintErrorMessages.ag"(line 63, column 49) _lhsOpp = ({-# LINE 63 "PrintErrorMessages.ag" #-} text ""- {-# LINE 1622 "PrintErrorMessages.hs" #-})+ {-# LINE 1620 "PrintErrorMessages.hs" #-}) in ( _lhsOpp))) )
src-derived/PrintOcamlCode.hs view
@@ -1,2075 +1,2057 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.29 (PrintOcamlCode.ag)-module PrintOcamlCode where-{-# LINE 10 "PrintOcamlCode.ag" #-}--import Pretty-import Code-import Patterns-import Options-import CommonTypes hiding (List,Type,Map,Maybe,IntMap,Either)-import Data.List(intersperse,intercalate)-import Data.Char(toLower)-{-# LINE 15 "../src-derived/PrintOcamlCode.hs" #-}--{-# LINE 2 "./Code.ag" #-}--import Pretty-import Patterns-import Data.List(partition)-import Data.Set(Set)-import qualified Data.Set as Set-import Data.Map(Map)-import qualified Data.Map as Map-{-# LINE 26 "../src-derived/PrintOcamlCode.hs" #-}--{-# LINE 2 "./Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 33 "../src-derived/PrintOcamlCode.hs" #-}-{-# LINE 21 "PrintOcamlCode.ag" #-}--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--ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps-ppTuple False pps = "(" >|< pp_block " " ")" "," pps-{-# LINE 50 "../src-derived/PrintOcamlCode.hs" #-}--{-# LINE 174 "PrintOcamlCode.ag" #-}--toOcamlTC (c:cs) = toLower c : cs-toOcamlTC xs = xs-{-# LINE 56 "../src-derived/PrintOcamlCode.hs" #-}--{-# LINE 143 "./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 75 "../src-derived/PrintOcamlCode.hs" #-}--- CaseAlt ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pp : PP_Doc- alternatives:- alternative CaseAlt:- child left : Lhs - child expr : Expr --}--- cata-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 (Options ->- ( PP_Doc))-data Inh_CaseAlt = Inh_CaseAlt {options_Inh_CaseAlt :: !(Options)}-data Syn_CaseAlt = Syn_CaseAlt {pp_Syn_CaseAlt :: !(PP_Doc)}-wrap_CaseAlt :: T_CaseAlt ->- Inh_CaseAlt ->- Syn_CaseAlt -wrap_CaseAlt !(T_CaseAlt sem ) !(Inh_CaseAlt _lhsIoptions ) =- (let ( !_lhsOpp) =- (sem _lhsIoptions )- in (Syn_CaseAlt _lhsOpp ))-sem_CaseAlt_CaseAlt :: T_Lhs ->- T_Expr ->- T_CaseAlt -sem_CaseAlt_CaseAlt !(T_Lhs left_ ) !(T_Expr expr_ ) =- (T_CaseAlt (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 112 "PrintOcamlCode.hs" #-})) of- { !_exprOoptions ->- (case ((expr_ _exprOoptions )) of- { ( !_exprIpp) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 118 "PrintOcamlCode.hs" #-})) of- { !_leftOoptions ->- (case ((left_ _leftOoptions )) of- { ( !_leftIpp) ->- (case (({-# LINE 180 "PrintOcamlCode.ag" #-}- _leftIpp >#< "->" >#< _exprIpp- {-# LINE 124 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )--- CaseAlts -----------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : CaseAlt - child tl : CaseAlts - alternative Nil:--}--- cata-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 (Options ->- ( PP_Docs))-data Inh_CaseAlts = Inh_CaseAlts {options_Inh_CaseAlts :: !(Options)}-data Syn_CaseAlts = Syn_CaseAlts {pps_Syn_CaseAlts :: !(PP_Docs)}-wrap_CaseAlts :: T_CaseAlts ->- Inh_CaseAlts ->- Syn_CaseAlts -wrap_CaseAlts !(T_CaseAlts sem ) !(Inh_CaseAlts _lhsIoptions ) =- (let ( !_lhsOpps) =- (sem _lhsIoptions )- in (Syn_CaseAlts _lhsOpps ))-sem_CaseAlts_Cons :: T_CaseAlt ->- T_CaseAlts ->- T_CaseAlts -sem_CaseAlts_Cons !(T_CaseAlt hd_ ) !(T_CaseAlts tl_ ) =- (T_CaseAlts (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 164 "PrintOcamlCode.hs" #-})) of- { !_tlOoptions ->- (case ((tl_ _tlOoptions )) of- { ( !_tlIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 170 "PrintOcamlCode.hs" #-})) of- { !_hdOoptions ->- (case ((hd_ _hdOoptions )) of- { ( !_hdIpp) ->- (case (({-# LINE 64 "PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 176 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) })) )-sem_CaseAlts_Nil :: T_CaseAlts -sem_CaseAlts_Nil =- (T_CaseAlts (\ (!_lhsIoptions) ->- (case (({-# LINE 65 "PrintOcamlCode.ag" #-}- []- {-# LINE 184 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Chunk --------------------------------------------------------{-- visit 0:- inherited attributes:- isToplevel : Bool- options : Options- textBlockMap : Map BlockInfo PP_Doc- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Chunk:- child name : {String}- child comment : Decl - child info : Decls - child dataDef : Decls - child cataFun : Decls - child semDom : Decls - child semWrapper : Decls - child semFunctions : Decls - child semNames : {[String]}--}--- cata-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 (Bool ->- Options ->- (Map BlockInfo PP_Doc) ->- ( PP_Docs))-data Inh_Chunk = Inh_Chunk {isToplevel_Inh_Chunk :: !(Bool),options_Inh_Chunk :: !(Options),textBlockMap_Inh_Chunk :: !((Map BlockInfo PP_Doc))}-data Syn_Chunk = Syn_Chunk {pps_Syn_Chunk :: !(PP_Docs)}-wrap_Chunk :: T_Chunk ->- Inh_Chunk ->- Syn_Chunk -wrap_Chunk !(T_Chunk sem ) !(Inh_Chunk _lhsIisToplevel _lhsIoptions _lhsItextBlockMap ) =- (let ( !_lhsOpps) =- (sem _lhsIisToplevel _lhsIoptions _lhsItextBlockMap )- in (Syn_Chunk _lhsOpps ))-sem_Chunk_Chunk :: String ->- T_Decl ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- T_Decls ->- ([String]) ->- T_Chunk -sem_Chunk_Chunk !name_ !(T_Decl comment_ ) !(T_Decls info_ ) !(T_Decls dataDef_ ) !(T_Decls cataFun_ ) !(T_Decls semDom_ ) !(T_Decls semWrapper_ ) !(T_Decls semFunctions_ ) !semNames_ =- (T_Chunk (\ (!_lhsIisToplevel)- (!_lhsIoptions)- (!_lhsItextBlockMap) ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 243 "PrintOcamlCode.hs" #-})) of- { !_semFunctionsOisToplevel ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 247 "PrintOcamlCode.hs" #-})) of- { !_semWrapperOisToplevel ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 251 "PrintOcamlCode.hs" #-})) of- { !_semDomOisToplevel ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 255 "PrintOcamlCode.hs" #-})) of- { !_cataFunOisToplevel ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 259 "PrintOcamlCode.hs" #-})) of- { !_dataDefOisToplevel ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 263 "PrintOcamlCode.hs" #-})) of- { !_infoOisToplevel ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 267 "PrintOcamlCode.hs" #-})) of- { !_commentOisToplevel ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 271 "PrintOcamlCode.hs" #-})) of- { !_semFunctionsOoptions ->- (case ((semFunctions_ _semFunctionsOisToplevel _semFunctionsOoptions )) of- { ( !_semFunctionsIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 277 "PrintOcamlCode.hs" #-})) of- { !_semWrapperOoptions ->- (case ((semWrapper_ _semWrapperOisToplevel _semWrapperOoptions )) of- { ( !_semWrapperIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 283 "PrintOcamlCode.hs" #-})) of- { !_semDomOoptions ->- (case ((semDom_ _semDomOisToplevel _semDomOoptions )) of- { ( !_semDomIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 289 "PrintOcamlCode.hs" #-})) of- { !_cataFunOoptions ->- (case ((cataFun_ _cataFunOisToplevel _cataFunOoptions )) of- { ( !_cataFunIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 295 "PrintOcamlCode.hs" #-})) of- { !_dataDefOoptions ->- (case ((dataDef_ _dataDefOisToplevel _dataDefOoptions )) of- { ( !_dataDefIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 301 "PrintOcamlCode.hs" #-})) of- { !_infoOoptions ->- (case ((info_ _infoOisToplevel _infoOoptions )) of- { ( !_infoIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 307 "PrintOcamlCode.hs" #-})) of- { !_commentOoptions ->- (case ((comment_ _commentOisToplevel _commentOoptions )) of- { ( !_commentIpp) ->- (case (({-# LINE 96 "PrintOcamlCode.ag" #-}- _commentIpp- : _infoIpps- ++ _dataDefIpps- ++ _semDomIpps- ++ _semFunctionsIpps- ++ _semWrapperIpps- ++ _cataFunIpps- ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]- {-# LINE 320 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Chunks -------------------------------------------------------{-- visit 0:- inherited attributes:- isToplevel : Bool- options : Options- textBlockMap : Map BlockInfo PP_Doc- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Chunk - child tl : Chunks - alternative Nil:--}--- cata-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 (Bool ->- Options ->- (Map BlockInfo PP_Doc) ->- ( PP_Docs))-data Inh_Chunks = Inh_Chunks {isToplevel_Inh_Chunks :: !(Bool),options_Inh_Chunks :: !(Options),textBlockMap_Inh_Chunks :: !((Map BlockInfo PP_Doc))}-data Syn_Chunks = Syn_Chunks {pps_Syn_Chunks :: !(PP_Docs)}-wrap_Chunks :: T_Chunks ->- Inh_Chunks ->- Syn_Chunks -wrap_Chunks !(T_Chunks sem ) !(Inh_Chunks _lhsIisToplevel _lhsIoptions _lhsItextBlockMap ) =- (let ( !_lhsOpps) =- (sem _lhsIisToplevel _lhsIoptions _lhsItextBlockMap )- in (Syn_Chunks _lhsOpps ))-sem_Chunks_Cons :: T_Chunk ->- T_Chunks ->- T_Chunks -sem_Chunks_Cons !(T_Chunk hd_ ) !(T_Chunks tl_ ) =- (T_Chunks (\ (!_lhsIisToplevel)- (!_lhsIoptions)- (!_lhsItextBlockMap) ->- (case (({-# LINE 45 "PrintOcamlCode.ag" #-}- _lhsItextBlockMap- {-# LINE 366 "PrintOcamlCode.hs" #-})) of- { !_tlOtextBlockMap ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 370 "PrintOcamlCode.hs" #-})) of- { !_tlOisToplevel ->- (case (({-# LINE 45 "PrintOcamlCode.ag" #-}- _lhsItextBlockMap- {-# LINE 374 "PrintOcamlCode.hs" #-})) of- { !_hdOtextBlockMap ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 378 "PrintOcamlCode.hs" #-})) of- { !_hdOisToplevel ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 382 "PrintOcamlCode.hs" #-})) of- { !_tlOoptions ->- (case ((tl_ _tlOisToplevel _tlOoptions _tlOtextBlockMap )) of- { ( !_tlIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 388 "PrintOcamlCode.hs" #-})) of- { !_hdOoptions ->- (case ((hd_ _hdOisToplevel _hdOoptions _hdOtextBlockMap )) of- { ( !_hdIpps) ->- (case (({-# LINE 84 "PrintOcamlCode.ag" #-}- _hdIpps ++ _tlIpps- {-# LINE 394 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) }) }) })) )-sem_Chunks_Nil :: T_Chunks -sem_Chunks_Nil =- (T_Chunks (\ (!_lhsIisToplevel)- (!_lhsIoptions)- (!_lhsItextBlockMap) ->- (case (({-# LINE 85 "PrintOcamlCode.ag" #-}- []- {-# LINE 404 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- DataAlt ------------------------------------------------------{-- visit 0:- synthesized attribute:- pp : PP_Doc- alternatives:- alternative DataAlt:- child name : {String}- child args : Types - alternative Record:- child name : {String}- child args : NamedTypes --}--- cata-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 (( PP_Doc))-data Inh_DataAlt = Inh_DataAlt {}-data Syn_DataAlt = Syn_DataAlt {pp_Syn_DataAlt :: !(PP_Doc)}-wrap_DataAlt :: T_DataAlt ->- Inh_DataAlt ->- Syn_DataAlt -wrap_DataAlt !(T_DataAlt sem ) !(Inh_DataAlt ) =- (let ( !_lhsOpp) =- (sem )- in (Syn_DataAlt _lhsOpp ))-sem_DataAlt_DataAlt :: String ->- T_Types ->- T_DataAlt -sem_DataAlt_DataAlt !name_ !(T_Types args_ ) =- (T_DataAlt (case ((args_ )) of- { ( !_argsIpps) ->- (case (({-# LINE 183 "PrintOcamlCode.ag" #-}- name_ >#< "of" >#< pp_block "" "" " * " (map pp_parens _argsIpps)- {-# LINE 446 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )-sem_DataAlt_Record :: String ->- T_NamedTypes ->- T_DataAlt -sem_DataAlt_Record !name_ !(T_NamedTypes args_ ) =- (T_DataAlt (case ((args_ )) of- { ( !_argsIpps) ->- (case (({-# LINE 184 "PrintOcamlCode.ag" #-}- pp_block "{" "}" ";" _argsIpps- {-# LINE 457 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )--- DataAlts -----------------------------------------------------{-- visit 0:- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : DataAlt - child tl : DataAlts - alternative Nil:--}--- cata-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 (( PP_Docs))-data Inh_DataAlts = Inh_DataAlts {}-data Syn_DataAlts = Syn_DataAlts {pps_Syn_DataAlts :: !(PP_Docs)}-wrap_DataAlts :: T_DataAlts ->- Inh_DataAlts ->- Syn_DataAlts -wrap_DataAlts !(T_DataAlts sem ) !(Inh_DataAlts ) =- (let ( !_lhsOpps) =- (sem )- in (Syn_DataAlts _lhsOpps ))-sem_DataAlts_Cons :: T_DataAlt ->- T_DataAlts ->- T_DataAlts -sem_DataAlts_Cons !(T_DataAlt hd_ ) !(T_DataAlts tl_ ) =- (T_DataAlts (case ((tl_ )) of- { ( !_tlIpps) ->- (case ((hd_ )) of- { ( !_hdIpp) ->- (case (({-# LINE 68 "PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 497 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) )-sem_DataAlts_Nil :: T_DataAlts -sem_DataAlts_Nil =- (T_DataAlts (case (({-# LINE 69 "PrintOcamlCode.ag" #-}- []- {-# LINE 504 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) )--- Decl ---------------------------------------------------------{-- visit 0:- inherited attributes:- isToplevel : Bool- options : Options- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Bind:- child left : Lhs - child rhs : Expr - alternative BindLet:- child left : Lhs - child rhs : Expr - alternative Comment:- child txt : {String}- alternative Data:- child name : {String}- child params : {[String]}- child alts : DataAlts - child strict : {Bool}- child derivings : {[String]}- alternative Decl:- child left : Lhs - child rhs : Expr - child binds : {Set String}- child uses : {Set String}- alternative EvalDecl:- child nt : {String}- child left : Lhs - child rhs : Expr - alternative NewType:- child name : {String}- child params : {[String]}- child con : {String}- child tp : Type - alternative PragmaDecl:- child txt : {String}- alternative Resume:- child monadic : {Bool}- child nt : {String}- child left : Lhs - child rhs : Expr - alternative TSig:- child name : {String}- child tp : Type - alternative Type:- child name : {String}- child params : {[String]}- child tp : Type --}--- cata-sem_Decl :: Decl ->- T_Decl -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 !(Comment _txt ) =- (sem_Decl_Comment _txt )-sem_Decl !(Data _name _params _alts _strict _derivings ) =- (sem_Decl_Data _name _params (sem_DataAlts _alts ) _strict _derivings )-sem_Decl !(Decl _left _rhs _binds _uses ) =- (sem_Decl_Decl (sem_Lhs _left ) (sem_Expr _rhs ) _binds _uses )-sem_Decl !(EvalDecl _nt _left _rhs ) =- (sem_Decl_EvalDecl _nt (sem_Lhs _left ) (sem_Expr _rhs ) )-sem_Decl !(NewType _name _params _con _tp ) =- (sem_Decl_NewType _name _params _con (sem_Type _tp ) )-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 !(TSig _name _tp ) =- (sem_Decl_TSig _name (sem_Type _tp ) )-sem_Decl !(Type _name _params _tp ) =- (sem_Decl_Type _name _params (sem_Type _tp ) )--- semantic domain-newtype T_Decl = T_Decl (Bool ->- Options ->- ( PP_Doc))-data Inh_Decl = Inh_Decl {isToplevel_Inh_Decl :: !(Bool),options_Inh_Decl :: !(Options)}-data Syn_Decl = Syn_Decl {pp_Syn_Decl :: !(PP_Doc)}-wrap_Decl :: T_Decl ->- Inh_Decl ->- Syn_Decl -wrap_Decl !(T_Decl sem ) !(Inh_Decl _lhsIisToplevel _lhsIoptions ) =- (let ( !_lhsOpp) =- (sem _lhsIisToplevel _lhsIoptions )- in (Syn_Decl _lhsOpp ))-sem_Decl_Bind :: T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_Bind !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 111 "PrintOcamlCode.ag" #-}- error "pp of Decl.Bind not supported"- {-# LINE 605 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_BindLet :: T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_BindLet !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 112 "PrintOcamlCode.ag" #-}- error "pp of Decl.BindLet not supported"- {-# LINE 616 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Comment :: String ->- T_Decl -sem_Decl_Comment !txt_ =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 123 "PrintOcamlCode.ag" #-}- if '\n' `elem` txt_- then "(* " >-< vlist (lines txt_) >-< "*)"- else "(*" >#< txt_ >#< "*)"- {-# LINE 628 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Data :: String ->- ([String]) ->- T_DataAlts ->- Bool ->- ([String]) ->- T_Decl -sem_Decl_Data !name_ !params_ !(T_DataAlts alts_ ) !strict_ !derivings_ =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case ((alts_ )) of- { ( !_altsIpps) ->- (case (({-# LINE 113 "PrintOcamlCode.ag" #-}- "type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_])- >#< ( case _altsIpps of- [] -> empty- (x:xs) -> "=" >#< x- >-< vlist (map ("|" >#<) xs)- )- >#< ";;"- {-# LINE 650 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) })) )-sem_Decl_Decl :: T_Lhs ->- T_Expr ->- (Set String) ->- (Set String) ->- T_Decl -sem_Decl_Decl !(T_Lhs left_ ) !(T_Expr rhs_ ) !binds_ !uses_ =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 663 "PrintOcamlCode.hs" #-})) of- { !_rhsOoptions ->- (case ((rhs_ _rhsOoptions )) of- { ( !_rhsIpp) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 669 "PrintOcamlCode.hs" #-})) of- { !_leftOoptions ->- (case ((left_ _leftOoptions )) of- { ( !_leftIpp) ->- (case (({-# LINE 106 "PrintOcamlCode.ag" #-}- if _lhsIisToplevel- then "let" >#< _leftIpp >#< "="- >-< indent 4 _rhsIpp >#< ";;"- else "let" >#< _leftIpp >#< "="- >-< indent 4 _rhsIpp >#< "in"- {-# LINE 679 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Decl_EvalDecl :: String ->- T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_EvalDecl !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 691 "PrintOcamlCode.hs" #-})) of- { !_rhsOoptions ->- (case ((rhs_ _rhsOoptions )) of- { ( !_rhsIpp) ->- (case (({-# LINE 53 "PrintOcamlCode.ag" #-}- _rhsIpp- {-# LINE 697 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Decl_NewType :: String ->- ([String]) ->- String ->- T_Type ->- T_Decl -sem_Decl_NewType !name_ !params_ !con_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 120 "PrintOcamlCode.ag" #-}- error "pp of Decl.NewType not supported"- {-# LINE 710 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_PragmaDecl :: String ->- T_Decl -sem_Decl_PragmaDecl !txt_ =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 126 "PrintOcamlCode.ag" #-}- error "pp of Decl.PragmaDecl not supported"- {-# LINE 720 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Decl_Resume :: Bool ->- String ->- T_Lhs ->- T_Expr ->- T_Decl -sem_Decl_Resume !monadic_ !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 733 "PrintOcamlCode.hs" #-})) of- { !_rhsOoptions ->- (case ((rhs_ _rhsOoptions )) of- { ( !_rhsIpp) ->- (case (({-# LINE 53 "PrintOcamlCode.ag" #-}- _rhsIpp- {-# LINE 739 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Decl_TSig :: String ->- T_Type ->- T_Decl -sem_Decl_TSig !name_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case ((tp_ )) of- { ( !_tpIpp) ->- (case (({-# LINE 122 "PrintOcamlCode.ag" #-}- "(*" >#< name_ >#< ":" >#< _tpIpp >#< "*)"- {-# LINE 752 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) })) )-sem_Decl_Type :: String ->- ([String]) ->- T_Type ->- T_Decl -sem_Decl_Type !name_ !params_ !(T_Type tp_ ) =- (T_Decl (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case ((tp_ )) of- { ( !_tpIpp) ->- (case (({-# LINE 121 "PrintOcamlCode.ag" #-}- "type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_]) >#< "=" >#< _tpIpp >#< ";;"- {-# LINE 766 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) })) )--- Decls --------------------------------------------------------{-- visit 0:- inherited attributes:- isToplevel : Bool- options : Options- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Decl - child tl : Decls - alternative Nil:--}--- cata-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 (Bool ->- Options ->- ( PP_Docs))-data Inh_Decls = Inh_Decls {isToplevel_Inh_Decls :: !(Bool),options_Inh_Decls :: !(Options)}-data Syn_Decls = Syn_Decls {pps_Syn_Decls :: !(PP_Docs)}-wrap_Decls :: T_Decls ->- Inh_Decls ->- Syn_Decls -wrap_Decls !(T_Decls sem ) !(Inh_Decls _lhsIisToplevel _lhsIoptions ) =- (let ( !_lhsOpps) =- (sem _lhsIisToplevel _lhsIoptions )- in (Syn_Decls _lhsOpps ))-sem_Decls_Cons :: T_Decl ->- T_Decls ->- T_Decls -sem_Decls_Cons !(T_Decl hd_ ) !(T_Decls tl_ ) =- (T_Decls (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 809 "PrintOcamlCode.hs" #-})) of- { !_tlOisToplevel ->- (case (({-# LINE 209 "PrintOcamlCode.ag" #-}- _lhsIisToplevel- {-# LINE 813 "PrintOcamlCode.hs" #-})) of- { !_hdOisToplevel ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 817 "PrintOcamlCode.hs" #-})) of- { !_tlOoptions ->- (case ((tl_ _tlOisToplevel _tlOoptions )) of- { ( !_tlIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 823 "PrintOcamlCode.hs" #-})) of- { !_hdOoptions ->- (case ((hd_ _hdOisToplevel _hdOoptions )) of- { ( !_hdIpp) ->- (case (({-# LINE 80 "PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 829 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) }) }) })) )-sem_Decls_Nil :: T_Decls -sem_Decls_Nil =- (T_Decls (\ (!_lhsIisToplevel)- (!_lhsIoptions) ->- (case (({-# LINE 81 "PrintOcamlCode.ag" #-}- []- {-# LINE 838 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Expr ---------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pp : PP_Doc- alternatives:- alternative App:- child name : {String}- child args : Exprs - alternative Case:- child expr : Expr - child alts : CaseAlts - alternative Do:- child stmts : Decls - child body : Expr - alternative InvokeExpr:- child nt : {String}- child expr : Expr - child args : Exprs - alternative Lambda:- child args : Exprs - child body : Expr - alternative Let:- child decls : Decls - child body : Expr - alternative LineExpr:- child expr : Expr - alternative PragmaExpr:- child onLeftSide : {Bool}- child onNewLine : {Bool}- child txt : {String}- child expr : Expr - alternative ResultExpr:- child nt : {String}- child expr : Expr - alternative ResumeExpr:- child nt : {String}- child expr : Expr - child left : Lhs - child rhs : Expr - alternative SemFun:- child nt : {String}- child args : Exprs - child body : Expr - alternative SimpleExpr:- child txt : {String}- alternative TextExpr:- child lns : {[String]}- alternative Trace:- child txt : {String}- child expr : Expr - alternative TupleExpr:- child exprs : Exprs - alternative TypedExpr:- child expr : Expr - child tp : Type - alternative UnboxedTupleExpr:- child exprs : Exprs --}--- cata-sem_Expr :: Expr ->- T_Expr -sem_Expr !(App _name _args ) =- (sem_Expr_App _name (sem_Exprs _args ) )-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 !(InvokeExpr _nt _expr _args ) =- (sem_Expr_InvokeExpr _nt (sem_Expr _expr ) (sem_Exprs _args ) )-sem_Expr !(Lambda _args _body ) =- (sem_Expr_Lambda (sem_Exprs _args ) (sem_Expr _body ) )-sem_Expr !(Let _decls _body ) =- (sem_Expr_Let (sem_Decls _decls ) (sem_Expr _body ) )-sem_Expr !(LineExpr _expr ) =- (sem_Expr_LineExpr (sem_Expr _expr ) )-sem_Expr !(PragmaExpr _onLeftSide _onNewLine _txt _expr ) =- (sem_Expr_PragmaExpr _onLeftSide _onNewLine _txt (sem_Expr _expr ) )-sem_Expr !(ResultExpr _nt _expr ) =- (sem_Expr_ResultExpr _nt (sem_Expr _expr ) )-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 ) )-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 !(TupleExpr _exprs ) =- (sem_Expr_TupleExpr (sem_Exprs _exprs ) )-sem_Expr !(TypedExpr _expr _tp ) =- (sem_Expr_TypedExpr (sem_Expr _expr ) (sem_Type _tp ) )-sem_Expr !(UnboxedTupleExpr _exprs ) =- (sem_Expr_UnboxedTupleExpr (sem_Exprs _exprs ) )--- semantic domain-newtype T_Expr = T_Expr (Options ->- ( PP_Doc))-data Inh_Expr = Inh_Expr {options_Inh_Expr :: !(Options)}-data Syn_Expr = Syn_Expr {pp_Syn_Expr :: !(PP_Doc)}-wrap_Expr :: T_Expr ->- Inh_Expr ->- Syn_Expr -wrap_Expr !(T_Expr sem ) !(Inh_Expr _lhsIoptions ) =- (let ( !_lhsOpp) =- (sem _lhsIoptions )- in (Syn_Expr _lhsOpp ))-sem_Expr_App :: String ->- T_Exprs ->- T_Expr -sem_Expr_App !name_ !(T_Exprs args_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 958 "PrintOcamlCode.hs" #-})) of- { !_argsOoptions ->- (case ((args_ _argsOoptions )) of- { ( !_argsIpps) ->- (case (({-# LINE 143 "PrintOcamlCode.ag" #-}- pp_parens $ name_ >#< hv_sp _argsIpps- {-# LINE 964 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_Case :: T_Expr ->- T_CaseAlts ->- T_Expr -sem_Expr_Case !(T_Expr expr_ ) !(T_CaseAlts alts_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 974 "PrintOcamlCode.hs" #-})) of- { !_altsOoptions ->- (case ((alts_ _altsOoptions )) of- { ( !_altsIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 980 "PrintOcamlCode.hs" #-})) of- { !_exprOoptions ->- (case ((expr_ _exprOoptions )) of- { ( !_exprIpp) ->- (case (({-# LINE 131 "PrintOcamlCode.ag" #-}- pp_parens ( "match" >#< _exprIpp >#< "with"- >-< indent 2 ( case _altsIpps of- [] -> empty- (x:xs) -> " " >#< x- >-< vlist (map ("|" >#<) xs)- )- )- {-# LINE 992 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_Do :: T_Decls ->- T_Expr ->- T_Expr -sem_Expr_Do !(T_Decls stmts_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 138 "PrintOcamlCode.ag" #-}- error "pp of Expr.Do not supported"- {-# LINE 1002 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_InvokeExpr :: String ->- T_Expr ->- T_Exprs ->- T_Expr -sem_Expr_InvokeExpr !nt_ !(T_Expr expr_ ) !(T_Exprs args_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1013 "PrintOcamlCode.hs" #-})) of- { !_exprOoptions ->- (case ((expr_ _exprOoptions )) of- { ( !_exprIpp) ->- (case (({-# LINE 53 "PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1019 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_Lambda :: T_Exprs ->- T_Expr ->- T_Expr -sem_Expr_Lambda !(T_Exprs args_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1029 "PrintOcamlCode.hs" #-})) of- { !_bodyOoptions ->- (case ((body_ _bodyOoptions )) of- { ( !_bodyIpp) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1035 "PrintOcamlCode.hs" #-})) of- { !_argsOoptions ->- (case ((args_ _argsOoptions )) of- { ( !_argsIpps) ->- (case (({-# LINE 139 "PrintOcamlCode.ag" #-}- pp_parens ( pp "fun" >#< hv_sp _argsIpps >#< "->"- >-< indent 2 _bodyIpp )- {-# LINE 1042 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) })) )-sem_Expr_Let :: T_Decls ->- T_Expr ->- T_Expr -sem_Expr_Let !(T_Decls decls_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 216 "PrintOcamlCode.ag" #-}- False- {-# LINE 1052 "PrintOcamlCode.hs" #-})) of- { !_declsOisToplevel ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1056 "PrintOcamlCode.hs" #-})) of- { !_bodyOoptions ->- (case ((body_ _bodyOoptions )) of- { ( !_bodyIpp) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1062 "PrintOcamlCode.hs" #-})) of- { !_declsOoptions ->- (case ((decls_ _declsOisToplevel _declsOoptions )) of- { ( !_declsIpps) ->- (case (({-# LINE 130 "PrintOcamlCode.ag" #-}- pp_parens $ vlist (_declsIpps ++ [_bodyIpp])- {-# LINE 1068 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) }) }) })) )-sem_Expr_LineExpr :: T_Expr ->- T_Expr -sem_Expr_LineExpr !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1077 "PrintOcamlCode.hs" #-})) of- { !_exprOoptions ->- (case ((expr_ _exprOoptions )) of- { ( !_exprIpp) ->- (case (({-# LINE 148 "PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1083 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_PragmaExpr :: Bool ->- Bool ->- String ->- T_Expr ->- T_Expr -sem_Expr_PragmaExpr !onLeftSide_ !onNewLine_ !txt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1095 "PrintOcamlCode.hs" #-})) of- { !_exprOoptions ->- (case ((expr_ _exprOoptions )) of- { ( !_exprIpp) ->- (case (({-# LINE 147 "PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1101 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_ResultExpr :: String ->- T_Expr ->- T_Expr -sem_Expr_ResultExpr !nt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1111 "PrintOcamlCode.hs" #-})) of- { !_exprOoptions ->- (case ((expr_ _exprOoptions )) of- { ( !_exprIpp) ->- (case (({-# LINE 53 "PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1117 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_ResumeExpr :: String ->- T_Expr ->- T_Lhs ->- T_Expr ->- T_Expr -sem_Expr_ResumeExpr !nt_ !(T_Expr expr_ ) !(T_Lhs left_ ) !(T_Expr rhs_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1129 "PrintOcamlCode.hs" #-})) of- { !_rhsOoptions ->- (case ((rhs_ _rhsOoptions )) of- { ( !_rhsIpp) ->- (case (({-# LINE 53 "PrintOcamlCode.ag" #-}- _rhsIpp- {-# LINE 1135 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_SemFun :: String ->- T_Exprs ->- T_Expr ->- T_Expr -sem_Expr_SemFun !nt_ !(T_Exprs args_ ) !(T_Expr body_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1146 "PrintOcamlCode.hs" #-})) of- { !_bodyOoptions ->- (case ((body_ _bodyOoptions )) of- { ( !_bodyIpp) ->- (case (({-# LINE 53 "PrintOcamlCode.ag" #-}- _bodyIpp- {-# LINE 1152 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_SimpleExpr :: String ->- T_Expr -sem_Expr_SimpleExpr !txt_ =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 144 "PrintOcamlCode.ag" #-}- text txt_- {-# LINE 1161 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_TextExpr :: ([String]) ->- T_Expr -sem_Expr_TextExpr !lns_ =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 145 "PrintOcamlCode.ag" #-}- vlist (map text lns_)- {-# LINE 1170 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Expr_Trace :: String ->- T_Expr ->- T_Expr -sem_Expr_Trace !txt_ !(T_Expr expr_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1180 "PrintOcamlCode.hs" #-})) of- { !_exprOoptions ->- (case ((expr_ _exprOoptions )) of- { ( !_exprIpp) ->- (case (({-# LINE 146 "PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1186 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_TupleExpr :: T_Exprs ->- T_Expr -sem_Expr_TupleExpr !(T_Exprs exprs_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1195 "PrintOcamlCode.hs" #-})) of- { !_exprsOoptions ->- (case ((exprs_ _exprsOoptions )) of- { ( !_exprsIpps) ->- (case (({-# LINE 141 "PrintOcamlCode.ag" #-}- ppTuple False _exprsIpps- {-# LINE 1201 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_TypedExpr :: T_Expr ->- T_Type ->- T_Expr -sem_Expr_TypedExpr !(T_Expr expr_ ) !(T_Type tp_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1211 "PrintOcamlCode.hs" #-})) of- { !_exprOoptions ->- (case ((expr_ _exprOoptions )) of- { ( !_exprIpp) ->- (case (({-# LINE 149 "PrintOcamlCode.ag" #-}- _exprIpp- {-# LINE 1217 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Expr_UnboxedTupleExpr :: T_Exprs ->- T_Expr -sem_Expr_UnboxedTupleExpr !(T_Exprs exprs_ ) =- (T_Expr (\ (!_lhsIoptions) ->- (case (({-# LINE 142 "PrintOcamlCode.ag" #-}- error "pp of Expr.UnboxedTupleExpr not supported"- {-# LINE 1226 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )--- Exprs --------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Expr - child tl : Exprs - alternative Nil:--}--- cata-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 (Options ->- ( PP_Docs))-data Inh_Exprs = Inh_Exprs {options_Inh_Exprs :: !(Options)}-data Syn_Exprs = Syn_Exprs {pps_Syn_Exprs :: !(PP_Docs)}-wrap_Exprs :: T_Exprs ->- Inh_Exprs ->- Syn_Exprs -wrap_Exprs !(T_Exprs sem ) !(Inh_Exprs _lhsIoptions ) =- (let ( !_lhsOpps) =- (sem _lhsIoptions )- in (Syn_Exprs _lhsOpps ))-sem_Exprs_Cons :: T_Expr ->- T_Exprs ->- T_Exprs -sem_Exprs_Cons !(T_Expr hd_ ) !(T_Exprs tl_ ) =- (T_Exprs (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1266 "PrintOcamlCode.hs" #-})) of- { !_tlOoptions ->- (case ((tl_ _tlOoptions )) of- { ( !_tlIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1272 "PrintOcamlCode.hs" #-})) of- { !_hdOoptions ->- (case ((hd_ _hdOoptions )) of- { ( !_hdIpp) ->- (case (({-# LINE 60 "PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 1278 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) }) })) )-sem_Exprs_Nil :: T_Exprs -sem_Exprs_Nil =- (T_Exprs (\ (!_lhsIoptions) ->- (case (({-# LINE 61 "PrintOcamlCode.ag" #-}- []- {-# LINE 1286 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) })) )--- Lhs ----------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Fun:- child name : {String}- child args : Exprs - alternative Pattern3:- child pat3 : Pattern - alternative Pattern3SM:- child pat3 : Pattern - alternative TupleLhs:- child comps : {[String]}- alternative UnboxedTupleLhs:- child comps : {[String]}- alternative Unwrap:- child name : {String}- child sub : Lhs --}--- cata-sem_Lhs :: Lhs ->- T_Lhs -sem_Lhs !(Fun _name _args ) =- (sem_Lhs_Fun _name (sem_Exprs _args ) )-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 !(Unwrap _name _sub ) =- (sem_Lhs_Unwrap _name (sem_Lhs _sub ) )--- semantic domain-newtype T_Lhs = T_Lhs (Options ->- ( PP_Doc))-data Inh_Lhs = Inh_Lhs {options_Inh_Lhs :: !(Options)}-data Syn_Lhs = Syn_Lhs {pp_Syn_Lhs :: !(PP_Doc)}-wrap_Lhs :: T_Lhs ->- Inh_Lhs ->- Syn_Lhs -wrap_Lhs !(T_Lhs sem ) !(Inh_Lhs _lhsIoptions ) =- (let ( !_lhsOpp) =- (sem _lhsIoptions )- in (Syn_Lhs _lhsOpp ))-sem_Lhs_Fun :: String ->- T_Exprs ->- T_Lhs -sem_Lhs_Fun !name_ !(T_Exprs args_ ) =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1346 "PrintOcamlCode.hs" #-})) of- { !_argsOoptions ->- (case ((args_ _argsOoptions )) of- { ( !_argsIpps) ->- (case (({-# LINE 156 "PrintOcamlCode.ag" #-}- name_ >#< hv_sp _argsIpps- {-# LINE 1352 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Lhs_Pattern3 :: T_Pattern ->- T_Lhs -sem_Lhs_Pattern3 !(T_Pattern pat3_ ) =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1361 "PrintOcamlCode.hs" #-})) of- { !_pat3Ooptions ->- (case ((pat3_ _pat3Ooptions )) of- { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp) ->- (case (({-# LINE 152 "PrintOcamlCode.ag" #-}- _pat3Ipp- {-# LINE 1367 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )-sem_Lhs_Pattern3SM :: T_Pattern ->- T_Lhs -sem_Lhs_Pattern3SM !(T_Pattern pat3_ ) =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 153 "PrintOcamlCode.ag" #-}- error "pp of Lhs.Pattern3SM not supported"- {-# LINE 1376 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Lhs_TupleLhs :: ([String]) ->- T_Lhs -sem_Lhs_TupleLhs !comps_ =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 154 "PrintOcamlCode.ag" #-}- ppTuple False (map text comps_)- {-# LINE 1385 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Lhs_UnboxedTupleLhs :: ([String]) ->- T_Lhs -sem_Lhs_UnboxedTupleLhs !comps_ =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 155 "PrintOcamlCode.ag" #-}- error "pp of Lhs.UnboxedTupleLhs not supported"- {-# LINE 1394 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) })) )-sem_Lhs_Unwrap :: String ->- T_Lhs ->- T_Lhs -sem_Lhs_Unwrap !name_ !(T_Lhs sub_ ) =- (T_Lhs (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1404 "PrintOcamlCode.hs" #-})) of- { !_subOoptions ->- (case ((sub_ _subOoptions )) of- { ( !_subIpp) ->- (case (({-# LINE 157 "PrintOcamlCode.ag" #-}- pp_parens (name_ >#< _subIpp)- {-# LINE 1410 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) })) )--- NamedType ----------------------------------------------------{-- visit 0:- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Named:- child strict : {Bool}- child name : {String}- child tp : Type --}--- cata-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 (( PP_Doc))-data Inh_NamedType = Inh_NamedType {}-data Syn_NamedType = Syn_NamedType {pp_Syn_NamedType :: !(PP_Doc)}-wrap_NamedType :: T_NamedType ->- Inh_NamedType ->- Syn_NamedType -wrap_NamedType !(T_NamedType sem ) !(Inh_NamedType ) =- (let ( !_lhsOpp) =- (sem )- in (Syn_NamedType _lhsOpp ))-sem_NamedType_Named :: Bool ->- String ->- T_Type ->- T_NamedType -sem_NamedType_Named !strict_ !name_ !(T_Type tp_ ) =- (T_NamedType (case ((tp_ )) of- { ( !_tpIpp) ->- (case (({-# LINE 187 "PrintOcamlCode.ag" #-}- name_ >#< ":" >#< _tpIpp- {-# LINE 1449 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )--- NamedTypes ---------------------------------------------------{-- visit 0:- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : NamedType - child tl : NamedTypes - alternative Nil:--}--- cata-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 (( PP_Docs))-data Inh_NamedTypes = Inh_NamedTypes {}-data Syn_NamedTypes = Syn_NamedTypes {pps_Syn_NamedTypes :: !(PP_Docs)}-wrap_NamedTypes :: T_NamedTypes ->- Inh_NamedTypes ->- Syn_NamedTypes -wrap_NamedTypes !(T_NamedTypes sem ) !(Inh_NamedTypes ) =- (let ( !_lhsOpps) =- (sem )- in (Syn_NamedTypes _lhsOpps ))-sem_NamedTypes_Cons :: T_NamedType ->- T_NamedTypes ->- T_NamedTypes -sem_NamedTypes_Cons !(T_NamedType hd_ ) !(T_NamedTypes tl_ ) =- (T_NamedTypes (case ((tl_ )) of- { ( !_tlIpps) ->- (case ((hd_ )) of- { ( !_hdIpp) ->- (case (({-# LINE 76 "PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 1489 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) )-sem_NamedTypes_Nil :: T_NamedTypes -sem_NamedTypes_Nil =- (T_NamedTypes (case (({-# LINE 77 "PrintOcamlCode.ag" #-}- []- {-# LINE 1496 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) )--- Pattern ------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- copy : SELF - isUnderscore : Bool- pp : PP_Doc- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - child parts : Patterns - visit 0:- local copy : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local copy : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local copy : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern !(Alias _field _attr _pat _parts ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )-sem_Pattern !(Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern !(Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern !(Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern !(Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (Options ->- ( Pattern ,Bool,PP_Doc))-data Inh_Pattern = Inh_Pattern {options_Inh_Pattern :: !(Options)}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern ),isUnderscore_Syn_Pattern :: !(Bool),pp_Syn_Pattern :: !(PP_Doc)}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIoptions ) =- (let ( !_lhsOcopy,!_lhsOisUnderscore,!_lhsOpp) =- (sem _lhsIoptions )- in (Syn_Pattern _lhsOcopy _lhsOisUnderscore _lhsOpp ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Patterns ->- T_Pattern -sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) !(T_Patterns parts_ ) =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1569 "PrintOcamlCode.hs" #-})) of- { !_partsOoptions ->- (case ((parts_ _partsOoptions )) of- { ( !_partsIcopy,!_partsIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1575 "PrintOcamlCode.hs" #-})) of- { !_patOoptions ->- (case ((pat_ _patOoptions )) of- { ( !_patIcopy,!_patIisUnderscore,!_patIpp) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 1581 "PrintOcamlCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1585 "PrintOcamlCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 202 "PrintOcamlCode.ag" #-}- False- {-# LINE 1589 "PrintOcamlCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 193 "PrintOcamlCode.ag" #-}- if _patIisUnderscore- then pp (attrname False field_ attr_)- else error "pp of Pattern.Alias is only supported in the form (x@_)"- {-# LINE 1595 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) }) }) })) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1605 "PrintOcamlCode.hs" #-})) of- { !_patsOoptions ->- (case ((pats_ _patsOoptions )) of- { ( !_patsIcopy,!_patsIpps) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 1611 "PrintOcamlCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1615 "PrintOcamlCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 200 "PrintOcamlCode.ag" #-}- False- {-# LINE 1619 "PrintOcamlCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 190 "PrintOcamlCode.ag" #-}- pp_parens $ name_ >#< hv_sp _patsIpps- {-# LINE 1623 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable !(T_Pattern pat_ ) =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1632 "PrintOcamlCode.hs" #-})) of- { !_patOoptions ->- (case ((pat_ _patOoptions )) of- { ( !_patIcopy,!_patIisUnderscore,!_patIpp) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 1638 "PrintOcamlCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1642 "PrintOcamlCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 199 "PrintOcamlCode.ag" #-}- _patIisUnderscore- {-# LINE 1646 "PrintOcamlCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 196 "PrintOcamlCode.ag" #-}- error "pp of Pattern.Irrefutable not supported"- {-# LINE 1650 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1660 "PrintOcamlCode.hs" #-})) of- { !_patsOoptions ->- (case ((pats_ _patsOoptions )) of- { ( !_patsIcopy,!_patsIpps) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 1666 "PrintOcamlCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1670 "PrintOcamlCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 201 "PrintOcamlCode.ag" #-}- False- {-# LINE 1674 "PrintOcamlCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 191 "PrintOcamlCode.ag" #-}- pp_block "(" ")" "," _patsIpps- {-# LINE 1678 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore !pos_ =- (T_Pattern (\ (!_lhsIoptions) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Underscore pos_- {-# LINE 1687 "PrintOcamlCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1691 "PrintOcamlCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 203 "PrintOcamlCode.ag" #-}- True- {-# LINE 1695 "PrintOcamlCode.hs" #-})) of- { !_lhsOisUnderscore ->- (case (({-# LINE 197 "PrintOcamlCode.ag" #-}- text "_"- {-# LINE 1699 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) })) )--- Patterns -----------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- copy : SELF - pps : PP_Docs- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-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 (Options ->- ( Patterns ,PP_Docs))-data Inh_Patterns = Inh_Patterns {options_Inh_Patterns :: !(Options)}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns ),pps_Syn_Patterns :: !(PP_Docs)}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIoptions ) =- (let ( !_lhsOcopy,!_lhsOpps) =- (sem _lhsIoptions )- in (Syn_Patterns _lhsOcopy _lhsOpps ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =- (T_Patterns (\ (!_lhsIoptions) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1744 "PrintOcamlCode.hs" #-})) of- { !_tlOoptions ->- (case ((tl_ _tlOoptions )) of- { ( !_tlIcopy,!_tlIpps) ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1750 "PrintOcamlCode.hs" #-})) of- { !_hdOoptions ->- (case ((hd_ _hdOoptions )) of- { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 1756 "PrintOcamlCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1760 "PrintOcamlCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 88 "PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 1764 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOcopy,_lhsOpps) }) }) }) }) }) }) })) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (\ (!_lhsIoptions) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- []- {-# LINE 1772 "PrintOcamlCode.hs" #-})) of- { !_copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 1776 "PrintOcamlCode.hs" #-})) of- { !_lhsOcopy ->- (case (({-# LINE 89 "PrintOcamlCode.ag" #-}- []- {-# LINE 1780 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOcopy,_lhsOpps) }) }) })) )--- Program ------------------------------------------------------{-- visit 0:- inherited attributes:- options : Options- textBlockMap : Map BlockInfo PP_Doc- synthesized attribute:- output : PP_Docs- alternatives:- alternative Program:- child chunks : Chunks - child ordered : {Bool}--}--- cata-sem_Program :: Program ->- T_Program -sem_Program !(Program _chunks _ordered ) =- (sem_Program_Program (sem_Chunks _chunks ) _ordered )--- semantic domain-newtype T_Program = T_Program (Options ->- (Map BlockInfo PP_Doc) ->- ( PP_Docs))-data Inh_Program = Inh_Program {options_Inh_Program :: !(Options),textBlockMap_Inh_Program :: !((Map BlockInfo PP_Doc))}-data Syn_Program = Syn_Program {output_Syn_Program :: !(PP_Docs)}-wrap_Program :: T_Program ->- Inh_Program ->- Syn_Program -wrap_Program !(T_Program sem ) !(Inh_Program _lhsIoptions _lhsItextBlockMap ) =- (let ( !_lhsOoutput) =- (sem _lhsIoptions _lhsItextBlockMap )- in (Syn_Program _lhsOoutput ))-sem_Program_Program :: T_Chunks ->- Bool ->- T_Program -sem_Program_Program !(T_Chunks chunks_ ) !ordered_ =- (T_Program (\ (!_lhsIoptions)- (!_lhsItextBlockMap) ->- (case (({-# LINE 45 "PrintOcamlCode.ag" #-}- _lhsItextBlockMap- {-# LINE 1822 "PrintOcamlCode.hs" #-})) of- { !_chunksOtextBlockMap ->- (case (({-# LINE 212 "PrintOcamlCode.ag" #-}- True- {-# LINE 1826 "PrintOcamlCode.hs" #-})) of- { !_chunksOisToplevel ->- (case (({-# LINE 43 "PrintOcamlCode.ag" #-}- _lhsIoptions- {-# LINE 1830 "PrintOcamlCode.hs" #-})) of- { !_chunksOoptions ->- (case ((chunks_ _chunksOisToplevel _chunksOoptions _chunksOtextBlockMap )) of- { ( !_chunksIpps) ->- (case (({-# LINE 57 "PrintOcamlCode.ag" #-}- _chunksIpps- {-# LINE 1836 "PrintOcamlCode.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) }) }) })) )--- Type ---------------------------------------------------------{-- visit 0:- synthesized attribute:- pp : PP_Doc- alternatives:- alternative Arr:- child left : Type - child right : Type - alternative CtxApp:- child left : {[(String, [String])]}- child right : Type - alternative List:- child tp : Type - alternative NontermType:- child name : {String}- child params : {[String]}- alternative SimpleType:- child txt : {String}- alternative TEither:- child left : Type - child right : Type - alternative TIntMap:- child value : Type - alternative TMap:- child key : Type - child value : Type - alternative TMaybe:- child tp : Type - alternative TupleType:- child tps : Types - alternative TypeApp:- child func : Type - child args : Types - alternative UnboxedTupleType:- child tps : Types --}--- cata-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 !(List _tp ) =- (sem_Type_List (sem_Type _tp ) )-sem_Type !(NontermType _name _params ) =- (sem_Type_NontermType _name _params )-sem_Type !(SimpleType _txt ) =- (sem_Type_SimpleType _txt )-sem_Type !(TEither _left _right ) =- (sem_Type_TEither (sem_Type _left ) (sem_Type _right ) )-sem_Type !(TIntMap _value ) =- (sem_Type_TIntMap (sem_Type _value ) )-sem_Type !(TMap _key _value ) =- (sem_Type_TMap (sem_Type _key ) (sem_Type _value ) )-sem_Type !(TMaybe _tp ) =- (sem_Type_TMaybe (sem_Type _tp ) )-sem_Type !(TupleType _tps ) =- (sem_Type_TupleType (sem_Types _tps ) )-sem_Type !(TypeApp _func _args ) =- (sem_Type_TypeApp (sem_Type _func ) (sem_Types _args ) )-sem_Type !(UnboxedTupleType _tps ) =- (sem_Type_UnboxedTupleType (sem_Types _tps ) )--- semantic domain-newtype T_Type = T_Type (( PP_Doc))-data Inh_Type = Inh_Type {}-data Syn_Type = Syn_Type {pp_Syn_Type :: !(PP_Doc)}-wrap_Type :: T_Type ->- Inh_Type ->- Syn_Type -wrap_Type !(T_Type sem ) !(Inh_Type ) =- (let ( !_lhsOpp) =- (sem )- in (Syn_Type _lhsOpp ))-sem_Type_Arr :: T_Type ->- T_Type ->- T_Type -sem_Type_Arr !(T_Type left_ ) !(T_Type right_ ) =- (T_Type (case ((right_ )) of- { ( !_rightIpp) ->- (case ((left_ )) of- { ( !_leftIpp) ->- (case (({-# LINE 160 "PrintOcamlCode.ag" #-}- pp_parens (_leftIpp >#< "->" >#< _rightIpp)- {-# LINE 1924 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) )-sem_Type_CtxApp :: ([(String, [String])]) ->- T_Type ->- T_Type -sem_Type_CtxApp !left_ !(T_Type right_ ) =- (T_Type (case (({-# LINE 161 "PrintOcamlCode.ag" #-}- error "pp of Type.CtxApp not supported"- {-# LINE 1933 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_List :: T_Type ->- T_Type -sem_Type_List !(T_Type tp_ ) =- (T_Type (case ((tp_ )) of- { ( !_tpIpp) ->- (case (({-# LINE 166 "PrintOcamlCode.ag" #-}- _tpIpp >#< "list"- {-# LINE 1943 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )-sem_Type_NontermType :: String ->- ([String]) ->- T_Type -sem_Type_NontermType !name_ !params_ =- (T_Type (case (({-# LINE 168 "PrintOcamlCode.ag" #-}- pp_block "(" ")" " " (map text params_ ++ [text $ toOcamlTC name_])- {-# LINE 1952 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_SimpleType :: String ->- T_Type -sem_Type_SimpleType !txt_ =- (T_Type (case (({-# LINE 167 "PrintOcamlCode.ag" #-}- text txt_- {-# LINE 1960 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_TEither :: T_Type ->- T_Type ->- T_Type -sem_Type_TEither !(T_Type left_ ) !(T_Type right_ ) =- (T_Type (case (({-# LINE 170 "PrintOcamlCode.ag" #-}- error "pp of Type.TEither is not supported"- {-# LINE 1969 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_TIntMap :: T_Type ->- T_Type -sem_Type_TIntMap !(T_Type value_ ) =- (T_Type (case (({-# LINE 172 "PrintOcamlCode.ag" #-}- error "pp of Type.TIntMap is not supported"- {-# LINE 1977 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_TMap :: T_Type ->- T_Type ->- T_Type -sem_Type_TMap !(T_Type key_ ) !(T_Type value_ ) =- (T_Type (case (({-# LINE 171 "PrintOcamlCode.ag" #-}- error "pp of Type.TMap is not supported"- {-# LINE 1986 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) )-sem_Type_TMaybe :: T_Type ->- T_Type -sem_Type_TMaybe !(T_Type tp_ ) =- (T_Type (case ((tp_ )) of- { ( !_tpIpp) ->- (case (({-# LINE 169 "PrintOcamlCode.ag" #-}- _tpIpp >#< "opt"- {-# LINE 1996 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )-sem_Type_TupleType :: T_Types ->- T_Type -sem_Type_TupleType !(T_Types tps_ ) =- (T_Type (case ((tps_ )) of- { ( !_tpsIpps) ->- (case (({-# LINE 163 "PrintOcamlCode.ag" #-}- pp_block "(" ")" "," _tpsIpps- {-# LINE 2006 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) )-sem_Type_TypeApp :: T_Type ->- T_Types ->- T_Type -sem_Type_TypeApp !(T_Type func_ ) !(T_Types args_ ) =- (T_Type (case ((args_ )) of- { ( !_argsIpps) ->- (case ((func_ )) of- { ( !_funcIpp) ->- (case (({-# LINE 162 "PrintOcamlCode.ag" #-}- pp_parens (hv_sp (_argsIpps ++ [_funcIpp]))- {-# LINE 2019 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) }) }) )-sem_Type_UnboxedTupleType :: T_Types ->- T_Type -sem_Type_UnboxedTupleType !(T_Types tps_ ) =- (T_Type (case (({-# LINE 165 "PrintOcamlCode.ag" #-}- error "pp of Type.UnboxedTupleType is not supported"- {-# LINE 2027 "PrintOcamlCode.hs" #-})) of- { !_lhsOpp ->- ( _lhsOpp) }) )--- Types --------------------------------------------------------{-- visit 0:- synthesized attribute:- pps : PP_Docs- alternatives:- alternative Cons:- child hd : Type - child tl : Types - alternative Nil:--}--- cata-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 (( PP_Docs))-data Inh_Types = Inh_Types {}-data Syn_Types = Syn_Types {pps_Syn_Types :: !(PP_Docs)}-wrap_Types :: T_Types ->- Inh_Types ->- Syn_Types -wrap_Types !(T_Types sem ) !(Inh_Types ) =- (let ( !_lhsOpps) =- (sem )- in (Syn_Types _lhsOpps ))-sem_Types_Cons :: T_Type ->- T_Types ->- T_Types -sem_Types_Cons !(T_Type hd_ ) !(T_Types tl_ ) =- (T_Types (case ((tl_ )) of- { ( !_tlIpps) ->- (case ((hd_ )) of- { ( !_hdIpp) ->- (case (({-# LINE 72 "PrintOcamlCode.ag" #-}- _hdIpp : _tlIpps- {-# LINE 2067 "PrintOcamlCode.hs" #-})) of- { !_lhsOpps ->- ( _lhsOpps) }) }) }) )-sem_Types_Nil :: T_Types -sem_Types_Nil =- (T_Types (case (({-# LINE 73 "PrintOcamlCode.ag" #-}- []- {-# LINE 2074 "PrintOcamlCode.hs" #-})) of+-- UUAGC 0.9.30 (PrintOcamlCode.ag)+module PrintOcamlCode where+{-# LINE 10 "PrintOcamlCode.ag" #-}++import Pretty+import Code+import Patterns+import Options+import CommonTypes hiding (List,Type,Map,Maybe,IntMap,Either)+import Data.List(intersperse,intercalate)+import Data.Char(toLower)+{-# LINE 15 "../src-derived/PrintOcamlCode.hs" #-}++{-# LINE 2 "./Code.ag" #-}++import Pretty+import Patterns+import Data.List(partition)+import Data.Set(Set)+import qualified Data.Set as Set+import Data.Map(Map)+import qualified Data.Map as Map+{-# LINE 26 "../src-derived/PrintOcamlCode.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 33 "../src-derived/PrintOcamlCode.hs" #-}+{-# LINE 21 "PrintOcamlCode.ag" #-}++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++ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps+ppTuple False pps = "(" >|< pp_block " " ")" "," pps+{-# LINE 50 "../src-derived/PrintOcamlCode.hs" #-}++{-# LINE 174 "PrintOcamlCode.ag" #-}++toOcamlTC (c:cs) = toLower c : cs+toOcamlTC xs = xs+{-# LINE 56 "../src-derived/PrintOcamlCode.hs" #-}++{-# LINE 143 "./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 75 "../src-derived/PrintOcamlCode.hs" #-}+-- CaseAlt -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative CaseAlt:+ child left : Lhs + child expr : Expr +-}+-- cata+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 (Options ->+ ( PP_Doc))+data Inh_CaseAlt = Inh_CaseAlt {options_Inh_CaseAlt :: !(Options)}+data Syn_CaseAlt = Syn_CaseAlt {pp_Syn_CaseAlt :: !(PP_Doc)}+wrap_CaseAlt :: T_CaseAlt ->+ Inh_CaseAlt ->+ Syn_CaseAlt +wrap_CaseAlt !(T_CaseAlt sem ) !(Inh_CaseAlt _lhsIoptions ) =+ (let ( !_lhsOpp) = sem _lhsIoptions + in (Syn_CaseAlt _lhsOpp ))+sem_CaseAlt_CaseAlt :: T_Lhs ->+ T_Expr ->+ T_CaseAlt +sem_CaseAlt_CaseAlt !(T_Lhs left_ ) !(T_Expr expr_ ) =+ (T_CaseAlt (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 111 "PrintOcamlCode.hs" #-})) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 117 "PrintOcamlCode.hs" #-})) of+ { !_leftOoptions ->+ (case (left_ _leftOoptions ) of+ { ( !_leftIpp) ->+ (case (({-# LINE 180 "PrintOcamlCode.ag" #-}+ _leftIpp >#< "->" >#< _exprIpp+ {-# LINE 123 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+-- CaseAlts ----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : CaseAlt + child tl : CaseAlts + alternative Nil:+-}+-- cata+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 (Options ->+ ( PP_Docs))+data Inh_CaseAlts = Inh_CaseAlts {options_Inh_CaseAlts :: !(Options)}+data Syn_CaseAlts = Syn_CaseAlts {pps_Syn_CaseAlts :: !(PP_Docs)}+wrap_CaseAlts :: T_CaseAlts ->+ Inh_CaseAlts ->+ Syn_CaseAlts +wrap_CaseAlts !(T_CaseAlts sem ) !(Inh_CaseAlts _lhsIoptions ) =+ (let ( !_lhsOpps) = sem _lhsIoptions + in (Syn_CaseAlts _lhsOpps ))+sem_CaseAlts_Cons :: T_CaseAlt ->+ T_CaseAlts ->+ T_CaseAlts +sem_CaseAlts_Cons !(T_CaseAlt hd_ ) !(T_CaseAlts tl_ ) =+ (T_CaseAlts (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 162 "PrintOcamlCode.hs" #-})) of+ { !_tlOoptions ->+ (case (tl_ _tlOoptions ) of+ { ( !_tlIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 168 "PrintOcamlCode.hs" #-})) of+ { !_hdOoptions ->+ (case (hd_ _hdOoptions ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 64 "PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 174 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) })) )+sem_CaseAlts_Nil :: T_CaseAlts +sem_CaseAlts_Nil =+ (T_CaseAlts (\ (!_lhsIoptions) ->+ (case (({-# LINE 65 "PrintOcamlCode.ag" #-}+ []+ {-# LINE 182 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) })) )+-- Chunk -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isToplevel : Bool+ options : Options+ textBlockMap : Map BlockInfo PP_Doc+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Chunk:+ child name : {String}+ child comment : Decl + child info : Decls + child dataDef : Decls + child cataFun : Decls + child semDom : Decls + child semWrapper : Decls + child semFunctions : Decls + child semNames : {[String]}+-}+-- cata+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 (Bool ->+ Options ->+ (Map BlockInfo PP_Doc) ->+ ( PP_Docs))+data Inh_Chunk = Inh_Chunk {isToplevel_Inh_Chunk :: !(Bool),options_Inh_Chunk :: !(Options),textBlockMap_Inh_Chunk :: !((Map BlockInfo PP_Doc))}+data Syn_Chunk = Syn_Chunk {pps_Syn_Chunk :: !(PP_Docs)}+wrap_Chunk :: T_Chunk ->+ Inh_Chunk ->+ Syn_Chunk +wrap_Chunk !(T_Chunk sem ) !(Inh_Chunk _lhsIisToplevel _lhsIoptions _lhsItextBlockMap ) =+ (let ( !_lhsOpps) = sem _lhsIisToplevel _lhsIoptions _lhsItextBlockMap + in (Syn_Chunk _lhsOpps ))+sem_Chunk_Chunk :: String ->+ T_Decl ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ T_Decls ->+ ([String]) ->+ T_Chunk +sem_Chunk_Chunk !name_ !(T_Decl comment_ ) !(T_Decls info_ ) !(T_Decls dataDef_ ) !(T_Decls cataFun_ ) !(T_Decls semDom_ ) !(T_Decls semWrapper_ ) !(T_Decls semFunctions_ ) !semNames_ =+ (T_Chunk (\ (!_lhsIisToplevel)+ (!_lhsIoptions)+ (!_lhsItextBlockMap) ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 240 "PrintOcamlCode.hs" #-})) of+ { !_semFunctionsOisToplevel ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 244 "PrintOcamlCode.hs" #-})) of+ { !_semWrapperOisToplevel ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 248 "PrintOcamlCode.hs" #-})) of+ { !_semDomOisToplevel ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 252 "PrintOcamlCode.hs" #-})) of+ { !_cataFunOisToplevel ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 256 "PrintOcamlCode.hs" #-})) of+ { !_dataDefOisToplevel ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 260 "PrintOcamlCode.hs" #-})) of+ { !_infoOisToplevel ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 264 "PrintOcamlCode.hs" #-})) of+ { !_commentOisToplevel ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 268 "PrintOcamlCode.hs" #-})) of+ { !_semFunctionsOoptions ->+ (case (semFunctions_ _semFunctionsOisToplevel _semFunctionsOoptions ) of+ { ( !_semFunctionsIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 274 "PrintOcamlCode.hs" #-})) of+ { !_semWrapperOoptions ->+ (case (semWrapper_ _semWrapperOisToplevel _semWrapperOoptions ) of+ { ( !_semWrapperIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 280 "PrintOcamlCode.hs" #-})) of+ { !_semDomOoptions ->+ (case (semDom_ _semDomOisToplevel _semDomOoptions ) of+ { ( !_semDomIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 286 "PrintOcamlCode.hs" #-})) of+ { !_cataFunOoptions ->+ (case (cataFun_ _cataFunOisToplevel _cataFunOoptions ) of+ { ( !_cataFunIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 292 "PrintOcamlCode.hs" #-})) of+ { !_dataDefOoptions ->+ (case (dataDef_ _dataDefOisToplevel _dataDefOoptions ) of+ { ( !_dataDefIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 298 "PrintOcamlCode.hs" #-})) of+ { !_infoOoptions ->+ (case (info_ _infoOisToplevel _infoOoptions ) of+ { ( !_infoIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 304 "PrintOcamlCode.hs" #-})) of+ { !_commentOoptions ->+ (case (comment_ _commentOisToplevel _commentOoptions ) of+ { ( !_commentIpp) ->+ (case (({-# LINE 96 "PrintOcamlCode.ag" #-}+ _commentIpp+ : _infoIpps+ ++ _dataDefIpps+ ++ _semDomIpps+ ++ _semFunctionsIpps+ ++ _semWrapperIpps+ ++ _cataFunIpps+ ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]+ {-# LINE 317 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Chunks ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isToplevel : Bool+ options : Options+ textBlockMap : Map BlockInfo PP_Doc+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Chunk + child tl : Chunks + alternative Nil:+-}+-- cata+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 (Bool ->+ Options ->+ (Map BlockInfo PP_Doc) ->+ ( PP_Docs))+data Inh_Chunks = Inh_Chunks {isToplevel_Inh_Chunks :: !(Bool),options_Inh_Chunks :: !(Options),textBlockMap_Inh_Chunks :: !((Map BlockInfo PP_Doc))}+data Syn_Chunks = Syn_Chunks {pps_Syn_Chunks :: !(PP_Docs)}+wrap_Chunks :: T_Chunks ->+ Inh_Chunks ->+ Syn_Chunks +wrap_Chunks !(T_Chunks sem ) !(Inh_Chunks _lhsIisToplevel _lhsIoptions _lhsItextBlockMap ) =+ (let ( !_lhsOpps) = sem _lhsIisToplevel _lhsIoptions _lhsItextBlockMap + in (Syn_Chunks _lhsOpps ))+sem_Chunks_Cons :: T_Chunk ->+ T_Chunks ->+ T_Chunks +sem_Chunks_Cons !(T_Chunk hd_ ) !(T_Chunks tl_ ) =+ (T_Chunks (\ (!_lhsIisToplevel)+ (!_lhsIoptions)+ (!_lhsItextBlockMap) ->+ (case (({-# LINE 45 "PrintOcamlCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 362 "PrintOcamlCode.hs" #-})) of+ { !_tlOtextBlockMap ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 366 "PrintOcamlCode.hs" #-})) of+ { !_tlOisToplevel ->+ (case (({-# LINE 45 "PrintOcamlCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 370 "PrintOcamlCode.hs" #-})) of+ { !_hdOtextBlockMap ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 374 "PrintOcamlCode.hs" #-})) of+ { !_hdOisToplevel ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 378 "PrintOcamlCode.hs" #-})) of+ { !_tlOoptions ->+ (case (tl_ _tlOisToplevel _tlOoptions _tlOtextBlockMap ) of+ { ( !_tlIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 384 "PrintOcamlCode.hs" #-})) of+ { !_hdOoptions ->+ (case (hd_ _hdOisToplevel _hdOoptions _hdOtextBlockMap ) of+ { ( !_hdIpps) ->+ (case (({-# LINE 84 "PrintOcamlCode.ag" #-}+ _hdIpps ++ _tlIpps+ {-# LINE 390 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) }) }) })) )+sem_Chunks_Nil :: T_Chunks +sem_Chunks_Nil =+ (T_Chunks (\ (!_lhsIisToplevel)+ (!_lhsIoptions)+ (!_lhsItextBlockMap) ->+ (case (({-# LINE 85 "PrintOcamlCode.ag" #-}+ []+ {-# LINE 400 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) })) )+-- DataAlt -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative DataAlt:+ child name : {String}+ child args : Types + alternative Record:+ child name : {String}+ child args : NamedTypes +-}+-- cata+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 (( PP_Doc))+data Inh_DataAlt = Inh_DataAlt {}+data Syn_DataAlt = Syn_DataAlt {pp_Syn_DataAlt :: !(PP_Doc)}+wrap_DataAlt :: T_DataAlt ->+ Inh_DataAlt ->+ Syn_DataAlt +wrap_DataAlt !(T_DataAlt sem ) !(Inh_DataAlt ) =+ (let ( !_lhsOpp) = sem + in (Syn_DataAlt _lhsOpp ))+sem_DataAlt_DataAlt :: String ->+ T_Types ->+ T_DataAlt +sem_DataAlt_DataAlt !name_ !(T_Types args_ ) =+ (T_DataAlt (case (args_ ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 183 "PrintOcamlCode.ag" #-}+ name_ >#< "of" >#< pp_block "" "" " * " (map pp_parens _argsIpps)+ {-# LINE 441 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) )+sem_DataAlt_Record :: String ->+ T_NamedTypes ->+ T_DataAlt +sem_DataAlt_Record !name_ !(T_NamedTypes args_ ) =+ (T_DataAlt (case (args_ ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 184 "PrintOcamlCode.ag" #-}+ pp_block "{" "}" ";" _argsIpps+ {-# LINE 452 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) )+-- DataAlts ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : DataAlt + child tl : DataAlts + alternative Nil:+-}+-- cata+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 (( PP_Docs))+data Inh_DataAlts = Inh_DataAlts {}+data Syn_DataAlts = Syn_DataAlts {pps_Syn_DataAlts :: !(PP_Docs)}+wrap_DataAlts :: T_DataAlts ->+ Inh_DataAlts ->+ Syn_DataAlts +wrap_DataAlts !(T_DataAlts sem ) !(Inh_DataAlts ) =+ (let ( !_lhsOpps) = sem + in (Syn_DataAlts _lhsOpps ))+sem_DataAlts_Cons :: T_DataAlt ->+ T_DataAlts ->+ T_DataAlts +sem_DataAlts_Cons !(T_DataAlt hd_ ) !(T_DataAlts tl_ ) =+ (T_DataAlts (case (tl_ ) of+ { ( !_tlIpps) ->+ (case (hd_ ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 68 "PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 491 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) )+sem_DataAlts_Nil :: T_DataAlts +sem_DataAlts_Nil =+ (T_DataAlts (case (({-# LINE 69 "PrintOcamlCode.ag" #-}+ []+ {-# LINE 498 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) )+-- Decl --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isToplevel : Bool+ options : Options+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Bind:+ child left : Lhs + child rhs : Expr + alternative BindLet:+ child left : Lhs + child rhs : Expr + alternative Comment:+ child txt : {String}+ alternative Data:+ child name : {String}+ child params : {[String]}+ child alts : DataAlts + child strict : {Bool}+ child derivings : {[String]}+ alternative Decl:+ child left : Lhs + child rhs : Expr + child binds : {Set String}+ child uses : {Set String}+ alternative EvalDecl:+ child nt : {String}+ child left : Lhs + child rhs : Expr + alternative NewType:+ child name : {String}+ child params : {[String]}+ child con : {String}+ child tp : Type + alternative PragmaDecl:+ child txt : {String}+ alternative Resume:+ child monadic : {Bool}+ child nt : {String}+ child left : Lhs + child rhs : Expr + alternative TSig:+ child name : {String}+ child tp : Type + alternative Type:+ child name : {String}+ child params : {[String]}+ child tp : Type +-}+-- cata+sem_Decl :: Decl ->+ T_Decl +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 !(Comment _txt ) =+ (sem_Decl_Comment _txt )+sem_Decl !(Data _name _params _alts _strict _derivings ) =+ (sem_Decl_Data _name _params (sem_DataAlts _alts ) _strict _derivings )+sem_Decl !(Decl _left _rhs _binds _uses ) =+ (sem_Decl_Decl (sem_Lhs _left ) (sem_Expr _rhs ) _binds _uses )+sem_Decl !(EvalDecl _nt _left _rhs ) =+ (sem_Decl_EvalDecl _nt (sem_Lhs _left ) (sem_Expr _rhs ) )+sem_Decl !(NewType _name _params _con _tp ) =+ (sem_Decl_NewType _name _params _con (sem_Type _tp ) )+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 !(TSig _name _tp ) =+ (sem_Decl_TSig _name (sem_Type _tp ) )+sem_Decl !(Type _name _params _tp ) =+ (sem_Decl_Type _name _params (sem_Type _tp ) )+-- semantic domain+newtype T_Decl = T_Decl (Bool ->+ Options ->+ ( PP_Doc))+data Inh_Decl = Inh_Decl {isToplevel_Inh_Decl :: !(Bool),options_Inh_Decl :: !(Options)}+data Syn_Decl = Syn_Decl {pp_Syn_Decl :: !(PP_Doc)}+wrap_Decl :: T_Decl ->+ Inh_Decl ->+ Syn_Decl +wrap_Decl !(T_Decl sem ) !(Inh_Decl _lhsIisToplevel _lhsIoptions ) =+ (let ( !_lhsOpp) = sem _lhsIisToplevel _lhsIoptions + in (Syn_Decl _lhsOpp ))+sem_Decl_Bind :: T_Lhs ->+ T_Expr ->+ T_Decl +sem_Decl_Bind !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 111 "PrintOcamlCode.ag" #-}+ error "pp of Decl.Bind not supported"+ {-# LINE 598 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Decl_BindLet :: T_Lhs ->+ T_Expr ->+ T_Decl +sem_Decl_BindLet !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 112 "PrintOcamlCode.ag" #-}+ error "pp of Decl.BindLet not supported"+ {-# LINE 609 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Decl_Comment :: String ->+ T_Decl +sem_Decl_Comment !txt_ =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 123 "PrintOcamlCode.ag" #-}+ if '\n' `elem` txt_+ then "(* " >-< vlist (lines txt_) >-< "*)"+ else "(*" >#< txt_ >#< "*)"+ {-# LINE 621 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Decl_Data :: String ->+ ([String]) ->+ T_DataAlts ->+ Bool ->+ ([String]) ->+ T_Decl +sem_Decl_Data !name_ !params_ !(T_DataAlts alts_ ) !strict_ !derivings_ =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (alts_ ) of+ { ( !_altsIpps) ->+ (case (({-# LINE 113 "PrintOcamlCode.ag" #-}+ "type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_])+ >#< ( case _altsIpps of+ [] -> empty+ (x:xs) -> "=" >#< x+ >-< vlist (map ("|" >#<) xs)+ )+ >#< ";;"+ {-# LINE 643 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) })) )+sem_Decl_Decl :: T_Lhs ->+ T_Expr ->+ (Set String) ->+ (Set String) ->+ T_Decl +sem_Decl_Decl !(T_Lhs left_ ) !(T_Expr rhs_ ) !binds_ !uses_ =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 656 "PrintOcamlCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (rhs_ _rhsOoptions ) of+ { ( !_rhsIpp) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 662 "PrintOcamlCode.hs" #-})) of+ { !_leftOoptions ->+ (case (left_ _leftOoptions ) of+ { ( !_leftIpp) ->+ (case (({-# LINE 106 "PrintOcamlCode.ag" #-}+ if _lhsIisToplevel+ then "let" >#< _leftIpp >#< "="+ >-< indent 4 _rhsIpp >#< ";;"+ else "let" >#< _leftIpp >#< "="+ >-< indent 4 _rhsIpp >#< "in"+ {-# LINE 672 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Decl_EvalDecl :: String ->+ T_Lhs ->+ T_Expr ->+ T_Decl +sem_Decl_EvalDecl !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 684 "PrintOcamlCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (rhs_ _rhsOoptions ) of+ { ( !_rhsIpp) ->+ (case (({-# LINE 53 "PrintOcamlCode.ag" #-}+ _rhsIpp+ {-# LINE 690 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Decl_NewType :: String ->+ ([String]) ->+ String ->+ T_Type ->+ T_Decl +sem_Decl_NewType !name_ !params_ !con_ !(T_Type tp_ ) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 120 "PrintOcamlCode.ag" #-}+ error "pp of Decl.NewType not supported"+ {-# LINE 703 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Decl_PragmaDecl :: String ->+ T_Decl +sem_Decl_PragmaDecl !txt_ =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 126 "PrintOcamlCode.ag" #-}+ error "pp of Decl.PragmaDecl not supported"+ {-# LINE 713 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Decl_Resume :: Bool ->+ String ->+ T_Lhs ->+ T_Expr ->+ T_Decl +sem_Decl_Resume !monadic_ !nt_ !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 726 "PrintOcamlCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (rhs_ _rhsOoptions ) of+ { ( !_rhsIpp) ->+ (case (({-# LINE 53 "PrintOcamlCode.ag" #-}+ _rhsIpp+ {-# LINE 732 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Decl_TSig :: String ->+ T_Type ->+ T_Decl +sem_Decl_TSig !name_ !(T_Type tp_ ) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (tp_ ) of+ { ( !_tpIpp) ->+ (case (({-# LINE 122 "PrintOcamlCode.ag" #-}+ "(*" >#< name_ >#< ":" >#< _tpIpp >#< "*)"+ {-# LINE 745 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) })) )+sem_Decl_Type :: String ->+ ([String]) ->+ T_Type ->+ T_Decl +sem_Decl_Type !name_ !params_ !(T_Type tp_ ) =+ (T_Decl (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (tp_ ) of+ { ( !_tpIpp) ->+ (case (({-# LINE 121 "PrintOcamlCode.ag" #-}+ "type" >#< hv_sp (map (\p -> "'" >|< p) params_ ++ [text $ toOcamlTC name_]) >#< "=" >#< _tpIpp >#< ";;"+ {-# LINE 759 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) })) )+-- Decls -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ isToplevel : Bool+ options : Options+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Decl + child tl : Decls + alternative Nil:+-}+-- cata+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 (Bool ->+ Options ->+ ( PP_Docs))+data Inh_Decls = Inh_Decls {isToplevel_Inh_Decls :: !(Bool),options_Inh_Decls :: !(Options)}+data Syn_Decls = Syn_Decls {pps_Syn_Decls :: !(PP_Docs)}+wrap_Decls :: T_Decls ->+ Inh_Decls ->+ Syn_Decls +wrap_Decls !(T_Decls sem ) !(Inh_Decls _lhsIisToplevel _lhsIoptions ) =+ (let ( !_lhsOpps) = sem _lhsIisToplevel _lhsIoptions + in (Syn_Decls _lhsOpps ))+sem_Decls_Cons :: T_Decl ->+ T_Decls ->+ T_Decls +sem_Decls_Cons !(T_Decl hd_ ) !(T_Decls tl_ ) =+ (T_Decls (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 801 "PrintOcamlCode.hs" #-})) of+ { !_tlOisToplevel ->+ (case (({-# LINE 209 "PrintOcamlCode.ag" #-}+ _lhsIisToplevel+ {-# LINE 805 "PrintOcamlCode.hs" #-})) of+ { !_hdOisToplevel ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 809 "PrintOcamlCode.hs" #-})) of+ { !_tlOoptions ->+ (case (tl_ _tlOisToplevel _tlOoptions ) of+ { ( !_tlIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 815 "PrintOcamlCode.hs" #-})) of+ { !_hdOoptions ->+ (case (hd_ _hdOisToplevel _hdOoptions ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 80 "PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 821 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) }) }) })) )+sem_Decls_Nil :: T_Decls +sem_Decls_Nil =+ (T_Decls (\ (!_lhsIisToplevel)+ (!_lhsIoptions) ->+ (case (({-# LINE 81 "PrintOcamlCode.ag" #-}+ []+ {-# LINE 830 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) })) )+-- Expr --------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative App:+ child name : {String}+ child args : Exprs + alternative Case:+ child expr : Expr + child alts : CaseAlts + alternative Do:+ child stmts : Decls + child body : Expr + alternative InvokeExpr:+ child nt : {String}+ child expr : Expr + child args : Exprs + alternative Lambda:+ child args : Exprs + child body : Expr + alternative Let:+ child decls : Decls + child body : Expr + alternative LineExpr:+ child expr : Expr + alternative PragmaExpr:+ child onLeftSide : {Bool}+ child onNewLine : {Bool}+ child txt : {String}+ child expr : Expr + alternative ResultExpr:+ child nt : {String}+ child expr : Expr + alternative ResumeExpr:+ child nt : {String}+ child expr : Expr + child left : Lhs + child rhs : Expr + alternative SemFun:+ child nt : {String}+ child args : Exprs + child body : Expr + alternative SimpleExpr:+ child txt : {String}+ alternative TextExpr:+ child lns : {[String]}+ alternative Trace:+ child txt : {String}+ child expr : Expr + alternative TupleExpr:+ child exprs : Exprs + alternative TypedExpr:+ child expr : Expr + child tp : Type + alternative UnboxedTupleExpr:+ child exprs : Exprs +-}+-- cata+sem_Expr :: Expr ->+ T_Expr +sem_Expr !(App _name _args ) =+ (sem_Expr_App _name (sem_Exprs _args ) )+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 !(InvokeExpr _nt _expr _args ) =+ (sem_Expr_InvokeExpr _nt (sem_Expr _expr ) (sem_Exprs _args ) )+sem_Expr !(Lambda _args _body ) =+ (sem_Expr_Lambda (sem_Exprs _args ) (sem_Expr _body ) )+sem_Expr !(Let _decls _body ) =+ (sem_Expr_Let (sem_Decls _decls ) (sem_Expr _body ) )+sem_Expr !(LineExpr _expr ) =+ (sem_Expr_LineExpr (sem_Expr _expr ) )+sem_Expr !(PragmaExpr _onLeftSide _onNewLine _txt _expr ) =+ (sem_Expr_PragmaExpr _onLeftSide _onNewLine _txt (sem_Expr _expr ) )+sem_Expr !(ResultExpr _nt _expr ) =+ (sem_Expr_ResultExpr _nt (sem_Expr _expr ) )+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 ) )+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 !(TupleExpr _exprs ) =+ (sem_Expr_TupleExpr (sem_Exprs _exprs ) )+sem_Expr !(TypedExpr _expr _tp ) =+ (sem_Expr_TypedExpr (sem_Expr _expr ) (sem_Type _tp ) )+sem_Expr !(UnboxedTupleExpr _exprs ) =+ (sem_Expr_UnboxedTupleExpr (sem_Exprs _exprs ) )+-- semantic domain+newtype T_Expr = T_Expr (Options ->+ ( PP_Doc))+data Inh_Expr = Inh_Expr {options_Inh_Expr :: !(Options)}+data Syn_Expr = Syn_Expr {pp_Syn_Expr :: !(PP_Doc)}+wrap_Expr :: T_Expr ->+ Inh_Expr ->+ Syn_Expr +wrap_Expr !(T_Expr sem ) !(Inh_Expr _lhsIoptions ) =+ (let ( !_lhsOpp) = sem _lhsIoptions + in (Syn_Expr _lhsOpp ))+sem_Expr_App :: String ->+ T_Exprs ->+ T_Expr +sem_Expr_App !name_ !(T_Exprs args_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 949 "PrintOcamlCode.hs" #-})) of+ { !_argsOoptions ->+ (case (args_ _argsOoptions ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 143 "PrintOcamlCode.ag" #-}+ pp_parens $ name_ >#< hv_sp _argsIpps+ {-# LINE 955 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_Case :: T_Expr ->+ T_CaseAlts ->+ T_Expr +sem_Expr_Case !(T_Expr expr_ ) !(T_CaseAlts alts_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 965 "PrintOcamlCode.hs" #-})) of+ { !_altsOoptions ->+ (case (alts_ _altsOoptions ) of+ { ( !_altsIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 971 "PrintOcamlCode.hs" #-})) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 131 "PrintOcamlCode.ag" #-}+ pp_parens ( "match" >#< _exprIpp >#< "with"+ >-< indent 2 ( case _altsIpps of+ [] -> empty+ (x:xs) -> " " >#< x+ >-< vlist (map ("|" >#<) xs)+ )+ )+ {-# LINE 983 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Expr_Do :: T_Decls ->+ T_Expr ->+ T_Expr +sem_Expr_Do !(T_Decls stmts_ ) !(T_Expr body_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 138 "PrintOcamlCode.ag" #-}+ error "pp of Expr.Do not supported"+ {-# LINE 993 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Expr_InvokeExpr :: String ->+ T_Expr ->+ T_Exprs ->+ T_Expr +sem_Expr_InvokeExpr !nt_ !(T_Expr expr_ ) !(T_Exprs args_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1004 "PrintOcamlCode.hs" #-})) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 53 "PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1010 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_Lambda :: T_Exprs ->+ T_Expr ->+ T_Expr +sem_Expr_Lambda !(T_Exprs args_ ) !(T_Expr body_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1020 "PrintOcamlCode.hs" #-})) of+ { !_bodyOoptions ->+ (case (body_ _bodyOoptions ) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1026 "PrintOcamlCode.hs" #-})) of+ { !_argsOoptions ->+ (case (args_ _argsOoptions ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 139 "PrintOcamlCode.ag" #-}+ pp_parens ( pp "fun" >#< hv_sp _argsIpps >#< "->"+ >-< indent 2 _bodyIpp )+ {-# LINE 1033 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) })) )+sem_Expr_Let :: T_Decls ->+ T_Expr ->+ T_Expr +sem_Expr_Let !(T_Decls decls_ ) !(T_Expr body_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 216 "PrintOcamlCode.ag" #-}+ False+ {-# LINE 1043 "PrintOcamlCode.hs" #-})) of+ { !_declsOisToplevel ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1047 "PrintOcamlCode.hs" #-})) of+ { !_bodyOoptions ->+ (case (body_ _bodyOoptions ) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1053 "PrintOcamlCode.hs" #-})) of+ { !_declsOoptions ->+ (case (decls_ _declsOisToplevel _declsOoptions ) of+ { ( !_declsIpps) ->+ (case (({-# LINE 130 "PrintOcamlCode.ag" #-}+ pp_parens $ vlist (_declsIpps ++ [_bodyIpp])+ {-# LINE 1059 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) }) }) })) )+sem_Expr_LineExpr :: T_Expr ->+ T_Expr +sem_Expr_LineExpr !(T_Expr expr_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1068 "PrintOcamlCode.hs" #-})) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 148 "PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1074 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_PragmaExpr :: Bool ->+ Bool ->+ String ->+ T_Expr ->+ T_Expr +sem_Expr_PragmaExpr !onLeftSide_ !onNewLine_ !txt_ !(T_Expr expr_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1086 "PrintOcamlCode.hs" #-})) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 147 "PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1092 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_ResultExpr :: String ->+ T_Expr ->+ T_Expr +sem_Expr_ResultExpr !nt_ !(T_Expr expr_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1102 "PrintOcamlCode.hs" #-})) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 53 "PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1108 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_ResumeExpr :: String ->+ T_Expr ->+ T_Lhs ->+ T_Expr ->+ T_Expr +sem_Expr_ResumeExpr !nt_ !(T_Expr expr_ ) !(T_Lhs left_ ) !(T_Expr rhs_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1120 "PrintOcamlCode.hs" #-})) of+ { !_rhsOoptions ->+ (case (rhs_ _rhsOoptions ) of+ { ( !_rhsIpp) ->+ (case (({-# LINE 53 "PrintOcamlCode.ag" #-}+ _rhsIpp+ {-# LINE 1126 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_SemFun :: String ->+ T_Exprs ->+ T_Expr ->+ T_Expr +sem_Expr_SemFun !nt_ !(T_Exprs args_ ) !(T_Expr body_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1137 "PrintOcamlCode.hs" #-})) of+ { !_bodyOoptions ->+ (case (body_ _bodyOoptions ) of+ { ( !_bodyIpp) ->+ (case (({-# LINE 53 "PrintOcamlCode.ag" #-}+ _bodyIpp+ {-# LINE 1143 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_SimpleExpr :: String ->+ T_Expr +sem_Expr_SimpleExpr !txt_ =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 144 "PrintOcamlCode.ag" #-}+ text txt_+ {-# LINE 1152 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Expr_TextExpr :: ([String]) ->+ T_Expr +sem_Expr_TextExpr !lns_ =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 145 "PrintOcamlCode.ag" #-}+ vlist (map text lns_)+ {-# LINE 1161 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Expr_Trace :: String ->+ T_Expr ->+ T_Expr +sem_Expr_Trace !txt_ !(T_Expr expr_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1171 "PrintOcamlCode.hs" #-})) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 146 "PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1177 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_TupleExpr :: T_Exprs ->+ T_Expr +sem_Expr_TupleExpr !(T_Exprs exprs_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1186 "PrintOcamlCode.hs" #-})) of+ { !_exprsOoptions ->+ (case (exprs_ _exprsOoptions ) of+ { ( !_exprsIpps) ->+ (case (({-# LINE 141 "PrintOcamlCode.ag" #-}+ ppTuple False _exprsIpps+ {-# LINE 1192 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_TypedExpr :: T_Expr ->+ T_Type ->+ T_Expr +sem_Expr_TypedExpr !(T_Expr expr_ ) !(T_Type tp_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1202 "PrintOcamlCode.hs" #-})) of+ { !_exprOoptions ->+ (case (expr_ _exprOoptions ) of+ { ( !_exprIpp) ->+ (case (({-# LINE 149 "PrintOcamlCode.ag" #-}+ _exprIpp+ {-# LINE 1208 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Expr_UnboxedTupleExpr :: T_Exprs ->+ T_Expr +sem_Expr_UnboxedTupleExpr !(T_Exprs exprs_ ) =+ (T_Expr (\ (!_lhsIoptions) ->+ (case (({-# LINE 142 "PrintOcamlCode.ag" #-}+ error "pp of Expr.UnboxedTupleExpr not supported"+ {-# LINE 1217 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+-- Exprs -------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Expr + child tl : Exprs + alternative Nil:+-}+-- cata+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 (Options ->+ ( PP_Docs))+data Inh_Exprs = Inh_Exprs {options_Inh_Exprs :: !(Options)}+data Syn_Exprs = Syn_Exprs {pps_Syn_Exprs :: !(PP_Docs)}+wrap_Exprs :: T_Exprs ->+ Inh_Exprs ->+ Syn_Exprs +wrap_Exprs !(T_Exprs sem ) !(Inh_Exprs _lhsIoptions ) =+ (let ( !_lhsOpps) = sem _lhsIoptions + in (Syn_Exprs _lhsOpps ))+sem_Exprs_Cons :: T_Expr ->+ T_Exprs ->+ T_Exprs +sem_Exprs_Cons !(T_Expr hd_ ) !(T_Exprs tl_ ) =+ (T_Exprs (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1256 "PrintOcamlCode.hs" #-})) of+ { !_tlOoptions ->+ (case (tl_ _tlOoptions ) of+ { ( !_tlIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1262 "PrintOcamlCode.hs" #-})) of+ { !_hdOoptions ->+ (case (hd_ _hdOoptions ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 60 "PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 1268 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) }) })) )+sem_Exprs_Nil :: T_Exprs +sem_Exprs_Nil =+ (T_Exprs (\ (!_lhsIoptions) ->+ (case (({-# LINE 61 "PrintOcamlCode.ag" #-}+ []+ {-# LINE 1276 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) })) )+-- Lhs ---------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Fun:+ child name : {String}+ child args : Exprs + alternative Pattern3:+ child pat3 : Pattern + alternative Pattern3SM:+ child pat3 : Pattern + alternative TupleLhs:+ child comps : {[String]}+ alternative UnboxedTupleLhs:+ child comps : {[String]}+ alternative Unwrap:+ child name : {String}+ child sub : Lhs +-}+-- cata+sem_Lhs :: Lhs ->+ T_Lhs +sem_Lhs !(Fun _name _args ) =+ (sem_Lhs_Fun _name (sem_Exprs _args ) )+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 !(Unwrap _name _sub ) =+ (sem_Lhs_Unwrap _name (sem_Lhs _sub ) )+-- semantic domain+newtype T_Lhs = T_Lhs (Options ->+ ( PP_Doc))+data Inh_Lhs = Inh_Lhs {options_Inh_Lhs :: !(Options)}+data Syn_Lhs = Syn_Lhs {pp_Syn_Lhs :: !(PP_Doc)}+wrap_Lhs :: T_Lhs ->+ Inh_Lhs ->+ Syn_Lhs +wrap_Lhs !(T_Lhs sem ) !(Inh_Lhs _lhsIoptions ) =+ (let ( !_lhsOpp) = sem _lhsIoptions + in (Syn_Lhs _lhsOpp ))+sem_Lhs_Fun :: String ->+ T_Exprs ->+ T_Lhs +sem_Lhs_Fun !name_ !(T_Exprs args_ ) =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1335 "PrintOcamlCode.hs" #-})) of+ { !_argsOoptions ->+ (case (args_ _argsOoptions ) of+ { ( !_argsIpps) ->+ (case (({-# LINE 156 "PrintOcamlCode.ag" #-}+ name_ >#< hv_sp _argsIpps+ {-# LINE 1341 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Lhs_Pattern3 :: T_Pattern ->+ T_Lhs +sem_Lhs_Pattern3 !(T_Pattern pat3_ ) =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1350 "PrintOcamlCode.hs" #-})) of+ { !_pat3Ooptions ->+ (case (pat3_ _pat3Ooptions ) of+ { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp) ->+ (case (({-# LINE 152 "PrintOcamlCode.ag" #-}+ _pat3Ipp+ {-# LINE 1356 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+sem_Lhs_Pattern3SM :: T_Pattern ->+ T_Lhs +sem_Lhs_Pattern3SM !(T_Pattern pat3_ ) =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 153 "PrintOcamlCode.ag" #-}+ error "pp of Lhs.Pattern3SM not supported"+ {-# LINE 1365 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Lhs_TupleLhs :: ([String]) ->+ T_Lhs +sem_Lhs_TupleLhs !comps_ =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 154 "PrintOcamlCode.ag" #-}+ ppTuple False (map text comps_)+ {-# LINE 1374 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Lhs_UnboxedTupleLhs :: ([String]) ->+ T_Lhs +sem_Lhs_UnboxedTupleLhs !comps_ =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 155 "PrintOcamlCode.ag" #-}+ error "pp of Lhs.UnboxedTupleLhs not supported"+ {-# LINE 1383 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) })) )+sem_Lhs_Unwrap :: String ->+ T_Lhs ->+ T_Lhs +sem_Lhs_Unwrap !name_ !(T_Lhs sub_ ) =+ (T_Lhs (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1393 "PrintOcamlCode.hs" #-})) of+ { !_subOoptions ->+ (case (sub_ _subOoptions ) of+ { ( !_subIpp) ->+ (case (({-# LINE 157 "PrintOcamlCode.ag" #-}+ pp_parens (name_ >#< _subIpp)+ {-# LINE 1399 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) })) )+-- NamedType ---------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Named:+ child strict : {Bool}+ child name : {String}+ child tp : Type +-}+-- cata+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 (( PP_Doc))+data Inh_NamedType = Inh_NamedType {}+data Syn_NamedType = Syn_NamedType {pp_Syn_NamedType :: !(PP_Doc)}+wrap_NamedType :: T_NamedType ->+ Inh_NamedType ->+ Syn_NamedType +wrap_NamedType !(T_NamedType sem ) !(Inh_NamedType ) =+ (let ( !_lhsOpp) = sem + in (Syn_NamedType _lhsOpp ))+sem_NamedType_Named :: Bool ->+ String ->+ T_Type ->+ T_NamedType +sem_NamedType_Named !strict_ !name_ !(T_Type tp_ ) =+ (T_NamedType (case (tp_ ) of+ { ( !_tpIpp) ->+ (case (({-# LINE 187 "PrintOcamlCode.ag" #-}+ name_ >#< ":" >#< _tpIpp+ {-# LINE 1437 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) )+-- NamedTypes --------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : NamedType + child tl : NamedTypes + alternative Nil:+-}+-- cata+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 (( PP_Docs))+data Inh_NamedTypes = Inh_NamedTypes {}+data Syn_NamedTypes = Syn_NamedTypes {pps_Syn_NamedTypes :: !(PP_Docs)}+wrap_NamedTypes :: T_NamedTypes ->+ Inh_NamedTypes ->+ Syn_NamedTypes +wrap_NamedTypes !(T_NamedTypes sem ) !(Inh_NamedTypes ) =+ (let ( !_lhsOpps) = sem + in (Syn_NamedTypes _lhsOpps ))+sem_NamedTypes_Cons :: T_NamedType ->+ T_NamedTypes ->+ T_NamedTypes +sem_NamedTypes_Cons !(T_NamedType hd_ ) !(T_NamedTypes tl_ ) =+ (T_NamedTypes (case (tl_ ) of+ { ( !_tlIpps) ->+ (case (hd_ ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 76 "PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 1476 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) )+sem_NamedTypes_Nil :: T_NamedTypes +sem_NamedTypes_Nil =+ (T_NamedTypes (case (({-# LINE 77 "PrintOcamlCode.ag" #-}+ []+ {-# LINE 1483 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) )+-- Pattern -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ copy : SELF + isUnderscore : Bool+ pp : PP_Doc+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + child parts : Patterns + visit 0:+ local copy : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local copy : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local copy : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern +sem_Pattern !(Alias _field _attr _pat _parts ) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )+sem_Pattern !(Constr _name _pats ) =+ (sem_Pattern_Constr _name (sem_Patterns _pats ) )+sem_Pattern !(Irrefutable _pat ) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat ) )+sem_Pattern !(Product _pos _pats ) =+ (sem_Pattern_Product _pos (sem_Patterns _pats ) )+sem_Pattern !(Underscore _pos ) =+ (sem_Pattern_Underscore _pos )+-- semantic domain+newtype T_Pattern = T_Pattern (Options ->+ ( Pattern ,Bool,PP_Doc))+data Inh_Pattern = Inh_Pattern {options_Inh_Pattern :: !(Options)}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern ),isUnderscore_Syn_Pattern :: !(Bool),pp_Syn_Pattern :: !(PP_Doc)}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern +wrap_Pattern !(T_Pattern sem ) !(Inh_Pattern _lhsIoptions ) =+ (let ( !_lhsOcopy,!_lhsOisUnderscore,!_lhsOpp) = sem _lhsIoptions + in (Syn_Pattern _lhsOcopy _lhsOisUnderscore _lhsOpp ))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Alias !field_ !attr_ !(T_Pattern pat_ ) !(T_Patterns parts_ ) =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1555 "PrintOcamlCode.hs" #-})) of+ { !_partsOoptions ->+ (case (parts_ _partsOoptions ) of+ { ( !_partsIcopy,!_partsIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1561 "PrintOcamlCode.hs" #-})) of+ { !_patOoptions ->+ (case (pat_ _patOoptions ) of+ { ( !_patIcopy,!_patIisUnderscore,!_patIpp) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Alias field_ attr_ _patIcopy _partsIcopy+ {-# LINE 1567 "PrintOcamlCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1571 "PrintOcamlCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 202 "PrintOcamlCode.ag" #-}+ False+ {-# LINE 1575 "PrintOcamlCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 193 "PrintOcamlCode.ag" #-}+ if _patIisUnderscore+ then pp (attrname False field_ attr_)+ else error "pp of Pattern.Alias is only supported in the form (x@_)"+ {-# LINE 1581 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) }) }) })) )+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1591 "PrintOcamlCode.hs" #-})) of+ { !_patsOoptions ->+ (case (pats_ _patsOoptions ) of+ { ( !_patsIcopy,!_patsIpps) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 1597 "PrintOcamlCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1601 "PrintOcamlCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 200 "PrintOcamlCode.ag" #-}+ False+ {-# LINE 1605 "PrintOcamlCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 190 "PrintOcamlCode.ag" #-}+ pp_parens $ name_ >#< hv_sp _patsIpps+ {-# LINE 1609 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern +sem_Pattern_Irrefutable !(T_Pattern pat_ ) =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1618 "PrintOcamlCode.hs" #-})) of+ { !_patOoptions ->+ (case (pat_ _patOoptions ) of+ { ( !_patIcopy,!_patIisUnderscore,!_patIpp) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 1624 "PrintOcamlCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1628 "PrintOcamlCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 199 "PrintOcamlCode.ag" #-}+ _patIisUnderscore+ {-# LINE 1632 "PrintOcamlCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 196 "PrintOcamlCode.ag" #-}+ error "pp of Pattern.Irrefutable not supported"+ {-# LINE 1636 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1646 "PrintOcamlCode.hs" #-})) of+ { !_patsOoptions ->+ (case (pats_ _patsOoptions ) of+ { ( !_patsIcopy,!_patsIpps) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 1652 "PrintOcamlCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1656 "PrintOcamlCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 201 "PrintOcamlCode.ag" #-}+ False+ {-# LINE 1660 "PrintOcamlCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 191 "PrintOcamlCode.ag" #-}+ pp_block "(" ")" "," _patsIpps+ {-# LINE 1664 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) }) }) })) )+sem_Pattern_Underscore :: Pos ->+ T_Pattern +sem_Pattern_Underscore !pos_ =+ (T_Pattern (\ (!_lhsIoptions) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Underscore pos_+ {-# LINE 1673 "PrintOcamlCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1677 "PrintOcamlCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 203 "PrintOcamlCode.ag" #-}+ True+ {-# LINE 1681 "PrintOcamlCode.hs" #-})) of+ { !_lhsOisUnderscore ->+ (case (({-# LINE 197 "PrintOcamlCode.ag" #-}+ text "_"+ {-# LINE 1685 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp) }) }) }) })) )+-- Patterns ----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ copy : SELF + pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+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 (Options ->+ ( Patterns ,PP_Docs))+data Inh_Patterns = Inh_Patterns {options_Inh_Patterns :: !(Options)}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns ),pps_Syn_Patterns :: !(PP_Docs)}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns +wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIoptions ) =+ (let ( !_lhsOcopy,!_lhsOpps) = sem _lhsIoptions + in (Syn_Patterns _lhsOcopy _lhsOpps ))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns +sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =+ (T_Patterns (\ (!_lhsIoptions) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1729 "PrintOcamlCode.hs" #-})) of+ { !_tlOoptions ->+ (case (tl_ _tlOoptions ) of+ { ( !_tlIcopy,!_tlIpps) ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1735 "PrintOcamlCode.hs" #-})) of+ { !_hdOoptions ->+ (case (hd_ _hdOoptions ) of+ { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 1741 "PrintOcamlCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1745 "PrintOcamlCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 88 "PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 1749 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOcopy,_lhsOpps) }) }) }) }) }) }) })) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil =+ (T_Patterns (\ (!_lhsIoptions) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ []+ {-# LINE 1757 "PrintOcamlCode.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1761 "PrintOcamlCode.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 89 "PrintOcamlCode.ag" #-}+ []+ {-# LINE 1765 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOcopy,_lhsOpps) }) }) })) )+-- Program -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ options : Options+ textBlockMap : Map BlockInfo PP_Doc+ synthesized attribute:+ output : PP_Docs+ alternatives:+ alternative Program:+ child chunks : Chunks + child ordered : {Bool}+-}+-- cata+sem_Program :: Program ->+ T_Program +sem_Program !(Program _chunks _ordered ) =+ (sem_Program_Program (sem_Chunks _chunks ) _ordered )+-- semantic domain+newtype T_Program = T_Program (Options ->+ (Map BlockInfo PP_Doc) ->+ ( PP_Docs))+data Inh_Program = Inh_Program {options_Inh_Program :: !(Options),textBlockMap_Inh_Program :: !((Map BlockInfo PP_Doc))}+data Syn_Program = Syn_Program {output_Syn_Program :: !(PP_Docs)}+wrap_Program :: T_Program ->+ Inh_Program ->+ Syn_Program +wrap_Program !(T_Program sem ) !(Inh_Program _lhsIoptions _lhsItextBlockMap ) =+ (let ( !_lhsOoutput) = sem _lhsIoptions _lhsItextBlockMap + in (Syn_Program _lhsOoutput ))+sem_Program_Program :: T_Chunks ->+ Bool ->+ T_Program +sem_Program_Program !(T_Chunks chunks_ ) !ordered_ =+ (T_Program (\ (!_lhsIoptions)+ (!_lhsItextBlockMap) ->+ (case (({-# LINE 45 "PrintOcamlCode.ag" #-}+ _lhsItextBlockMap+ {-# LINE 1806 "PrintOcamlCode.hs" #-})) of+ { !_chunksOtextBlockMap ->+ (case (({-# LINE 212 "PrintOcamlCode.ag" #-}+ True+ {-# LINE 1810 "PrintOcamlCode.hs" #-})) of+ { !_chunksOisToplevel ->+ (case (({-# LINE 43 "PrintOcamlCode.ag" #-}+ _lhsIoptions+ {-# LINE 1814 "PrintOcamlCode.hs" #-})) of+ { !_chunksOoptions ->+ (case (chunks_ _chunksOisToplevel _chunksOoptions _chunksOtextBlockMap ) of+ { ( !_chunksIpps) ->+ (case (({-# LINE 57 "PrintOcamlCode.ag" #-}+ _chunksIpps+ {-# LINE 1820 "PrintOcamlCode.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }) }) }) })) )+-- Type --------------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pp : PP_Doc+ alternatives:+ alternative Arr:+ child left : Type + child right : Type + alternative CtxApp:+ child left : {[(String, [String])]}+ child right : Type + alternative List:+ child tp : Type + alternative NontermType:+ child name : {String}+ child params : {[String]}+ alternative SimpleType:+ child txt : {String}+ alternative TEither:+ child left : Type + child right : Type + alternative TIntMap:+ child value : Type + alternative TMap:+ child key : Type + child value : Type + alternative TMaybe:+ child tp : Type + alternative TupleType:+ child tps : Types + alternative TypeApp:+ child func : Type + child args : Types + alternative UnboxedTupleType:+ child tps : Types +-}+-- cata+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 !(List _tp ) =+ (sem_Type_List (sem_Type _tp ) )+sem_Type !(NontermType _name _params ) =+ (sem_Type_NontermType _name _params )+sem_Type !(SimpleType _txt ) =+ (sem_Type_SimpleType _txt )+sem_Type !(TEither _left _right ) =+ (sem_Type_TEither (sem_Type _left ) (sem_Type _right ) )+sem_Type !(TIntMap _value ) =+ (sem_Type_TIntMap (sem_Type _value ) )+sem_Type !(TMap _key _value ) =+ (sem_Type_TMap (sem_Type _key ) (sem_Type _value ) )+sem_Type !(TMaybe _tp ) =+ (sem_Type_TMaybe (sem_Type _tp ) )+sem_Type !(TupleType _tps ) =+ (sem_Type_TupleType (sem_Types _tps ) )+sem_Type !(TypeApp _func _args ) =+ (sem_Type_TypeApp (sem_Type _func ) (sem_Types _args ) )+sem_Type !(UnboxedTupleType _tps ) =+ (sem_Type_UnboxedTupleType (sem_Types _tps ) )+-- semantic domain+newtype T_Type = T_Type (( PP_Doc))+data Inh_Type = Inh_Type {}+data Syn_Type = Syn_Type {pp_Syn_Type :: !(PP_Doc)}+wrap_Type :: T_Type ->+ Inh_Type ->+ Syn_Type +wrap_Type !(T_Type sem ) !(Inh_Type ) =+ (let ( !_lhsOpp) = sem + in (Syn_Type _lhsOpp ))+sem_Type_Arr :: T_Type ->+ T_Type ->+ T_Type +sem_Type_Arr !(T_Type left_ ) !(T_Type right_ ) =+ (T_Type (case (right_ ) of+ { ( !_rightIpp) ->+ (case (left_ ) of+ { ( !_leftIpp) ->+ (case (({-# LINE 160 "PrintOcamlCode.ag" #-}+ pp_parens (_leftIpp >#< "->" >#< _rightIpp)+ {-# LINE 1907 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) )+sem_Type_CtxApp :: ([(String, [String])]) ->+ T_Type ->+ T_Type +sem_Type_CtxApp !left_ !(T_Type right_ ) =+ (T_Type (case (({-# LINE 161 "PrintOcamlCode.ag" #-}+ error "pp of Type.CtxApp not supported"+ {-# LINE 1916 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) )+sem_Type_List :: T_Type ->+ T_Type +sem_Type_List !(T_Type tp_ ) =+ (T_Type (case (tp_ ) of+ { ( !_tpIpp) ->+ (case (({-# LINE 166 "PrintOcamlCode.ag" #-}+ _tpIpp >#< "list"+ {-# LINE 1926 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) )+sem_Type_NontermType :: String ->+ ([String]) ->+ T_Type +sem_Type_NontermType !name_ !params_ =+ (T_Type (case (({-# LINE 168 "PrintOcamlCode.ag" #-}+ pp_block "(" ")" " " (map text params_ ++ [text $ toOcamlTC name_])+ {-# LINE 1935 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) )+sem_Type_SimpleType :: String ->+ T_Type +sem_Type_SimpleType !txt_ =+ (T_Type (case (({-# LINE 167 "PrintOcamlCode.ag" #-}+ text txt_+ {-# LINE 1943 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) )+sem_Type_TEither :: T_Type ->+ T_Type ->+ T_Type +sem_Type_TEither !(T_Type left_ ) !(T_Type right_ ) =+ (T_Type (case (({-# LINE 170 "PrintOcamlCode.ag" #-}+ error "pp of Type.TEither is not supported"+ {-# LINE 1952 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) )+sem_Type_TIntMap :: T_Type ->+ T_Type +sem_Type_TIntMap !(T_Type value_ ) =+ (T_Type (case (({-# LINE 172 "PrintOcamlCode.ag" #-}+ error "pp of Type.TIntMap is not supported"+ {-# LINE 1960 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) )+sem_Type_TMap :: T_Type ->+ T_Type ->+ T_Type +sem_Type_TMap !(T_Type key_ ) !(T_Type value_ ) =+ (T_Type (case (({-# LINE 171 "PrintOcamlCode.ag" #-}+ error "pp of Type.TMap is not supported"+ {-# LINE 1969 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) )+sem_Type_TMaybe :: T_Type ->+ T_Type +sem_Type_TMaybe !(T_Type tp_ ) =+ (T_Type (case (tp_ ) of+ { ( !_tpIpp) ->+ (case (({-# LINE 169 "PrintOcamlCode.ag" #-}+ _tpIpp >#< "opt"+ {-# LINE 1979 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) )+sem_Type_TupleType :: T_Types ->+ T_Type +sem_Type_TupleType !(T_Types tps_ ) =+ (T_Type (case (tps_ ) of+ { ( !_tpsIpps) ->+ (case (({-# LINE 163 "PrintOcamlCode.ag" #-}+ pp_block "(" ")" "," _tpsIpps+ {-# LINE 1989 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) )+sem_Type_TypeApp :: T_Type ->+ T_Types ->+ T_Type +sem_Type_TypeApp !(T_Type func_ ) !(T_Types args_ ) =+ (T_Type (case (args_ ) of+ { ( !_argsIpps) ->+ (case (func_ ) of+ { ( !_funcIpp) ->+ (case (({-# LINE 162 "PrintOcamlCode.ag" #-}+ pp_parens (hv_sp (_argsIpps ++ [_funcIpp]))+ {-# LINE 2002 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) }) }) )+sem_Type_UnboxedTupleType :: T_Types ->+ T_Type +sem_Type_UnboxedTupleType !(T_Types tps_ ) =+ (T_Type (case (({-# LINE 165 "PrintOcamlCode.ag" #-}+ error "pp of Type.UnboxedTupleType is not supported"+ {-# LINE 2010 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpp ->+ ( _lhsOpp) }) )+-- Types -------------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ pps : PP_Docs+ alternatives:+ alternative Cons:+ child hd : Type + child tl : Types + alternative Nil:+-}+-- cata+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 (( PP_Docs))+data Inh_Types = Inh_Types {}+data Syn_Types = Syn_Types {pps_Syn_Types :: !(PP_Docs)}+wrap_Types :: T_Types ->+ Inh_Types ->+ Syn_Types +wrap_Types !(T_Types sem ) !(Inh_Types ) =+ (let ( !_lhsOpps) = sem + in (Syn_Types _lhsOpps ))+sem_Types_Cons :: T_Type ->+ T_Types ->+ T_Types +sem_Types_Cons !(T_Type hd_ ) !(T_Types tl_ ) =+ (T_Types (case (tl_ ) of+ { ( !_tlIpps) ->+ (case (hd_ ) of+ { ( !_hdIpp) ->+ (case (({-# LINE 72 "PrintOcamlCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 2049 "PrintOcamlCode.hs" #-})) of+ { !_lhsOpps ->+ ( _lhsOpps) }) }) }) )+sem_Types_Nil :: T_Types +sem_Types_Nil =+ (T_Types (case (({-# LINE 73 "PrintOcamlCode.ag" #-}+ []+ {-# LINE 2056 "PrintOcamlCode.hs" #-})) of { !_lhsOpps -> ( _lhsOpps) }) )
src-derived/PrintVisitCode.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (PrintVisitCode.ag)+-- UUAGC 0.9.30 (PrintVisitCode.ag) module PrintVisitCode where {-# LINE 10 "PrintVisitCode.ag" #-} @@ -92,8 +92,7 @@ Inh_CGrammar -> Syn_CGrammar wrap_CGrammar (T_CGrammar sem ) (Inh_CGrammar _lhsIoptions ) =- (let ( _lhsOoutput) =- (sem _lhsIoptions )+ (let ( _lhsOoutput) = sem _lhsIoptions in (Syn_CGrammar _lhsOoutput )) sem_CGrammar_CGrammar :: TypeSyns -> Derivings ->@@ -110,7 +109,7 @@ (T_CGrammar (\ _lhsIoptions -> (case (({-# LINE 53 "PrintVisitCode.ag" #-} []- {-# LINE 114 "PrintVisitCode.hs" #-})) of+ {-# LINE 113 "PrintVisitCode.hs" #-})) of { _lhsOoutput -> ( _lhsOoutput) })) ) -- CInterface --------------------------------------------------@@ -132,8 +131,7 @@ Inh_CInterface -> Syn_CInterface wrap_CInterface (T_CInterface sem ) (Inh_CInterface ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CInterface )) sem_CInterface_CInterface :: T_CSegments -> T_CInterface @@ -163,8 +161,7 @@ Inh_CNonterminal -> Syn_CNonterminal wrap_CNonterminal (T_CNonterminal sem ) (Inh_CNonterminal ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CNonterminal )) sem_CNonterminal_CNonterminal :: NontermIdent -> ([Identifier]) ->@@ -196,8 +193,7 @@ Inh_CNonterminals -> Syn_CNonterminals wrap_CNonterminals (T_CNonterminals sem ) (Inh_CNonterminals ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CNonterminals )) sem_CNonterminals_Cons :: T_CNonterminal -> T_CNonterminals ->@@ -229,8 +225,7 @@ Inh_CProduction -> Syn_CProduction wrap_CProduction (T_CProduction sem ) (Inh_CProduction ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CProduction )) sem_CProduction_CProduction :: ConstructorIdent -> T_CVisits ->@@ -260,8 +255,7 @@ Inh_CProductions -> Syn_CProductions wrap_CProductions (T_CProductions sem ) (Inh_CProductions ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CProductions )) sem_CProductions_Cons :: T_CProduction -> T_CProductions ->@@ -314,8 +308,7 @@ Inh_CRule -> Syn_CRule wrap_CRule (T_CRule sem ) (Inh_CRule ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CRule )) sem_CRule_CChildVisit :: Identifier -> NontermIdent ->@@ -365,8 +358,7 @@ Inh_CSegment -> Syn_CSegment wrap_CSegment (T_CSegment sem ) (Inh_CSegment ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CSegment )) sem_CSegment_CSegment :: Attributes -> Attributes ->@@ -394,8 +386,7 @@ Inh_CSegments -> Syn_CSegments wrap_CSegments (T_CSegments sem ) (Inh_CSegments ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CSegments )) sem_CSegments_Cons :: T_CSegment -> T_CSegments ->@@ -428,8 +419,7 @@ Inh_CVisit -> Syn_CVisit wrap_CVisit (T_CVisit sem ) (Inh_CVisit ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CVisit )) sem_CVisit_CVisit :: Attributes -> Attributes ->@@ -460,8 +450,7 @@ Inh_CVisits -> Syn_CVisits wrap_CVisits (T_CVisits sem ) (Inh_CVisits ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_CVisits )) sem_CVisits_Cons :: T_CVisit -> T_CVisits ->@@ -497,8 +486,7 @@ Inh_DeclBlocks -> Syn_DeclBlocks wrap_DeclBlocks (T_DeclBlocks sem ) (Inh_DeclBlocks ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_DeclBlocks )) sem_DeclBlocks_DeclBlock :: ([Decl]) -> Decl ->@@ -530,8 +518,7 @@ Inh_DeclBlocksRoot -> Syn_DeclBlocksRoot wrap_DeclBlocksRoot (T_DeclBlocksRoot sem ) (Inh_DeclBlocksRoot ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_DeclBlocksRoot )) sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks -> T_DeclBlocksRoot @@ -590,8 +577,7 @@ Inh_Pattern -> Syn_Pattern wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy) =- (sem )+ (let ( _lhsOcopy) = sem in (Syn_Pattern _lhsOcopy )) sem_Pattern_Alias :: Identifier -> Identifier ->@@ -599,73 +585,73 @@ T_Patterns -> T_Pattern sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) =- (T_Pattern (case ((parts_ )) of+ (T_Pattern (case (parts_ ) of { ( _partsIcopy) ->- (case ((pat_ )) of- { ( _patIcopy) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 609 "PrintVisitCode.hs" #-})) of- { _copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 613 "PrintVisitCode.hs" #-})) of- { _lhsOcopy ->- ( _lhsOcopy) }) }) }) }) )+ (case (pat_ ) of+ { ( _patIcopy) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Alias field_ attr_ _patIcopy _partsIcopy+ {-# LINE 595 "PrintVisitCode.hs" #-})) of+ { _copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 599 "PrintVisitCode.hs" #-})) of+ { _lhsOcopy ->+ ( _lhsOcopy) }) }) }) }) ) sem_Pattern_Constr :: ConstructorIdent -> T_Patterns -> T_Pattern sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (case ((pats_ )) of+ (T_Pattern (case (pats_ ) of { ( _patsIcopy) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 624 "PrintVisitCode.hs" #-})) of- { _copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 628 "PrintVisitCode.hs" #-})) of- { _lhsOcopy ->- ( _lhsOcopy) }) }) }) )+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 610 "PrintVisitCode.hs" #-})) of+ { _copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 614 "PrintVisitCode.hs" #-})) of+ { _lhsOcopy ->+ ( _lhsOcopy) }) }) }) ) sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (case ((pat_ )) of+ (T_Pattern (case (pat_ ) of { ( _patIcopy) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 638 "PrintVisitCode.hs" #-})) of- { _copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 642 "PrintVisitCode.hs" #-})) of- { _lhsOcopy ->- ( _lhsOcopy) }) }) }) )+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 624 "PrintVisitCode.hs" #-})) of+ { _copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 628 "PrintVisitCode.hs" #-})) of+ { _lhsOcopy ->+ ( _lhsOcopy) }) }) }) ) sem_Pattern_Product :: Pos -> T_Patterns -> T_Pattern sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (case ((pats_ )) of+ (T_Pattern (case (pats_ ) of { ( _patsIcopy) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 653 "PrintVisitCode.hs" #-})) of- { _copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 657 "PrintVisitCode.hs" #-})) of- { _lhsOcopy ->- ( _lhsOcopy) }) }) }) )+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 639 "PrintVisitCode.hs" #-})) of+ { _copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 643 "PrintVisitCode.hs" #-})) of+ { _lhsOcopy ->+ ( _lhsOcopy) }) }) }) ) sem_Pattern_Underscore :: Pos -> T_Pattern sem_Pattern_Underscore pos_ = (T_Pattern (case (({-# LINE 23 "./Patterns.ag" #-} Underscore pos_- {-# LINE 665 "PrintVisitCode.hs" #-})) of+ {-# LINE 651 "PrintVisitCode.hs" #-})) of { _copy -> (case (({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 669 "PrintVisitCode.hs" #-})) of+ {-# LINE 655 "PrintVisitCode.hs" #-})) of { _lhsOcopy -> ( _lhsOcopy) }) }) ) -- Patterns ----------------------------------------------------@@ -696,35 +682,34 @@ Inh_Patterns -> Syn_Patterns wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy) =- (sem )+ (let ( _lhsOcopy) = sem in (Syn_Patterns _lhsOcopy )) sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (case ((tl_ )) of+ (T_Patterns (case (tl_ ) of { ( _tlIcopy) ->- (case ((hd_ )) of- { ( _hdIcopy) ->- (case (({-# LINE 23 "./Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 713 "PrintVisitCode.hs" #-})) of- { _copy ->- (case (({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 717 "PrintVisitCode.hs" #-})) of- { _lhsOcopy ->- ( _lhsOcopy) }) }) }) }) )+ (case (hd_ ) of+ { ( _hdIcopy) ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 698 "PrintVisitCode.hs" #-})) of+ { _copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 702 "PrintVisitCode.hs" #-})) of+ { _lhsOcopy ->+ ( _lhsOcopy) }) }) }) }) ) sem_Patterns_Nil :: T_Patterns sem_Patterns_Nil = (T_Patterns (case (({-# LINE 23 "./Patterns.ag" #-} []- {-# LINE 724 "PrintVisitCode.hs" #-})) of+ {-# LINE 709 "PrintVisitCode.hs" #-})) of { _copy -> (case (({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 728 "PrintVisitCode.hs" #-})) of+ {-# LINE 713 "PrintVisitCode.hs" #-})) of { _lhsOcopy -> ( _lhsOcopy) }) }) ) -- Sequence ----------------------------------------------------@@ -748,8 +733,7 @@ Inh_Sequence -> Syn_Sequence wrap_Sequence (T_Sequence sem ) (Inh_Sequence ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_Sequence )) sem_Sequence_Cons :: T_CRule -> T_Sequence ->
src-derived/SemHsTokens.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (SemHsTokens.ag)+-- UUAGC 0.9.30 (SemHsTokens.ag) module SemHsTokens where {-# LINE 4 "SemHsTokens.ag" #-} @@ -99,8 +99,7 @@ Inh_HsToken -> Syn_HsToken wrap_HsToken (T_HsToken sem ) (Inh_HsToken _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt ) =- (let ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) =- (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt )+ (let ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt in (Syn_HsToken _lhsOerrors _lhsOtok _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals )) sem_HsToken_AGField :: Identifier -> Identifier ->@@ -127,34 +126,34 @@ else if not(field_ `elem` (_LHS : _LOC: _lhsIfieldnames)) then Seq.singleton (UndefChild _lhsInt _lhsIcon field_) else Seq.singleton (UndefAttr _lhsInt _lhsIcon field_ attr_ False)- {-# LINE 131 "SemHsTokens.hs" #-})+ {-# LINE 130 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 88, column 13) _lhsOusedAttrs = ({-# LINE 88 "SemHsTokens.ag" #-} [(field_,attr_)]- {-# LINE 136 "SemHsTokens.hs" #-})+ {-# LINE 135 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 115, column 8) _addTrace = ({-# LINE 115 "SemHsTokens.ag" #-} case rdesc_ of Just d -> \x -> "(trace " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))" Nothing -> id- {-# LINE 143 "SemHsTokens.hs" #-})+ {-# LINE 142 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 118, column 8) _lhsOtok = ({-# LINE 118 "SemHsTokens.ag" #-} (pos_, _addTrace $ attrname True field_ attr_)- {-# LINE 148 "SemHsTokens.hs" #-})+ {-# LINE 147 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 93, column 40) _lhsOusedFields = ({-# LINE 93 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 153 "SemHsTokens.hs" #-})+ {-# LINE 152 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 84, column 40) _lhsOusedLocals = ({-# LINE 84 "SemHsTokens.ag" #-} []- {-# LINE 158 "SemHsTokens.hs" #-})+ {-# LINE 157 "SemHsTokens.hs" #-}) in ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_AGLocal :: Identifier -> Pos ->@@ -182,49 +181,49 @@ else if (_LOC,var_) `elem` _lhsIattrs then (Seq.empty , (pos_,locname var_), [var_]) else (Seq.singleton(UndefLocal _lhsInt _lhsIcon var_), (pos_,locname var_), [] )- {-# LINE 186 "SemHsTokens.hs" #-})+ {-# LINE 185 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 64, column 19) (_errors,_,_) = ({-# LINE 64 "SemHsTokens.ag" #-} __tup1- {-# LINE 191 "SemHsTokens.hs" #-})+ {-# LINE 190 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 64, column 19) (_,_tok,_) = ({-# LINE 64 "SemHsTokens.ag" #-} __tup1- {-# LINE 196 "SemHsTokens.hs" #-})+ {-# LINE 195 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 64, column 19) (_,_,_usedLocals) = ({-# LINE 64 "SemHsTokens.ag" #-} __tup1- {-# LINE 201 "SemHsTokens.hs" #-})+ {-# LINE 200 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 96, column 13) _lhsOusedFields = ({-# LINE 96 "SemHsTokens.ag" #-} if var_ `elem` _lhsIfieldnames then Seq.singleton var_ else Seq.empty- {-# LINE 208 "SemHsTokens.hs" #-})+ {-# LINE 207 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "SemHsTokens.ag" #-} _errors- {-# LINE 213 "SemHsTokens.hs" #-})+ {-# LINE 212 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 85, column 40) _lhsOusedAttrs = ({-# LINE 85 "SemHsTokens.ag" #-} []- {-# LINE 218 "SemHsTokens.hs" #-})+ {-# LINE 217 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 84, column 40) _lhsOusedLocals = ({-# LINE 84 "SemHsTokens.ag" #-} _usedLocals- {-# LINE 223 "SemHsTokens.hs" #-})+ {-# LINE 222 "SemHsTokens.hs" #-}) -- copy rule (from local) _lhsOtok = ({-# LINE 113 "SemHsTokens.ag" #-} _tok- {-# LINE 228 "SemHsTokens.hs" #-})+ {-# LINE 227 "SemHsTokens.hs" #-}) in ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_CharToken :: String -> Pos ->@@ -248,27 +247,27 @@ then "" else showCharShort (head value_) )- {-# LINE 252 "SemHsTokens.hs" #-})+ {-# LINE 251 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 257 "SemHsTokens.hs" #-})+ {-# LINE 256 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 85, column 40) _lhsOusedAttrs = ({-# LINE 85 "SemHsTokens.ag" #-} []- {-# LINE 262 "SemHsTokens.hs" #-})+ {-# LINE 261 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 93, column 40) _lhsOusedFields = ({-# LINE 93 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 267 "SemHsTokens.hs" #-})+ {-# LINE 266 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 84, column 40) _lhsOusedLocals = ({-# LINE 84 "SemHsTokens.ag" #-} []- {-# LINE 272 "SemHsTokens.hs" #-})+ {-# LINE 271 "SemHsTokens.hs" #-}) in ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_Err :: String -> Pos ->@@ -290,27 +289,27 @@ ({-# LINE 50 "SemHsTokens.ag" #-} let m = text mesg_ in Seq.singleton (CustomError False pos_ m)- {-# LINE 294 "SemHsTokens.hs" #-})+ {-# LINE 293 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 128, column 16) _lhsOtok = ({-# LINE 128 "SemHsTokens.ag" #-} (pos_, "")- {-# LINE 299 "SemHsTokens.hs" #-})+ {-# LINE 298 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 85, column 40) _lhsOusedAttrs = ({-# LINE 85 "SemHsTokens.ag" #-} []- {-# LINE 304 "SemHsTokens.hs" #-})+ {-# LINE 303 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 93, column 40) _lhsOusedFields = ({-# LINE 93 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 309 "SemHsTokens.hs" #-})+ {-# LINE 308 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 84, column 40) _lhsOusedLocals = ({-# LINE 84 "SemHsTokens.ag" #-} []- {-# LINE 314 "SemHsTokens.hs" #-})+ {-# LINE 313 "SemHsTokens.hs" #-}) in ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_HsToken :: String -> Pos ->@@ -331,27 +330,27 @@ _lhsOtok = ({-# LINE 120 "SemHsTokens.ag" #-} (pos_, value_)- {-# LINE 335 "SemHsTokens.hs" #-})+ {-# LINE 334 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 340 "SemHsTokens.hs" #-})+ {-# LINE 339 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 85, column 40) _lhsOusedAttrs = ({-# LINE 85 "SemHsTokens.ag" #-} []- {-# LINE 345 "SemHsTokens.hs" #-})+ {-# LINE 344 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 93, column 40) _lhsOusedFields = ({-# LINE 93 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 350 "SemHsTokens.hs" #-})+ {-# LINE 349 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 84, column 40) _lhsOusedLocals = ({-# LINE 84 "SemHsTokens.ag" #-} []- {-# LINE 355 "SemHsTokens.hs" #-})+ {-# LINE 354 "SemHsTokens.hs" #-}) in ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_StrToken :: String -> Pos ->@@ -372,27 +371,27 @@ _lhsOtok = ({-# LINE 127 "SemHsTokens.ag" #-} (pos_, showStrShort value_)- {-# LINE 376 "SemHsTokens.hs" #-})+ {-# LINE 375 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 381 "SemHsTokens.hs" #-})+ {-# LINE 380 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 85, column 40) _lhsOusedAttrs = ({-# LINE 85 "SemHsTokens.ag" #-} []- {-# LINE 386 "SemHsTokens.hs" #-})+ {-# LINE 385 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 93, column 40) _lhsOusedFields = ({-# LINE 93 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 391 "SemHsTokens.hs" #-})+ {-# LINE 390 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 84, column 40) _lhsOusedLocals = ({-# LINE 84 "SemHsTokens.ag" #-} []- {-# LINE 396 "SemHsTokens.hs" #-})+ {-# LINE 395 "SemHsTokens.hs" #-}) in ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) -- HsTokens ---------------------------------------------------- {-@@ -435,8 +434,7 @@ Inh_HsTokens -> Syn_HsTokens wrap_HsTokens (T_HsTokens sem ) (Inh_HsTokens _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt ) =- (let ( _lhsOerrors,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) =- (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt )+ (let ( _lhsOerrors,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt in (Syn_HsTokens _lhsOerrors _lhsOtks _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals )) sem_HsTokens_Cons :: T_HsToken -> T_HsTokens ->@@ -479,91 +477,91 @@ _lhsOtks = ({-# LINE 110 "SemHsTokens.ag" #-} _hdItok : _tlItks- {-# LINE 483 "SemHsTokens.hs" #-})+ {-# LINE 481 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "SemHsTokens.ag" #-} _hdIerrors Seq.>< _tlIerrors- {-# LINE 488 "SemHsTokens.hs" #-})+ {-# LINE 486 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 85, column 40) _lhsOusedAttrs = ({-# LINE 85 "SemHsTokens.ag" #-} _hdIusedAttrs ++ _tlIusedAttrs- {-# LINE 493 "SemHsTokens.hs" #-})+ {-# LINE 491 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 93, column 40) _lhsOusedFields = ({-# LINE 93 "SemHsTokens.ag" #-} _hdIusedFields Seq.>< _tlIusedFields- {-# LINE 498 "SemHsTokens.hs" #-})+ {-# LINE 496 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 84, column 40) _lhsOusedLocals = ({-# LINE 84 "SemHsTokens.ag" #-} _hdIusedLocals ++ _tlIusedLocals- {-# LINE 503 "SemHsTokens.hs" #-})+ {-# LINE 501 "SemHsTokens.hs" #-}) -- copy rule (down) _hdOallfields = ({-# LINE 30 "SemHsTokens.ag" #-} _lhsIallfields- {-# LINE 508 "SemHsTokens.hs" #-})+ {-# LINE 506 "SemHsTokens.hs" #-}) -- copy rule (down) _hdOallnts = ({-# LINE 31 "SemHsTokens.ag" #-} _lhsIallnts- {-# LINE 513 "SemHsTokens.hs" #-})+ {-# LINE 511 "SemHsTokens.hs" #-}) -- copy rule (down) _hdOattrs = ({-# LINE 32 "SemHsTokens.ag" #-} _lhsIattrs- {-# LINE 518 "SemHsTokens.hs" #-})+ {-# LINE 516 "SemHsTokens.hs" #-}) -- copy rule (down) _hdOcon = ({-# LINE 29 "SemHsTokens.ag" #-} _lhsIcon- {-# LINE 523 "SemHsTokens.hs" #-})+ {-# LINE 521 "SemHsTokens.hs" #-}) -- copy rule (down) _hdOfieldnames = ({-# LINE 36 "SemHsTokens.ag" #-} _lhsIfieldnames- {-# LINE 528 "SemHsTokens.hs" #-})+ {-# LINE 526 "SemHsTokens.hs" #-}) -- copy rule (down) _hdOnt = ({-# LINE 29 "SemHsTokens.ag" #-} _lhsInt- {-# LINE 533 "SemHsTokens.hs" #-})+ {-# LINE 531 "SemHsTokens.hs" #-}) -- copy rule (down) _tlOallfields = ({-# LINE 30 "SemHsTokens.ag" #-} _lhsIallfields- {-# LINE 538 "SemHsTokens.hs" #-})+ {-# LINE 536 "SemHsTokens.hs" #-}) -- copy rule (down) _tlOallnts = ({-# LINE 31 "SemHsTokens.ag" #-} _lhsIallnts- {-# LINE 543 "SemHsTokens.hs" #-})+ {-# LINE 541 "SemHsTokens.hs" #-}) -- copy rule (down) _tlOattrs = ({-# LINE 32 "SemHsTokens.ag" #-} _lhsIattrs- {-# LINE 548 "SemHsTokens.hs" #-})+ {-# LINE 546 "SemHsTokens.hs" #-}) -- copy rule (down) _tlOcon = ({-# LINE 29 "SemHsTokens.ag" #-} _lhsIcon- {-# LINE 553 "SemHsTokens.hs" #-})+ {-# LINE 551 "SemHsTokens.hs" #-}) -- copy rule (down) _tlOfieldnames = ({-# LINE 36 "SemHsTokens.ag" #-} _lhsIfieldnames- {-# LINE 558 "SemHsTokens.hs" #-})+ {-# LINE 556 "SemHsTokens.hs" #-}) -- copy rule (down) _tlOnt = ({-# LINE 29 "SemHsTokens.ag" #-} _lhsInt- {-# LINE 563 "SemHsTokens.hs" #-})+ {-# LINE 561 "SemHsTokens.hs" #-}) ( _hdIerrors,_hdItok,_hdIusedAttrs,_hdIusedFields,_hdIusedLocals) =- (hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOfieldnames _hdOnt )+ hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOfieldnames _hdOnt ( _tlIerrors,_tlItks,_tlIusedAttrs,_tlIusedFields,_tlIusedLocals) =- (tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOfieldnames _tlOnt )+ tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOfieldnames _tlOnt in ( _lhsOerrors,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsTokens_Nil :: T_HsTokens sem_HsTokens_Nil =@@ -582,27 +580,27 @@ _lhsOtks = ({-# LINE 111 "SemHsTokens.ag" #-} []- {-# LINE 586 "SemHsTokens.hs" #-})+ {-# LINE 584 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 43, column 37) _lhsOerrors = ({-# LINE 43 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 591 "SemHsTokens.hs" #-})+ {-# LINE 589 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 85, column 40) _lhsOusedAttrs = ({-# LINE 85 "SemHsTokens.ag" #-} []- {-# LINE 596 "SemHsTokens.hs" #-})+ {-# LINE 594 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 93, column 40) _lhsOusedFields = ({-# LINE 93 "SemHsTokens.ag" #-} Seq.empty- {-# LINE 601 "SemHsTokens.hs" #-})+ {-# LINE 599 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 84, column 40) _lhsOusedLocals = ({-# LINE 84 "SemHsTokens.ag" #-} []- {-# LINE 606 "SemHsTokens.hs" #-})+ {-# LINE 604 "SemHsTokens.hs" #-}) in ( _lhsOerrors,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) -- HsTokensRoot ------------------------------------------------ {-@@ -641,8 +639,7 @@ Inh_HsTokensRoot -> Syn_HsTokensRoot wrap_HsTokensRoot (T_HsTokensRoot sem ) (Inh_HsTokensRoot _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt ) =- (let ( _lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) =- (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt )+ (let ( _lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) = sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt in (Syn_HsTokensRoot _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals )) sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot @@ -672,57 +669,57 @@ _tokensOfieldnames = ({-# LINE 38 "SemHsTokens.ag" #-} map (\(n,_,_) -> n) _lhsIallfields- {-# LINE 676 "SemHsTokens.hs" #-})+ {-# LINE 673 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 100, column 18) _lhsOusedFields = ({-# LINE 100 "SemHsTokens.ag" #-} toList _tokensIusedFields- {-# LINE 681 "SemHsTokens.hs" #-})+ {-# LINE 678 "SemHsTokens.hs" #-}) -- "SemHsTokens.ag"(line 107, column 18) _lhsOtextLines = ({-# LINE 107 "SemHsTokens.ag" #-} showTokens _tokensItks- {-# LINE 686 "SemHsTokens.hs" #-})+ {-# LINE 683 "SemHsTokens.hs" #-}) -- use rule "SemHsTokens.ag"(line 18, column 18) _lhsOerrors = ({-# LINE 18 "SemHsTokens.ag" #-} _tokensIerrors- {-# LINE 691 "SemHsTokens.hs" #-})+ {-# LINE 688 "SemHsTokens.hs" #-}) -- copy rule (up) _lhsOusedAttrs = ({-# LINE 20 "SemHsTokens.ag" #-} _tokensIusedAttrs- {-# LINE 696 "SemHsTokens.hs" #-})+ {-# LINE 693 "SemHsTokens.hs" #-}) -- copy rule (up) _lhsOusedLocals = ({-# LINE 19 "SemHsTokens.ag" #-} _tokensIusedLocals- {-# LINE 701 "SemHsTokens.hs" #-})+ {-# LINE 698 "SemHsTokens.hs" #-}) -- copy rule (down) _tokensOallfields = ({-# LINE 30 "SemHsTokens.ag" #-} _lhsIallfields- {-# LINE 706 "SemHsTokens.hs" #-})+ {-# LINE 703 "SemHsTokens.hs" #-}) -- copy rule (down) _tokensOallnts = ({-# LINE 31 "SemHsTokens.ag" #-} _lhsIallnts- {-# LINE 711 "SemHsTokens.hs" #-})+ {-# LINE 708 "SemHsTokens.hs" #-}) -- copy rule (down) _tokensOattrs = ({-# LINE 32 "SemHsTokens.ag" #-} _lhsIattrs- {-# LINE 716 "SemHsTokens.hs" #-})+ {-# LINE 713 "SemHsTokens.hs" #-}) -- copy rule (down) _tokensOcon = ({-# LINE 29 "SemHsTokens.ag" #-} _lhsIcon- {-# LINE 721 "SemHsTokens.hs" #-})+ {-# LINE 718 "SemHsTokens.hs" #-}) -- copy rule (down) _tokensOnt = ({-# LINE 29 "SemHsTokens.ag" #-} _lhsInt- {-# LINE 726 "SemHsTokens.hs" #-})+ {-# LINE 723 "SemHsTokens.hs" #-}) ( _tokensIerrors,_tokensItks,_tokensIusedAttrs,_tokensIusedFields,_tokensIusedLocals) =- (tokens_ _tokensOallfields _tokensOallnts _tokensOattrs _tokensOcon _tokensOfieldnames _tokensOnt )+ tokens_ _tokensOallfields _tokensOallnts _tokensOattrs _tokensOcon _tokensOfieldnames _tokensOnt in ( _lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )
src-derived/TfmToVisage.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (TfmToVisage.ag)+-- UUAGC 0.9.30 (TfmToVisage.ag) module TfmToVisage where {-# LINE 8 "TfmToVisage.ag" #-} @@ -116,8 +116,7 @@ Inh_Child -> Syn_Child wrap_Child (T_Child sem ) (Inh_Child _lhsIrulemap ) =- (let ( _lhsOvchild) =- (sem _lhsIrulemap )+ (let ( _lhsOvchild) = sem _lhsIrulemap in (Syn_Child _lhsOvchild )) sem_Child_Child :: Identifier -> Type ->@@ -132,7 +131,7 @@ _lhsOvchild = ({-# LINE 118 "TfmToVisage.ag" #-} VChild name_ tp_ inh_ syn_ (getForField (getName name_) _lhsIrulemap)- {-# LINE 136 "TfmToVisage.hs" #-})+ {-# LINE 135 "TfmToVisage.hs" #-}) in ( _lhsOvchild))) ) -- Children ---------------------------------------------------- {-@@ -161,8 +160,7 @@ Inh_Children -> Syn_Children wrap_Children (T_Children sem ) (Inh_Children _lhsIrulemap ) =- (let ( _lhsOvchildren) =- (sem _lhsIrulemap )+ (let ( _lhsOvchildren) = sem _lhsIrulemap in (Syn_Children _lhsOvchildren )) sem_Children_Cons :: T_Child -> T_Children ->@@ -178,21 +176,21 @@ _lhsOvchildren = ({-# LINE 114 "TfmToVisage.ag" #-} _hdIvchild : _tlIvchildren- {-# LINE 182 "TfmToVisage.hs" #-})+ {-# LINE 180 "TfmToVisage.hs" #-}) -- copy rule (down) _hdOrulemap = ({-# LINE 80 "TfmToVisage.ag" #-} _lhsIrulemap- {-# LINE 187 "TfmToVisage.hs" #-})+ {-# LINE 185 "TfmToVisage.hs" #-}) -- copy rule (down) _tlOrulemap = ({-# LINE 81 "TfmToVisage.ag" #-} _lhsIrulemap- {-# LINE 192 "TfmToVisage.hs" #-})+ {-# LINE 190 "TfmToVisage.hs" #-}) ( _hdIvchild) =- (hd_ _hdOrulemap )+ hd_ _hdOrulemap ( _tlIvchildren) =- (tl_ _tlOrulemap )+ tl_ _tlOrulemap in ( _lhsOvchildren))) ) sem_Children_Nil :: T_Children sem_Children_Nil =@@ -202,7 +200,7 @@ _lhsOvchildren = ({-# LINE 115 "TfmToVisage.ag" #-} []- {-# LINE 206 "TfmToVisage.hs" #-})+ {-# LINE 204 "TfmToVisage.hs" #-}) in ( _lhsOvchildren))) ) -- Expression -------------------------------------------------- {-@@ -229,8 +227,7 @@ Inh_Expression -> Syn_Expression wrap_Expression (T_Expression sem ) (Inh_Expression ) =- (let ( _lhsOself) =- (sem )+ (let ( _lhsOself) = sem in (Syn_Expression _lhsOself )) sem_Expression_Expression :: Pos -> ([HsToken]) ->@@ -241,12 +238,12 @@ _self = ({-# LINE 71 "TfmToVisage.ag" #-} Expression pos_ tks_- {-# LINE 245 "TfmToVisage.hs" #-})+ {-# LINE 242 "TfmToVisage.hs" #-}) -- self rule _lhsOself = ({-# LINE 71 "TfmToVisage.ag" #-} _self- {-# LINE 250 "TfmToVisage.hs" #-})+ {-# LINE 247 "TfmToVisage.hs" #-}) in ( _lhsOself)) ) -- Grammar ----------------------------------------------------- {-@@ -282,8 +279,7 @@ Inh_Grammar -> Syn_Grammar wrap_Grammar (T_Grammar sem ) (Inh_Grammar ) =- (let ( _lhsOvisage) =- (sem )+ (let ( _lhsOvisage) = sem in (Syn_Grammar _lhsOvisage )) sem_Grammar_Grammar :: TypeSyns -> UseMap ->@@ -306,9 +302,9 @@ _lhsOvisage = ({-# LINE 87 "TfmToVisage.ag" #-} VGrammar _nontsIvnonts- {-# LINE 310 "TfmToVisage.hs" #-})+ {-# LINE 306 "TfmToVisage.hs" #-}) ( _nontsIvnonts) =- (nonts_ )+ nonts_ in ( _lhsOvisage)) ) -- Nonterminal ------------------------------------------------- {-@@ -336,8 +332,7 @@ Inh_Nonterminal -> Syn_Nonterminal wrap_Nonterminal (T_Nonterminal sem ) (Inh_Nonterminal ) =- (let ( _lhsOvnont) =- (sem )+ (let ( _lhsOvnont) = sem in (Syn_Nonterminal _lhsOvnont )) sem_Nonterminal_Nonterminal :: NontermIdent -> ([Identifier]) ->@@ -352,9 +347,9 @@ _lhsOvnont = ({-# LINE 97 "TfmToVisage.ag" #-} VNonterminal nt_ inh_ syn_ _prodsIvprods- {-# LINE 356 "TfmToVisage.hs" #-})+ {-# LINE 351 "TfmToVisage.hs" #-}) ( _prodsIvprods) =- (prods_ )+ prods_ in ( _lhsOvnont)) ) -- Nonterminals ------------------------------------------------ {-@@ -380,8 +375,7 @@ Inh_Nonterminals -> Syn_Nonterminals wrap_Nonterminals (T_Nonterminals sem ) (Inh_Nonterminals ) =- (let ( _lhsOvnonts) =- (sem )+ (let ( _lhsOvnonts) = sem in (Syn_Nonterminals _lhsOvnonts )) sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals ->@@ -394,11 +388,11 @@ _lhsOvnonts = ({-# LINE 91 "TfmToVisage.ag" #-} _hdIvnont : _tlIvnonts- {-# LINE 398 "TfmToVisage.hs" #-})+ {-# LINE 392 "TfmToVisage.hs" #-}) ( _hdIvnont) =- (hd_ )+ hd_ ( _tlIvnonts) =- (tl_ )+ tl_ in ( _lhsOvnonts)) ) sem_Nonterminals_Nil :: T_Nonterminals sem_Nonterminals_Nil =@@ -407,7 +401,7 @@ _lhsOvnonts = ({-# LINE 93 "TfmToVisage.ag" #-} []- {-# LINE 411 "TfmToVisage.hs" #-})+ {-# LINE 405 "TfmToVisage.hs" #-}) in ( _lhsOvnonts)) ) -- Pattern ----------------------------------------------------- {-@@ -470,8 +464,7 @@ Inh_Pattern -> Syn_Pattern wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat) =- (sem )+ (let ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat) = sem in (Syn_Pattern _lhsOcopy _lhsOfieldattrs _lhsOself _lhsOvpat )) sem_Pattern_Alias :: Identifier -> Identifier ->@@ -497,36 +490,36 @@ if (isVar _self) then VVar field_ attr_ else VAlias field_ attr_ _patIvpat- {-# LINE 501 "TfmToVisage.hs" #-})+ {-# LINE 494 "TfmToVisage.hs" #-}) -- "TfmToVisage.ag"(line 144, column 17) _lhsOfieldattrs = ({-# LINE 144 "TfmToVisage.ag" #-} [(field_, attr_)]- {-# LINE 506 "TfmToVisage.hs" #-})+ {-# LINE 499 "TfmToVisage.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 511 "TfmToVisage.hs" #-})+ {-# LINE 504 "TfmToVisage.hs" #-}) -- self rule _self = ({-# LINE 71 "TfmToVisage.ag" #-} Alias field_ attr_ _patIself _partsIself- {-# LINE 516 "TfmToVisage.hs" #-})+ {-# LINE 509 "TfmToVisage.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 521 "TfmToVisage.hs" #-})+ {-# LINE 514 "TfmToVisage.hs" #-}) -- self rule _lhsOself = ({-# LINE 71 "TfmToVisage.ag" #-} _self- {-# LINE 526 "TfmToVisage.hs" #-})+ {-# LINE 519 "TfmToVisage.hs" #-}) ( _patIcopy,_patIfieldattrs,_patIself,_patIvpat) =- (pat_ )+ pat_ ( _partsIcopy,_partsIfieldattrs,_partsIself,_partsIvpats) =- (parts_ )+ parts_ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) ) sem_Pattern_Constr :: ConstructorIdent -> T_Patterns ->@@ -544,34 +537,34 @@ _lhsOvpat = ({-# LINE 133 "TfmToVisage.ag" #-} VConstr name_ _patsIvpats- {-# LINE 548 "TfmToVisage.hs" #-})+ {-# LINE 541 "TfmToVisage.hs" #-}) -- use rule "TfmToVisage.ag"(line 141, column 43) _lhsOfieldattrs = ({-# LINE 141 "TfmToVisage.ag" #-} _patsIfieldattrs- {-# LINE 553 "TfmToVisage.hs" #-})+ {-# LINE 546 "TfmToVisage.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Constr name_ _patsIcopy- {-# LINE 558 "TfmToVisage.hs" #-})+ {-# LINE 551 "TfmToVisage.hs" #-}) -- self rule _self = ({-# LINE 71 "TfmToVisage.ag" #-} Constr name_ _patsIself- {-# LINE 563 "TfmToVisage.hs" #-})+ {-# LINE 556 "TfmToVisage.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 568 "TfmToVisage.hs" #-})+ {-# LINE 561 "TfmToVisage.hs" #-}) -- self rule _lhsOself = ({-# LINE 71 "TfmToVisage.ag" #-} _self- {-# LINE 573 "TfmToVisage.hs" #-})+ {-# LINE 566 "TfmToVisage.hs" #-}) ( _patsIcopy,_patsIfieldattrs,_patsIself,_patsIvpats) =- (pats_ )+ pats_ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) ) sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern @@ -588,34 +581,34 @@ _lhsOfieldattrs = ({-# LINE 141 "TfmToVisage.ag" #-} _patIfieldattrs- {-# LINE 592 "TfmToVisage.hs" #-})+ {-# LINE 585 "TfmToVisage.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Irrefutable _patIcopy- {-# LINE 597 "TfmToVisage.hs" #-})+ {-# LINE 590 "TfmToVisage.hs" #-}) -- self rule _self = ({-# LINE 71 "TfmToVisage.ag" #-} Irrefutable _patIself- {-# LINE 602 "TfmToVisage.hs" #-})+ {-# LINE 595 "TfmToVisage.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 607 "TfmToVisage.hs" #-})+ {-# LINE 600 "TfmToVisage.hs" #-}) -- self rule _lhsOself = ({-# LINE 71 "TfmToVisage.ag" #-} _self- {-# LINE 612 "TfmToVisage.hs" #-})+ {-# LINE 605 "TfmToVisage.hs" #-}) -- copy rule (up) _lhsOvpat = ({-# LINE 82 "TfmToVisage.ag" #-} _patIvpat- {-# LINE 617 "TfmToVisage.hs" #-})+ {-# LINE 610 "TfmToVisage.hs" #-}) ( _patIcopy,_patIfieldattrs,_patIself,_patIvpat) =- (pat_ )+ pat_ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) ) sem_Pattern_Product :: Pos -> T_Patterns ->@@ -633,34 +626,34 @@ _lhsOvpat = ({-# LINE 134 "TfmToVisage.ag" #-} VProduct pos_ _patsIvpats- {-# LINE 637 "TfmToVisage.hs" #-})+ {-# LINE 630 "TfmToVisage.hs" #-}) -- use rule "TfmToVisage.ag"(line 141, column 43) _lhsOfieldattrs = ({-# LINE 141 "TfmToVisage.ag" #-} _patsIfieldattrs- {-# LINE 642 "TfmToVisage.hs" #-})+ {-# LINE 635 "TfmToVisage.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Product pos_ _patsIcopy- {-# LINE 647 "TfmToVisage.hs" #-})+ {-# LINE 640 "TfmToVisage.hs" #-}) -- self rule _self = ({-# LINE 71 "TfmToVisage.ag" #-} Product pos_ _patsIself- {-# LINE 652 "TfmToVisage.hs" #-})+ {-# LINE 645 "TfmToVisage.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 657 "TfmToVisage.hs" #-})+ {-# LINE 650 "TfmToVisage.hs" #-}) -- self rule _lhsOself = ({-# LINE 71 "TfmToVisage.ag" #-} _self- {-# LINE 662 "TfmToVisage.hs" #-})+ {-# LINE 655 "TfmToVisage.hs" #-}) ( _patsIcopy,_patsIfieldattrs,_patsIself,_patsIvpats) =- (pats_ )+ pats_ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) ) sem_Pattern_Underscore :: Pos -> T_Pattern @@ -673,32 +666,32 @@ _lhsOvpat = ({-# LINE 138 "TfmToVisage.ag" #-} VUnderscore pos_- {-# LINE 677 "TfmToVisage.hs" #-})+ {-# LINE 670 "TfmToVisage.hs" #-}) -- use rule "TfmToVisage.ag"(line 141, column 43) _lhsOfieldattrs = ({-# LINE 141 "TfmToVisage.ag" #-} []- {-# LINE 682 "TfmToVisage.hs" #-})+ {-# LINE 675 "TfmToVisage.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} Underscore pos_- {-# LINE 687 "TfmToVisage.hs" #-})+ {-# LINE 680 "TfmToVisage.hs" #-}) -- self rule _self = ({-# LINE 71 "TfmToVisage.ag" #-} Underscore pos_- {-# LINE 692 "TfmToVisage.hs" #-})+ {-# LINE 685 "TfmToVisage.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 697 "TfmToVisage.hs" #-})+ {-# LINE 690 "TfmToVisage.hs" #-}) -- self rule _lhsOself = ({-# LINE 71 "TfmToVisage.ag" #-} _self- {-# LINE 702 "TfmToVisage.hs" #-})+ {-# LINE 695 "TfmToVisage.hs" #-}) in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) ) -- Patterns ---------------------------------------------------- {-@@ -733,8 +726,7 @@ Inh_Patterns -> Syn_Patterns wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats) =- (sem )+ (let ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats) = sem in (Syn_Patterns _lhsOcopy _lhsOfieldattrs _lhsOself _lhsOvpats )) sem_Patterns_Cons :: T_Pattern -> T_Patterns ->@@ -756,36 +748,36 @@ _lhsOvpats = ({-# LINE 129 "TfmToVisage.ag" #-} _hdIvpat : _tlIvpats- {-# LINE 760 "TfmToVisage.hs" #-})+ {-# LINE 752 "TfmToVisage.hs" #-}) -- use rule "TfmToVisage.ag"(line 141, column 43) _lhsOfieldattrs = ({-# LINE 141 "TfmToVisage.ag" #-} _hdIfieldattrs ++ _tlIfieldattrs- {-# LINE 765 "TfmToVisage.hs" #-})+ {-# LINE 757 "TfmToVisage.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} (:) _hdIcopy _tlIcopy- {-# LINE 770 "TfmToVisage.hs" #-})+ {-# LINE 762 "TfmToVisage.hs" #-}) -- self rule _self = ({-# LINE 71 "TfmToVisage.ag" #-} (:) _hdIself _tlIself- {-# LINE 775 "TfmToVisage.hs" #-})+ {-# LINE 767 "TfmToVisage.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 780 "TfmToVisage.hs" #-})+ {-# LINE 772 "TfmToVisage.hs" #-}) -- self rule _lhsOself = ({-# LINE 71 "TfmToVisage.ag" #-} _self- {-# LINE 785 "TfmToVisage.hs" #-})+ {-# LINE 777 "TfmToVisage.hs" #-}) ( _hdIcopy,_hdIfieldattrs,_hdIself,_hdIvpat) =- (hd_ )+ hd_ ( _tlIcopy,_tlIfieldattrs,_tlIself,_tlIvpats) =- (tl_ )+ tl_ in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats)) ) sem_Patterns_Nil :: T_Patterns sem_Patterns_Nil =@@ -797,32 +789,32 @@ _lhsOvpats = ({-# LINE 130 "TfmToVisage.ag" #-} []- {-# LINE 801 "TfmToVisage.hs" #-})+ {-# LINE 793 "TfmToVisage.hs" #-}) -- use rule "TfmToVisage.ag"(line 141, column 43) _lhsOfieldattrs = ({-# LINE 141 "TfmToVisage.ag" #-} []- {-# LINE 806 "TfmToVisage.hs" #-})+ {-# LINE 798 "TfmToVisage.hs" #-}) -- self rule _copy = ({-# LINE 23 "./Patterns.ag" #-} []- {-# LINE 811 "TfmToVisage.hs" #-})+ {-# LINE 803 "TfmToVisage.hs" #-}) -- self rule _self = ({-# LINE 71 "TfmToVisage.ag" #-} []- {-# LINE 816 "TfmToVisage.hs" #-})+ {-# LINE 808 "TfmToVisage.hs" #-}) -- self rule _lhsOcopy = ({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 821 "TfmToVisage.hs" #-})+ {-# LINE 813 "TfmToVisage.hs" #-}) -- self rule _lhsOself = ({-# LINE 71 "TfmToVisage.ag" #-} _self- {-# LINE 826 "TfmToVisage.hs" #-})+ {-# LINE 818 "TfmToVisage.hs" #-}) in ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats)) ) -- Production -------------------------------------------------- {-@@ -853,8 +845,7 @@ Inh_Production -> Syn_Production wrap_Production (T_Production sem ) (Inh_Production ) =- (let ( _lhsOvprod) =- (sem )+ (let ( _lhsOvprod) = sem in (Syn_Production _lhsOvprod )) sem_Production_Production :: ConstructorIdent -> T_Children ->@@ -870,31 +861,31 @@ _lhsOvprod = ({-# LINE 107 "TfmToVisage.ag" #-} VProduction con_ _childrenIvchildren _lhsrules _locrules- {-# LINE 874 "TfmToVisage.hs" #-})+ {-# LINE 865 "TfmToVisage.hs" #-}) -- "TfmToVisage.ag"(line 108, column 7) _splitVRules = ({-# LINE 108 "TfmToVisage.ag" #-} splitVRules _rulesIvrules- {-# LINE 879 "TfmToVisage.hs" #-})+ {-# LINE 870 "TfmToVisage.hs" #-}) -- "TfmToVisage.ag"(line 109, column 7) _locrules = ({-# LINE 109 "TfmToVisage.ag" #-} getForField "loc" _splitVRules- {-# LINE 884 "TfmToVisage.hs" #-})+ {-# LINE 875 "TfmToVisage.hs" #-}) -- "TfmToVisage.ag"(line 110, column 7) _lhsrules = ({-# LINE 110 "TfmToVisage.ag" #-} getForField "lhs" _splitVRules- {-# LINE 889 "TfmToVisage.hs" #-})+ {-# LINE 880 "TfmToVisage.hs" #-}) -- "TfmToVisage.ag"(line 111, column 7) _childrenOrulemap = ({-# LINE 111 "TfmToVisage.ag" #-} _splitVRules- {-# LINE 894 "TfmToVisage.hs" #-})+ {-# LINE 885 "TfmToVisage.hs" #-}) ( _childrenIvchildren) =- (children_ _childrenOrulemap )+ children_ _childrenOrulemap ( _rulesIvrules) =- (rules_ )+ rules_ in ( _lhsOvprod)) ) -- Productions ------------------------------------------------- {-@@ -920,8 +911,7 @@ Inh_Productions -> Syn_Productions wrap_Productions (T_Productions sem ) (Inh_Productions ) =- (let ( _lhsOvprods) =- (sem )+ (let ( _lhsOvprods) = sem in (Syn_Productions _lhsOvprods )) sem_Productions_Cons :: T_Production -> T_Productions ->@@ -934,11 +924,11 @@ _lhsOvprods = ({-# LINE 101 "TfmToVisage.ag" #-} _hdIvprod : _tlIvprods- {-# LINE 938 "TfmToVisage.hs" #-})+ {-# LINE 928 "TfmToVisage.hs" #-}) ( _hdIvprod) =- (hd_ )+ hd_ ( _tlIvprods) =- (tl_ )+ tl_ in ( _lhsOvprods)) ) sem_Productions_Nil :: T_Productions sem_Productions_Nil =@@ -947,7 +937,7 @@ _lhsOvprods = ({-# LINE 103 "TfmToVisage.ag" #-} []- {-# LINE 951 "TfmToVisage.hs" #-})+ {-# LINE 941 "TfmToVisage.hs" #-}) in ( _lhsOvprods)) ) -- Rule -------------------------------------------------------- {-@@ -976,8 +966,7 @@ Inh_Rule -> Syn_Rule wrap_Rule (T_Rule sem ) (Inh_Rule ) =- (let ( _lhsOvrule) =- (sem )+ (let ( _lhsOvrule) = sem in (Syn_Rule _lhsOvrule )) sem_Rule_Rule :: (Maybe Identifier) -> T_Pattern ->@@ -997,11 +986,11 @@ _lhsOvrule = ({-# LINE 126 "TfmToVisage.ag" #-} VRule _patternIfieldattrs undefined _patternIvpat _rhsIself owrt_- {-# LINE 1001 "TfmToVisage.hs" #-})+ {-# LINE 990 "TfmToVisage.hs" #-}) ( _patternIcopy,_patternIfieldattrs,_patternIself,_patternIvpat) =- (pattern_ )+ pattern_ ( _rhsIself) =- (rhs_ )+ rhs_ in ( _lhsOvrule)) ) -- Rules ------------------------------------------------------- {-@@ -1027,8 +1016,7 @@ Inh_Rules -> Syn_Rules wrap_Rules (T_Rules sem ) (Inh_Rules ) =- (let ( _lhsOvrules) =- (sem )+ (let ( _lhsOvrules) = sem in (Syn_Rules _lhsOvrules )) sem_Rules_Cons :: T_Rule -> T_Rules ->@@ -1041,11 +1029,11 @@ _lhsOvrules = ({-# LINE 121 "TfmToVisage.ag" #-} _hdIvrule : _tlIvrules- {-# LINE 1045 "TfmToVisage.hs" #-})+ {-# LINE 1033 "TfmToVisage.hs" #-}) ( _hdIvrule) =- (hd_ )+ hd_ ( _tlIvrules) =- (tl_ )+ tl_ in ( _lhsOvrules)) ) sem_Rules_Nil :: T_Rules sem_Rules_Nil =@@ -1054,7 +1042,7 @@ _lhsOvrules = ({-# LINE 122 "TfmToVisage.ag" #-} []- {-# LINE 1058 "TfmToVisage.hs" #-})+ {-# LINE 1046 "TfmToVisage.hs" #-}) in ( _lhsOvrules)) ) -- TypeSig ----------------------------------------------------- {-@@ -1076,8 +1064,7 @@ Inh_TypeSig -> Syn_TypeSig wrap_TypeSig (T_TypeSig sem ) (Inh_TypeSig ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_TypeSig )) sem_TypeSig_TypeSig :: Identifier -> Type ->@@ -1106,8 +1093,7 @@ Inh_TypeSigs -> Syn_TypeSigs wrap_TypeSigs (T_TypeSigs sem ) (Inh_TypeSigs ) =- (let ( ) =- (sem )+ (let ( ) = sem in (Syn_TypeSigs )) sem_TypeSigs_Cons :: T_TypeSig -> T_TypeSigs ->
src-derived/Transform.hs view
@@ -1,5981 +1,5967 @@ --- UUAGC 0.9.29 (Transform.ag)-module Transform where-{-# LINE 8 "Transform.ag" #-}--import Control.Monad(mplus,mzero)-import List (partition, elem, nub,intersperse)-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)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq, empty, (><),fromList)-import Data.Foldable(toList)-import UU.Scanner.Position(noPos)--import ConcreteSyntax-import AbstractSyntax-import ErrorMessages-import Patterns (Patterns(..),Pattern(..))-import Expression (Expression(..))-import HsToken--import Options-import CommonTypes-{-# LINE 28 "../src-derived/Transform.hs" #-}--{-# LINE 2 "./ConcreteSyntax.ag" #-}--import UU.Scanner.Position (Pos)-import Patterns (Pattern)-import Expression (Expression)-import CommonTypes-{-# LINE 36 "../src-derived/Transform.hs" #-}--{-# LINE 2 "./Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 43 "../src-derived/Transform.hs" #-}-{-# LINE 100 "Transform.ag" #-}-type DefinedSets = Map Identifier (Set NontermIdent) -{-# LINE 46 "../src-derived/Transform.hs" #-}--{-# LINE 120 "Transform.ag" #-}-type FieldMap = [(Identifier, Type)] -{-# LINE 50 "../src-derived/Transform.hs" #-}--{-# LINE 121 "Transform.ag" #-}-type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap) -{-# LINE 54 "../src-derived/Transform.hs" #-}--{-# LINE 141 "Transform.ag" #-}-type AttrName = (Identifier,Identifier) -{-# LINE 58 "../src-derived/Transform.hs" #-}--{-# LINE 142 "Transform.ag" #-}-type RuleInfo = (Maybe Identifier, [AttrName]->Pattern, Expression, [AttrName], Bool, String) -{-# LINE 62 "../src-derived/Transform.hs" #-}--{-# LINE 143 "Transform.ag" #-}-type SigInfo = (Identifier,Type) -{-# LINE 66 "../src-derived/Transform.hs" #-}--{-# LINE 144 "Transform.ag" #-}-type UniqueInfo = (Identifier,Identifier) -{-# LINE 70 "../src-derived/Transform.hs" #-}--{-# LINE 145 "Transform.ag" #-}-type AugmentInfo = (Identifier,Expression)-{-# LINE 74 "../src-derived/Transform.hs" #-}--{-# LINE 146 "Transform.ag" #-}-type AroundInfo = (Identifier,Expression)-{-# LINE 78 "../src-derived/Transform.hs" #-}--{-# LINE 147 "Transform.ag" #-}-type MergeInfo = (Identifier, Identifier, [Identifier], Expression)-{-# LINE 82 "../src-derived/Transform.hs" #-}--{-# LINE 195 "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 f e xs = foldl g (e,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 err [] = []-checkForDuplicates err (x:xs) = let (same,other) = List.partition (equalId x) xs- in map (err x) same ++ checkForDuplicates err other--equalId :: Identifier -> Identifier -> Bool-equalId x y = getName x == getName y--{-# LINE 113 "../src-derived/Transform.hs" #-}--{-# LINE 331 "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) -> Map NontermIdent (Map ConstructorIdent FieldMap) ->- Map NontermIdent (Map ConstructorIdent [Identifier]) -> Map NontermIdent (Map ConstructorIdent [SigInfo]) ->- Map NontermIdent (Map ConstructorIdent [MergeInfo]) ->- NontermIdent -> ConstructorIdent -> [RuleInfo] -> RulesAndErrors-checkRules attributes fields allinsts allsigs allmerges nt con rs- = let fieldmap :: FieldMap- fieldmap = (_LHS,NT nt undefined) : (_LOC,NT undefined undefined) : (_INST, NT undefined undefined) : (_FIRST, NT undefined undefined) : (_LAST, NT undefined undefined)- : 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,exp,as,owrt,str) ((r1,e1),m1) - = let (e2,m2,u2,b2) = foldr (checkDefi owrt) (e1,m1,[],[]) as- in ( (Rule mbNm (pat u2) exp owrt str True : 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 t)-> 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]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [Identifier] -> InstsAndErrors-checkInsts allNts sigMap fieldMap nt con- = foldr (\inst (insts, errs) ->- maybe (insts, Seq.singleton (MissingInstSig nt con inst) >< errs)- (\info@(k, NT nm _) ->- 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)- 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 con 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)-- (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs- in foldr checkAugment (Map.empty, Seq.empty) augments--checkArounds :: Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> 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]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [MergeInfo] -> MergesAndErrors-checkMerges allNts allInsts fieldMap nt 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.unionWith (Map.unionWith (++))-{-# LINE 268 "../src-derived/Transform.hs" #-}--{-# LINE 486 "Transform.ag" #-}--mkUniqueRules :: Options -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Attributes,Attributes) -> NontermIdent -> ConstructorIdent -> Map Identifier Identifier -> [Rule]-mkUniqueRules opts 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-- groups = Map.assocs $ Map.foldWithKey (\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 pat = Product noPos (attr outFld ref : [attr _LOC u | u <- locAttrs ])- rhs = Expression noPos $ wrap ref $ foldr gencase (finalout locAttrs) locAttrs- -- [HsToken ("mkUniques" ++ show (length locAttrs) ++ " ") noPos, AGField _LHS ref noPos Nothing]- in Rule Nothing pat rhs False "-- generated by the unique rule mechanism." False- 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 us = h ("(__cont, " ++ concat (intersperse "," (map getName us)) ++ ")")- wrap ref inp = h "case " ++ [AGField _LHS ref noPos Nothing] ++ h " of { __cont | __cont `seq` True -> " ++ inp ++ h "}"-{-# LINE 297 "../src-derived/Transform.hs" #-}--{-# LINE 658 "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 nts = reach nts- 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 m = foldr inv Map.empty (Map.toList m)- 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 322 "../src-derived/Transform.hs" #-}--{-# LINE 768 "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 331 "../src-derived/Transform.hs" #-}--{-# LINE 800 "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 340 "../src-derived/Transform.hs" #-}--{-# LINE 826 "Transform.ag" #-}--mergeParams :: ParamMap -> ParamMap -> ParamMap-mergeParams = Map.unionWith (++)-{-# LINE 346 "../src-derived/Transform.hs" #-}--{-# LINE 849 "Transform.ag" #-}--mergeCtx :: ContextMap -> ContextMap -> ContextMap-mergeCtx- = Map.unionWith nubconcat- where nubconcat a b = nub (a ++ b)-{-# LINE 354 "../src-derived/Transform.hs" #-}--{-# LINE 862 "Transform.ag" #-}--mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)-{-# LINE 359 "../src-derived/Transform.hs" #-}--{-# LINE 873 "Transform.ag" #-}--merge x y = foldr f y (Map.toList x)- where f ~(k,v) m = Map.insertWith (Map.union) k v m-{-# LINE 365 "../src-derived/Transform.hs" #-}--{-# LINE 900 "Transform.ag" #-}--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 375 "../src-derived/Transform.hs" #-}--{-# LINE 911 "Transform.ag" #-}--addSelf name atMap = let (eInh,eSyn) = Map.findWithDefault(Map.empty,Map.empty) name atMap- in Map.insert name (eInh, Map.insert (Ident "self" noPos) (NT _SELF []) eSyn)atMap-{-# LINE 381 "../src-derived/Transform.hs" #-}--{-# LINE 1051 "Transform.ag" #-}--makeType :: Set NontermIdent -> Type -> Type-makeType nts tp@(NT x _) | x == _SELF = tp- | Set.member x nts = tp- | otherwise = Haskell (typeToHaskellString Nothing [] tp)-makeType _ tp = tp-{-# LINE 390 "../src-derived/Transform.hs" #-}--{-# LINE 1058 "Transform.ag" #-}--constructGrammar :: Set NontermIdent- -> ParamMap- -> DataTypes- -> 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- -> UniqueMap- -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))- -> Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))- -> Grammar--constructGrammar nts ntParams gram attrs uses derivings wrappers allrules tsigs allinsts tsyns pragmaMap orderMap contextMap uniqueMap augmentsMap aroundsMap mergeMap =- let gr = [ (nt,Map.toList 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- alt (con,flds) =- let rules = maybe [] id (Map.lookup con rmap)- tsigs = maybe [] id (Map.lookup con tsmap)- insts = maybe [] id (Map.lookup con instsmap)- merges = [ (n, NT t []) | (n, (t, _, _)) <- Map.assocs $ maybe Map.empty id (Map.lookup con mergemap) ]-- -- 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- (inh,syn) = case tpI of- NT nt _ -> let nt' = maybe nt id (deforestedNt nt)- in Map.findWithDefault (Map.empty,Map.empty) nt' attrs- _ -> (Map.empty,Map.empty)- virt = if existsAsInst nm- then case lookup nm flds of- Just tp' -> Just (Just tp')- Nothing -> Just Nothing- else if existsAsMerge nm- then (Just Nothing)- else Nothing- in Child nm tpI inh syn 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 cldrn rules tsigs- in Nonterminal nt params inh syn (map alt alts)- in Grammar tsyns uses derivings wrappers nonts pragmaMap orderMap ntParams contextMap uniqueMap augmentsMap aroundsMap mergeMap-{-# LINE 453 "../src-derived/Transform.hs" #-}--{-# LINE 1120 "Transform.ag" #-}--mapUnionWithSetUnion = Map.unionWith Set.union-mapUnionWithPlusPlus = Map.unionWith (++)-{-# LINE 459 "../src-derived/Transform.hs" #-}--- AG -----------------------------------------------------------{-- visit 0:- inherited attribute:- options : Options- synthesized attributes:- blocks : Blocks- errors : Seq Error- moduleDecl : Maybe (String,String,String)- output : Grammar- pragmas : Options -> Options- alternatives:- alternative AG:- child elems : Elems - visit 0:- local allFields : _- local allConstrs : _- local allRules : _- local allSigs : _- local allInsts : _- local allUniques : _- local allAugments : _- local allArounds : _- local allMerges : _- local augmentSigs : _- local allRulesErrs : _- local allNamesErrs : _- local allSigsErrs : _- local allInstsErrs : _- local allUniquesErrs : _- local allAugmentErrs : _- local allAroundsErrs : _- local allMergesErrs : _- local checkedRulesPre : _- local checkedSigs : _- local checkedInsts : _- local checkedUniques : _- local checkedAugments : _- local checkedArounds : _- local checkedRules : _- local checkedMerges : _- local errs1 : _- local errs2 : _- local errs3 : _- local errs4 : _- local errs5 : _- local errs6 : _- local errs7 : _- local errs8 : _- local errs9 : _- local errs10 : _- local errs11 : _- local allNonterminals : _- local allAttrDecls : _--}--- cata-sem_AG :: AG ->- T_AG -sem_AG (AG _elems ) =- (sem_AG_AG (sem_Elems _elems ) )--- semantic domain-newtype T_AG = T_AG (Options ->- ( Blocks,(Seq Error),(Maybe (String,String,String)),Grammar,(Options -> Options)))-data Inh_AG = Inh_AG {options_Inh_AG :: !(Options)}-data Syn_AG = Syn_AG {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))}-wrap_AG :: T_AG ->- Inh_AG ->- Syn_AG -wrap_AG (T_AG sem ) (Inh_AG _lhsIoptions ) =- (let ( _lhsOblocks,_lhsOerrors,_lhsOmoduleDecl,_lhsOoutput,_lhsOpragmas) =- (sem _lhsIoptions )- in (Syn_AG _lhsOblocks _lhsOerrors _lhsOmoduleDecl _lhsOoutput _lhsOpragmas ))-sem_AG_AG :: T_Elems ->- T_AG -sem_AG_AG (T_Elems elems_ ) =- (T_AG (\ _lhsIoptions ->- (let _lhsOoutput :: Grammar- _lhsOerrors :: (Seq Error)- _elemsOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _elemsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _elemsOdefinedSets :: DefinedSets- _elemsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOblocks :: Blocks- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOpragmas :: (Options -> Options)- _elemsOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _elemsOallFields :: DataTypes- _elemsOallNonterminals :: (Set NontermIdent)- _elemsIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _elemsIattrOrderCollect :: AttrOrderMap- _elemsIblocks :: Blocks- _elemsIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _elemsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _elemsIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _elemsIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _elemsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _elemsIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _elemsIcollectedNames :: (Set Identifier)- _elemsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _elemsIcollectedSetNames :: (Set Identifier)- _elemsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _elemsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _elemsIctxCollect :: ContextMap- _elemsIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _elemsIderivings :: Derivings- _elemsIerrors :: (Seq Error)- _elemsImoduleDecl :: (Maybe (String,String,String))- _elemsIparamsCollect :: ParamMap- _elemsIpragmas :: (Options -> Options)- _elemsIsemPragmasCollect :: PragmaMap- _elemsItypeSyns :: TypeSyns- _elemsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _elemsIwrappers :: (Set NontermIdent)- -- "Transform.ag"(line 51, column 8)- _lhsOoutput =- ({-# LINE 51 "Transform.ag" #-}- constructGrammar _allNonterminals- _elemsIparamsCollect- _allFields- _allAttrDecls- _elemsIuseMap- _elemsIderivings- (if wrappers _lhsIoptions then _allNonterminals else _elemsIwrappers)- _checkedRules- _checkedSigs- _checkedInsts- _elemsItypeSyns- _elemsIsemPragmasCollect- _elemsIattrOrderCollect- _elemsIctxCollect- _checkedUniques- _checkedAugments- _checkedArounds- _checkedMerges- {-# LINE 594 "Transform.hs" #-})- -- "Transform.ag"(line 246, column 10)- _allFields =- ({-# LINE 246 "Transform.ag" #-}- let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)- in foldr f (Map.empty) _elemsIcollectedFields- {-# LINE 600 "Transform.hs" #-})- -- "Transform.ag"(line 249, column 10)- _allConstrs =- ({-# LINE 249 "Transform.ag" #-}- let f (nt,con,_) = Map.insertWith (++) nt [con]- in foldr f (Map.empty) _elemsIcollectedFields- {-# LINE 606 "Transform.hs" #-})- -- "Transform.ag"(line 252, column 10)- _allRules =- ({-# LINE 252 "Transform.ag" #-}- let f (nt,con,r) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [r])- in foldr f (Map.empty) _elemsIcollectedRules- {-# LINE 612 "Transform.hs" #-})- -- "Transform.ag"(line 255, column 10)- _allSigs =- ({-# LINE 255 "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 621 "Transform.hs" #-})- -- "Transform.ag"(line 261, column 10)- _allInsts =- ({-# LINE 261 "Transform.ag" #-}- let f (nt,con,is) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con is)- in foldr f (Map.empty) _elemsIcollectedInsts- {-# LINE 627 "Transform.hs" #-})- -- "Transform.ag"(line 264, column 10)- _allUniques =- ({-# LINE 264 "Transform.ag" #-}- let f (nt,con,us) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con us)- in foldr f (Map.empty) _elemsIcollectedUniques- {-# LINE 633 "Transform.hs" #-})- -- "Transform.ag"(line 266, column 10)- _allAugments =- ({-# LINE 266 "Transform.ag" #-}- let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)- in foldr f Map.empty _elemsIcollectedAugments- {-# LINE 639 "Transform.hs" #-})- -- "Transform.ag"(line 268, column 10)- _allArounds =- ({-# LINE 268 "Transform.ag" #-}- let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)- in foldr f Map.empty _elemsIcollectedArounds- {-# LINE 645 "Transform.hs" #-})- -- "Transform.ag"(line 270, column 10)- _allMerges =- ({-# LINE 270 "Transform.ag" #-}- let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)- in foldr f Map.empty _elemsIcollectedMerges- {-# LINE 651 "Transform.hs" #-})- -- "Transform.ag"(line 273, column 10)- _augmentSigs =- ({-# LINE 273 "Transform.ag" #-}- let gen mp = []- in Map.map (Map.map gen) _allAugments- {-# LINE 657 "Transform.hs" #-})- -- "Transform.ag"(line 276, column 10)- _allRulesErrs =- ({-# LINE 276 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs _allMerges )) _allRules- {-# LINE 662 "Transform.hs" #-})- -- "Transform.ag"(line 277, column 10)- _allNamesErrs =- ({-# LINE 277 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . checkRuleNames) _allRules- {-# LINE 667 "Transform.hs" #-})- -- "Transform.ag"(line 278, column 10)- _allSigsErrs =- ({-# LINE 278 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkSigs )) _allSigs- {-# LINE 672 "Transform.hs" #-})- -- "Transform.ag"(line 279, column 10)- _allInstsErrs =- ({-# LINE 279 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals _allSigs _allFields )) _allInsts- {-# LINE 677 "Transform.hs" #-})- -- "Transform.ag"(line 280, column 10)- _allUniquesErrs =- ({-# LINE 280 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls )) _allUniques- {-# LINE 682 "Transform.hs" #-})- -- "Transform.ag"(line 281, column 10)- _allAugmentErrs =- ({-# LINE 281 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls )) _allAugments- {-# LINE 687 "Transform.hs" #-})- -- "Transform.ag"(line 282, column 10)- _allAroundsErrs =- ({-# LINE 282 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields )) _allArounds- {-# LINE 692 "Transform.hs" #-})- -- "Transform.ag"(line 283, column 10)- _allMergesErrs =- ({-# LINE 283 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkMerges _allNonterminals _allInsts _allFields )) _allMerges- {-# LINE 697 "Transform.hs" #-})- -- "Transform.ag"(line 285, column 10)- _checkedRulesPre =- ({-# LINE 285 "Transform.ag" #-}- Map.map (Map.map fst) _allRulesErrs- {-# LINE 702 "Transform.hs" #-})- -- "Transform.ag"(line 286, column 10)- _checkedSigs =- ({-# LINE 286 "Transform.ag" #-}- Map.map (Map.map fst) _allSigsErrs `unionunionplusplus` _augmentSigs- {-# LINE 707 "Transform.hs" #-})- -- "Transform.ag"(line 287, column 10)- _checkedInsts =- ({-# LINE 287 "Transform.ag" #-}- Map.map (Map.map fst) _allInstsErrs- {-# LINE 712 "Transform.hs" #-})- -- "Transform.ag"(line 288, column 10)- _checkedUniques =- ({-# LINE 288 "Transform.ag" #-}- Map.map (Map.map fst) _allUniquesErrs- {-# LINE 717 "Transform.hs" #-})- -- "Transform.ag"(line 289, column 10)- _checkedAugments =- ({-# LINE 289 "Transform.ag" #-}- Map.map (Map.map fst) _allAugmentErrs- {-# LINE 722 "Transform.hs" #-})- -- "Transform.ag"(line 290, column 10)- _checkedArounds =- ({-# LINE 290 "Transform.ag" #-}- Map.map (Map.map fst) _allAroundsErrs- {-# LINE 727 "Transform.hs" #-})- -- "Transform.ag"(line 291, column 10)- _checkedRules =- ({-# LINE 291 "Transform.ag" #-}- Map.unionWith (Map.unionWith (++)) _checkedRulesPre (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allFields _checkedInsts _allAttrDecls )) _checkedUniques )- {-# LINE 732 "Transform.hs" #-})- -- "Transform.ag"(line 292, column 10)- _checkedMerges =- ({-# LINE 292 "Transform.ag" #-}- Map.map (Map.map fst) _allMergesErrs- {-# LINE 737 "Transform.hs" #-})- -- "Transform.ag"(line 294, column 10)- _errs1 =- ({-# LINE 294 "Transform.ag" #-}- let f = checkForDuplicates (DupSynonym)- in Seq.fromList . f . map fst $ _elemsItypeSyns- {-# LINE 743 "Transform.hs" #-})- -- "Transform.ag"(line 297, column 10)- _errs2 =- ({-# LINE 297 "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 750 "Transform.hs" #-})- -- "Transform.ag"(line 301, column 10)- _errs3 =- ({-# LINE 301 "Transform.ag" #-}- let f (nt,cons) = checkForDuplicates (DupAlt nt) cons- in Seq.empty- {-# LINE 756 "Transform.hs" #-})- -- "Transform.ag"(line 305, column 10)- _errs4 =- ({-# LINE 305 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allRulesErrs- {-# LINE 762 "Transform.hs" #-})- -- "Transform.ag"(line 308, column 10)- _errs5 =- ({-# LINE 308 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allSigsErrs- {-# LINE 768 "Transform.hs" #-})- -- "Transform.ag"(line 311, column 10)- _errs6 =- ({-# LINE 311 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allInstsErrs- {-# LINE 774 "Transform.hs" #-})- -- "Transform.ag"(line 314, column 10)- _errs7 =- ({-# LINE 314 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allUniquesErrs- {-# LINE 780 "Transform.hs" #-})- -- "Transform.ag"(line 317, column 10)- _errs8 =- ({-# LINE 317 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allAugmentErrs- {-# LINE 786 "Transform.hs" #-})- -- "Transform.ag"(line 320, column 10)- _errs9 =- ({-# LINE 320 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allAroundsErrs- {-# LINE 792 "Transform.hs" #-})- -- "Transform.ag"(line 323, column 10)- _errs10 =- ({-# LINE 323 "Transform.ag" #-}- let f m s = Map.fold ((><)) s m- in Map.fold f Seq.empty _allNamesErrs- {-# LINE 798 "Transform.hs" #-})- -- "Transform.ag"(line 326, column 10)- _errs11 =- ({-# LINE 326 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allMergesErrs- {-# LINE 804 "Transform.hs" #-})- -- "Transform.ag"(line 329, column 10)- _lhsOerrors =- ({-# LINE 329 "Transform.ag" #-}- _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9 >< _errs10 >< _errs11- {-# LINE 809 "Transform.hs" #-})- -- "Transform.ag"(line 531, column 10)- _allNonterminals =- ({-# LINE 531 "Transform.ag" #-}- _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames- {-# LINE 814 "Transform.hs" #-})- -- "Transform.ag"(line 551, column 8)- _elemsOallConstructors =- ({-# LINE 551 "Transform.ag" #-}- _elemsIcollectedConstructorsMap- {-# LINE 819 "Transform.hs" #-})- -- "Transform.ag"(line 624, column 8)- _elemsOdefSets =- ({-# LINE 624 "Transform.ag" #-}- Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals ))- {-# LINE 824 "Transform.hs" #-})- -- "Transform.ag"(line 625, column 8)- _elemsOdefinedSets =- ({-# LINE 625 "Transform.ag" #-}- Map.map fst _elemsIdefSets- {-# LINE 829 "Transform.hs" #-})- -- "Transform.ag"(line 879, column 8)- _elemsOattrDecls =- ({-# LINE 879 "Transform.ag" #-}- Map.empty- {-# LINE 834 "Transform.hs" #-})- -- "Transform.ag"(line 918, column 9)- _allAttrDecls =- ({-# LINE 918 "Transform.ag" #-}- if withSelf _lhsIoptions- then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals )- else _elemsIattrDecls- {-# LINE 841 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- _elemsIblocks- {-# LINE 846 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- _elemsImoduleDecl- {-# LINE 851 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- _elemsIpragmas- {-# LINE 856 "Transform.hs" #-})- -- copy rule (from local)- _elemsOallAttrDecls =- ({-# LINE 781 "Transform.ag" #-}- _allAttrDecls- {-# LINE 861 "Transform.hs" #-})- -- copy rule (from local)- _elemsOallFields =- ({-# LINE 127 "Transform.ag" #-}- _allFields- {-# LINE 866 "Transform.hs" #-})- -- copy rule (from local)- _elemsOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _allNonterminals- {-# LINE 871 "Transform.hs" #-})- ( _elemsIattrDecls,_elemsIattrOrderCollect,_elemsIblocks,_elemsIcollectedArounds,_elemsIcollectedAugments,_elemsIcollectedConstructorsMap,_elemsIcollectedFields,_elemsIcollectedInsts,_elemsIcollectedMerges,_elemsIcollectedNames,_elemsIcollectedRules,_elemsIcollectedSetNames,_elemsIcollectedSigs,_elemsIcollectedUniques,_elemsIctxCollect,_elemsIdefSets,_elemsIderivings,_elemsIerrors,_elemsImoduleDecl,_elemsIparamsCollect,_elemsIpragmas,_elemsIsemPragmasCollect,_elemsItypeSyns,_elemsIuseMap,_elemsIwrappers) =- (elems_ _elemsOallAttrDecls _elemsOallConstructors _elemsOallFields _elemsOallNonterminals _elemsOattrDecls _elemsOdefSets _elemsOdefinedSets )- in ( _lhsOblocks,_lhsOerrors,_lhsOmoduleDecl,_lhsOoutput,_lhsOpragmas))) )--- Alt ----------------------------------------------------------{-- visit 0:- inherited attributes:- allConstructors : Map NontermIdent (Set ConstructorIdent)- allNonterminals : Set NontermIdent- nts : Set NontermIdent- synthesized attributes:- collectedConstructorNames : Set ConstructorIdent- collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]- alternatives:- alternative Alt:- child pos : {Pos}- child names : ConstructorSet - child fields : {Fields}--}--- cata-sem_Alt :: Alt ->- T_Alt -sem_Alt (Alt _pos _names _fields ) =- (sem_Alt_Alt _pos (sem_ConstructorSet _names ) _fields )--- semantic domain-newtype T_Alt = T_Alt ((Map NontermIdent (Set ConstructorIdent)) ->- (Set NontermIdent) ->- (Set NontermIdent) ->- ( (Set ConstructorIdent),([(NontermIdent, ConstructorIdent, FieldMap)])))-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 {collectedConstructorNames_Syn_Alt :: !((Set ConstructorIdent)),collectedFields_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, FieldMap)]))}-wrap_Alt :: T_Alt ->- Inh_Alt ->- Syn_Alt -wrap_Alt (T_Alt sem ) (Inh_Alt _lhsIallConstructors _lhsIallNonterminals _lhsInts ) =- (let ( _lhsOcollectedConstructorNames,_lhsOcollectedFields) =- (sem _lhsIallConstructors _lhsIallNonterminals _lhsInts )- in (Syn_Alt _lhsOcollectedConstructorNames _lhsOcollectedFields ))-sem_Alt_Alt :: Pos ->- T_ConstructorSet ->- Fields ->- T_Alt -sem_Alt_Alt pos_ (T_ConstructorSet names_ ) fields_ =- (T_Alt (\ _lhsIallConstructors- _lhsIallNonterminals- _lhsInts ->- (let _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _namesIcollectedConstructorNames :: (Set ConstructorIdent)- _namesIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _namesIerrors :: (Seq Error)- -- "Transform.ag"(line 231, column 10)- _lhsOcollectedFields =- ({-# LINE 231 "Transform.ag" #-}- let fieldTable =- [ (attr, makeType _lhsIallNonterminals tp)- | (attr, tp) <- fields_- ]- in [ (nt, con, fieldTable)- | nt <- Set.toList _lhsInts- , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))- ]- {-# LINE 934 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 92 "Transform.ag" #-}- _namesIcollectedConstructorNames- {-# LINE 939 "Transform.hs" #-})- ( _namesIcollectedConstructorNames,_namesIconstructors,_namesIerrors) =- (names_ )- in ( _lhsOcollectedConstructorNames,_lhsOcollectedFields))) )--- Alts ---------------------------------------------------------{-- visit 0:- inherited attributes:- allConstructors : Map NontermIdent (Set ConstructorIdent)- allNonterminals : Set NontermIdent- nts : Set NontermIdent- synthesized attributes:- collectedConstructorNames : Set ConstructorIdent- collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]- alternatives:- alternative Cons:- child hd : Alt - child tl : Alts - alternative Nil:--}--- cata-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 ((Map NontermIdent (Set ConstructorIdent)) ->- (Set NontermIdent) ->- (Set NontermIdent) ->- ( (Set ConstructorIdent),([(NontermIdent, ConstructorIdent, FieldMap)])))-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 {collectedConstructorNames_Syn_Alts :: !((Set ConstructorIdent)),collectedFields_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, FieldMap)]))}-wrap_Alts :: T_Alts ->- Inh_Alts ->- Syn_Alts -wrap_Alts (T_Alts sem ) (Inh_Alts _lhsIallConstructors _lhsIallNonterminals _lhsInts ) =- (let ( _lhsOcollectedConstructorNames,_lhsOcollectedFields) =- (sem _lhsIallConstructors _lhsIallNonterminals _lhsInts )- in (Syn_Alts _lhsOcollectedConstructorNames _lhsOcollectedFields ))-sem_Alts_Cons :: T_Alt ->- T_Alts ->- T_Alts -sem_Alts_Cons (T_Alt hd_ ) (T_Alts tl_ ) =- (T_Alts (\ _lhsIallConstructors- _lhsIallNonterminals- _lhsInts ->- (let _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _hdOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _hdOallNonterminals :: (Set NontermIdent)- _hdOnts :: (Set NontermIdent)- _tlOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _tlOallNonterminals :: (Set NontermIdent)- _tlOnts :: (Set NontermIdent)- _hdIcollectedConstructorNames :: (Set ConstructorIdent)- _hdIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _tlIcollectedConstructorNames :: (Set ConstructorIdent)- _tlIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- -- use rule "Transform.ag"(line 92, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 92 "Transform.ag" #-}- _hdIcollectedConstructorNames `Set.union` _tlIcollectedConstructorNames- {-# LINE 1001 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- _hdIcollectedFields ++ _tlIcollectedFields- {-# LINE 1006 "Transform.hs" #-})- -- copy rule (down)- _hdOallConstructors =- ({-# LINE 95 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 1011 "Transform.hs" #-})- -- copy rule (down)- _hdOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1016 "Transform.hs" #-})- -- copy rule (down)- _hdOnts =- ({-# LINE 166 "Transform.ag" #-}- _lhsInts- {-# LINE 1021 "Transform.hs" #-})- -- copy rule (down)- _tlOallConstructors =- ({-# LINE 95 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 1026 "Transform.hs" #-})- -- copy rule (down)- _tlOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1031 "Transform.hs" #-})- -- copy rule (down)- _tlOnts =- ({-# LINE 166 "Transform.ag" #-}- _lhsInts- {-# LINE 1036 "Transform.hs" #-})- ( _hdIcollectedConstructorNames,_hdIcollectedFields) =- (hd_ _hdOallConstructors _hdOallNonterminals _hdOnts )- ( _tlIcollectedConstructorNames,_tlIcollectedFields) =- (tl_ _tlOallConstructors _tlOallNonterminals _tlOnts )- in ( _lhsOcollectedConstructorNames,_lhsOcollectedFields))) )-sem_Alts_Nil :: T_Alts -sem_Alts_Nil =- (T_Alts (\ _lhsIallConstructors- _lhsIallNonterminals- _lhsInts ->- (let _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- -- use rule "Transform.ag"(line 92, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 92 "Transform.ag" #-}- Set.empty- {-# LINE 1053 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 1058 "Transform.hs" #-})- in ( _lhsOcollectedConstructorNames,_lhsOcollectedFields))) )--- Attrs --------------------------------------------------------{-- visit 0:- inherited attributes:- allFields : DataTypes- allNonterminals : Set NontermIdent- nts : Set NontermIdent- chained attribute:- attrDecls : Map NontermIdent (Attributes, Attributes)- synthesized attributes:- errors : Seq Error- useMap : Map NontermIdent (Map Identifier (String,String,String))- alternatives:- alternative Attrs:- child pos : {Pos}- child inh : {AttrNames}- child chn : {AttrNames}- child syn : {AttrNames}- visit 0:- local _tup1 : _- local attrDecls : _- local errors : _- local _tup2 : _- local inherited : _- local synthesized : _- local useMap : _--}--- cata-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 (DataTypes ->- (Set NontermIdent) ->- (Map NontermIdent (Attributes, Attributes)) ->- (Set NontermIdent) ->- ( (Map NontermIdent (Attributes, Attributes)),(Seq Error),(Map NontermIdent (Map Identifier (String,String,String)))))-data Inh_Attrs = Inh_Attrs {allFields_Inh_Attrs :: !(DataTypes),allNonterminals_Inh_Attrs :: !((Set NontermIdent)),attrDecls_Inh_Attrs :: !((Map NontermIdent (Attributes, Attributes))),nts_Inh_Attrs :: !((Set NontermIdent))}-data Syn_Attrs = Syn_Attrs {attrDecls_Syn_Attrs :: !((Map NontermIdent (Attributes, Attributes))),errors_Syn_Attrs :: !((Seq Error)),useMap_Syn_Attrs :: !((Map NontermIdent (Map Identifier (String,String,String))))}-wrap_Attrs :: T_Attrs ->- Inh_Attrs ->- Syn_Attrs -wrap_Attrs (T_Attrs sem ) (Inh_Attrs _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsInts ) =- (let ( _lhsOattrDecls,_lhsOerrors,_lhsOuseMap) =- (sem _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsInts )- in (Syn_Attrs _lhsOattrDecls _lhsOerrors _lhsOuseMap ))-sem_Attrs_Attrs :: Pos ->- AttrNames ->- AttrNames ->- AttrNames ->- T_Attrs -sem_Attrs_Attrs pos_ inh_ chn_ syn_ =- (T_Attrs (\ _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsInts ->- (let _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOerrors :: (Seq Error)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- -- "Transform.ag"(line 887, column 15)- __tup1 =- ({-# LINE 887 "Transform.ag" #-}- checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls- {-# LINE 1124 "Transform.hs" #-})- -- "Transform.ag"(line 887, column 15)- (_attrDecls,_) =- ({-# LINE 887 "Transform.ag" #-}- __tup1- {-# LINE 1129 "Transform.hs" #-})- -- "Transform.ag"(line 887, column 15)- (_,_errors) =- ({-# LINE 887 "Transform.ag" #-}- __tup1- {-# LINE 1134 "Transform.hs" #-})- -- "Transform.ag"(line 889, column 15)- __tup2 =- ({-# LINE 889 "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 (n,(e1,e2,_)) = not (null e1 || null e2)- in (inh++chn,chn++syn, Map.fromList (Prelude.filter isUse (uses1++uses2)))- {-# LINE 1146 "Transform.hs" #-})- -- "Transform.ag"(line 889, column 15)- (_inherited,_,_) =- ({-# LINE 889 "Transform.ag" #-}- __tup2- {-# LINE 1151 "Transform.hs" #-})- -- "Transform.ag"(line 889, column 15)- (_,_synthesized,_) =- ({-# LINE 889 "Transform.ag" #-}- __tup2- {-# LINE 1156 "Transform.hs" #-})- -- "Transform.ag"(line 889, column 15)- (_,_,_useMap) =- ({-# LINE 889 "Transform.ag" #-}- __tup2- {-# LINE 1161 "Transform.hs" #-})- -- "Transform.ag"(line 897, column 11)- _lhsOuseMap =- ({-# LINE 897 "Transform.ag" #-}- Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))- {-# LINE 1166 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _errors- {-# LINE 1171 "Transform.hs" #-})- -- copy rule (from local)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _attrDecls- {-# LINE 1176 "Transform.hs" #-})- in ( _lhsOattrDecls,_lhsOerrors,_lhsOuseMap))) )--- ConstructorSet -----------------------------------------------{-- visit 0:- synthesized attributes:- collectedConstructorNames : Set ConstructorIdent- constructors : (Set ConstructorIdent->Set ConstructorIdent)- errors : Seq Error- alternatives:- alternative CAll:- alternative CDifference:- child set1 : ConstructorSet - child set2 : ConstructorSet - alternative CName:- child name : {ConstructorIdent}- alternative CUnion:- child set1 : ConstructorSet - child set2 : ConstructorSet --}--- cata-sem_ConstructorSet :: ConstructorSet ->- T_ConstructorSet -sem_ConstructorSet (CAll ) =- (sem_ConstructorSet_CAll )-sem_ConstructorSet (CDifference _set1 _set2 ) =- (sem_ConstructorSet_CDifference (sem_ConstructorSet _set1 ) (sem_ConstructorSet _set2 ) )-sem_ConstructorSet (CName _name ) =- (sem_ConstructorSet_CName _name )-sem_ConstructorSet (CUnion _set1 _set2 ) =- (sem_ConstructorSet_CUnion (sem_ConstructorSet _set1 ) (sem_ConstructorSet _set2 ) )--- semantic domain-newtype T_ConstructorSet = T_ConstructorSet (( (Set ConstructorIdent),((Set ConstructorIdent->Set ConstructorIdent)),(Seq Error)))-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))}-wrap_ConstructorSet :: T_ConstructorSet ->- Inh_ConstructorSet ->- Syn_ConstructorSet -wrap_ConstructorSet (T_ConstructorSet sem ) (Inh_ConstructorSet ) =- (let ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors) =- (sem )- in (Syn_ConstructorSet _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors ))-sem_ConstructorSet_CAll :: T_ConstructorSet -sem_ConstructorSet_CAll =- (T_ConstructorSet (let _lhsOconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _lhsOerrors :: (Seq Error)- -- "Transform.ag"(line 691, column 17)- _lhsOconstructors =- ({-# LINE 691 "Transform.ag" #-}- \ds -> ds- {-# LINE 1227 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 92 "Transform.ag" #-}- Set.empty- {-# LINE 1232 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 1237 "Transform.hs" #-})- in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)) )-sem_ConstructorSet_CDifference :: T_ConstructorSet ->- T_ConstructorSet ->- T_ConstructorSet -sem_ConstructorSet_CDifference (T_ConstructorSet set1_ ) (T_ConstructorSet set2_ ) =- (T_ConstructorSet (let _lhsOconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _lhsOerrors :: (Seq Error)- _set1IcollectedConstructorNames :: (Set ConstructorIdent)- _set1Iconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _set1Ierrors :: (Seq Error)- _set2IcollectedConstructorNames :: (Set ConstructorIdent)- _set2Iconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _set2Ierrors :: (Seq Error)- -- "Transform.ag"(line 690, column 17)- _lhsOconstructors =- ({-# LINE 690 "Transform.ag" #-}- \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds- {-# LINE 1256 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 92 "Transform.ag" #-}- _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames- {-# LINE 1261 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 1266 "Transform.hs" #-})- ( _set1IcollectedConstructorNames,_set1Iconstructors,_set1Ierrors) =- (set1_ )- ( _set2IcollectedConstructorNames,_set2Iconstructors,_set2Ierrors) =- (set2_ )- in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)) )-sem_ConstructorSet_CName :: ConstructorIdent ->- T_ConstructorSet -sem_ConstructorSet_CName name_ =- (T_ConstructorSet (let _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _lhsOconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _lhsOerrors :: (Seq Error)- -- "Transform.ag"(line 539, column 11)- _lhsOcollectedConstructorNames =- ({-# LINE 539 "Transform.ag" #-}- Set.singleton name_- {-# LINE 1282 "Transform.hs" #-})- -- "Transform.ag"(line 688, column 17)- _lhsOconstructors =- ({-# LINE 688 "Transform.ag" #-}- \ds -> Set.singleton name_- {-# LINE 1287 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 1292 "Transform.hs" #-})- in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)) )-sem_ConstructorSet_CUnion :: T_ConstructorSet ->- T_ConstructorSet ->- T_ConstructorSet -sem_ConstructorSet_CUnion (T_ConstructorSet set1_ ) (T_ConstructorSet set2_ ) =- (T_ConstructorSet (let _lhsOconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _lhsOcollectedConstructorNames :: (Set ConstructorIdent)- _lhsOerrors :: (Seq Error)- _set1IcollectedConstructorNames :: (Set ConstructorIdent)- _set1Iconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _set1Ierrors :: (Seq Error)- _set2IcollectedConstructorNames :: (Set ConstructorIdent)- _set2Iconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _set2Ierrors :: (Seq Error)- -- "Transform.ag"(line 689, column 17)- _lhsOconstructors =- ({-# LINE 689 "Transform.ag" #-}- \ds -> _set1Iconstructors ds `Set.union` _set2Iconstructors ds- {-# LINE 1311 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 92 "Transform.ag" #-}- _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames- {-# LINE 1316 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 1321 "Transform.hs" #-})- ( _set1IcollectedConstructorNames,_set1Iconstructors,_set1Ierrors) =- (set1_ )- ( _set2IcollectedConstructorNames,_set2Iconstructors,_set2Ierrors) =- (set2_ )- in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)) )--- Elem ---------------------------------------------------------{-- visit 0:- inherited attributes:- allAttrDecls : Map NontermIdent (Attributes, Attributes)- allConstructors : Map NontermIdent (Set ConstructorIdent)- allFields : DataTypes- allNonterminals : Set NontermIdent- definedSets : DefinedSets- chained attributes:- attrDecls : Map NontermIdent (Attributes, Attributes)- defSets : Map Identifier (Set NontermIdent,Set Identifier)- synthesized attributes:- attrOrderCollect : AttrOrderMap- blocks : Blocks- collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)- collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]- collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]- collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- collectedNames : Set Identifier- collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]- collectedSetNames : Set Identifier- collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]- collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- ctxCollect : ContextMap- derivings : Derivings- errors : Seq Error- moduleDecl : Maybe (String,String,String)- paramsCollect : ParamMap- pragmas : Options -> Options- semPragmasCollect : PragmaMap- typeSyns : TypeSyns- useMap : Map NontermIdent (Map Identifier (String,String,String))- wrappers : Set NontermIdent- alternatives:- alternative Attr:- child pos : {Pos}- child ctx : {ClassContext}- child names : NontSet - child attrs : Attrs - alternative Data:- child pos : {Pos}- child ctx : {ClassContext}- child names : NontSet - child params : {[Identifier]}- child attrs : Attrs - child alts : Alts - child ext : {Bool}- alternative Deriving:- child pos : {Pos}- child set : NontSet - child classes : {[NontermIdent]}- alternative Module:- child pos : {Pos}- child name : {String}- child exports : {String}- child imports : {String}- alternative Pragma:- child pos : {Pos}- child names : {[NontermIdent]}- alternative Sem:- child pos : {Pos}- child ctx : {ClassContext}- child names : NontSet - child attrs : Attrs - child alts : SemAlts - alternative Set:- child pos : {Pos}- child name : {NontermIdent}- child set : NontSet - visit 0:- local _tup3 : _- local defSets2 : _- local errs : _- alternative Txt:- child pos : {Pos}- child name : {Identifier}- child mbNt : {Maybe NontermIdent}- child lines : {[String]}- visit 0:- local blockInfo : _- local blockValue : _- alternative Type:- child pos : {Pos}- child ctx : {ClassContext}- child name : {NontermIdent}- child params : {[Identifier]}- child type : {ComplexType}- visit 0:- local expanded : _- local argType : _- alternative Wrapper:- child pos : {Pos}- child set : NontSet --}--- cata-sem_Elem :: Elem ->- T_Elem -sem_Elem (Attr _pos _ctx _names _attrs ) =- (sem_Elem_Attr _pos _ctx (sem_NontSet _names ) (sem_Attrs _attrs ) )-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 (Deriving _pos _set _classes ) =- (sem_Elem_Deriving _pos (sem_NontSet _set ) _classes )-sem_Elem (Module _pos _name _exports _imports ) =- (sem_Elem_Module _pos _name _exports _imports )-sem_Elem (Pragma _pos _names ) =- (sem_Elem_Pragma _pos _names )-sem_Elem (Sem _pos _ctx _names _attrs _alts ) =- (sem_Elem_Sem _pos _ctx (sem_NontSet _names ) (sem_Attrs _attrs ) (sem_SemAlts _alts ) )-sem_Elem (Set _pos _name _set ) =- (sem_Elem_Set _pos _name (sem_NontSet _set ) )-sem_Elem (Txt _pos _name _mbNt _lines ) =- (sem_Elem_Txt _pos _name _mbNt _lines )-sem_Elem (Type _pos _ctx _name _params _type ) =- (sem_Elem_Type _pos _ctx _name _params _type )-sem_Elem (Wrapper _pos _set ) =- (sem_Elem_Wrapper _pos (sem_NontSet _set ) )--- semantic domain-newtype T_Elem = T_Elem ((Map NontermIdent (Attributes, Attributes)) ->- (Map NontermIdent (Set ConstructorIdent)) ->- DataTypes ->- (Set NontermIdent) ->- (Map NontermIdent (Attributes, Attributes)) ->- (Map Identifier (Set NontermIdent,Set Identifier)) ->- DefinedSets ->- ( (Map NontermIdent (Attributes, Attributes)),AttrOrderMap,Blocks,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (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),PragmaMap,TypeSyns,(Map NontermIdent (Map Identifier (String,String,String))),(Set NontermIdent)))-data Inh_Elem = Inh_Elem {allAttrDecls_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))),defSets_Inh_Elem :: !((Map Identifier (Set NontermIdent,Set Identifier))),definedSets_Inh_Elem :: !(DefinedSets)}-data Syn_Elem = Syn_Elem {attrDecls_Syn_Elem :: !((Map NontermIdent (Attributes, Attributes))),attrOrderCollect_Syn_Elem :: !(AttrOrderMap),blocks_Syn_Elem :: !(Blocks),collectedArounds_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedConstructorsMap_Syn_Elem :: !((Map NontermIdent (Set ConstructorIdent))),collectedFields_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedInsts_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),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)),semPragmasCollect_Syn_Elem :: !(PragmaMap),typeSyns_Syn_Elem :: !(TypeSyns),useMap_Syn_Elem :: !((Map NontermIdent (Map Identifier (String,String,String)))),wrappers_Syn_Elem :: !((Set NontermIdent))}-wrap_Elem :: T_Elem ->- Inh_Elem ->- Syn_Elem -wrap_Elem (T_Elem sem ) (Inh_Elem _lhsIallAttrDecls _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIdefSets _lhsIdefinedSets ) =- (let ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers) =- (sem _lhsIallAttrDecls _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIdefSets _lhsIdefinedSets )- in (Syn_Elem _lhsOattrDecls _lhsOattrOrderCollect _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers ))-sem_Elem_Attr :: Pos ->- ClassContext ->- T_NontSet ->- T_Attrs ->- T_Elem -sem_Elem_Attr pos_ ctx_ (T_NontSet names_ ) (T_Attrs attrs_ ) =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOctxCollect :: ContextMap- _attrsOnts :: (Set NontermIdent)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _namesOallFields :: DataTypes- _namesOallNonterminals :: (Set NontermIdent)- _namesOdefinedSets :: DefinedSets- _attrsOallFields :: DataTypes- _attrsOallNonterminals :: (Set NontermIdent)- _attrsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _namesIcollectedNames :: (Set Identifier)- _namesIerrors :: (Seq Error)- _namesInontSet :: (Set NontermIdent)- _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _attrsIerrors :: (Seq Error)- _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- -- "Transform.ag"(line 839, column 7)- _lhsOctxCollect =- ({-# LINE 839 "Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 1522 "Transform.hs" #-})- -- "Transform.ag"(line 883, column 10)- _attrsOnts =- ({-# LINE 883 "Transform.ag" #-}- _namesInontSet- {-# LINE 1527 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 1532 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 1537 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 1542 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 1547 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 1552 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 1557 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 1562 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 1567 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _namesIcollectedNames- {-# LINE 1572 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 1577 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 1582 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 1587 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 1592 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 1597 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _namesIerrors Seq.>< _attrsIerrors- {-# LINE 1602 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 1607 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- Map.empty- {-# LINE 1612 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 1617 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 1622 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 1627 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- _attrsIuseMap- {-# LINE 1632 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 1637 "Transform.hs" #-})- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _attrsIattrDecls- {-# LINE 1642 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 1647 "Transform.hs" #-})- -- copy rule (down)- _namesOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 1652 "Transform.hs" #-})- -- copy rule (down)- _namesOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1657 "Transform.hs" #-})- -- copy rule (down)- _namesOdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 1662 "Transform.hs" #-})- -- copy rule (down)- _attrsOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 1667 "Transform.hs" #-})- -- copy rule (down)- _attrsOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1672 "Transform.hs" #-})- -- copy rule (down)- _attrsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 1677 "Transform.hs" #-})- ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =- (names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets )- ( _attrsIattrDecls,_attrsIerrors,_attrsIuseMap) =- (attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOnts )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Data :: Pos ->- ClassContext ->- T_NontSet ->- ([Identifier]) ->- T_Attrs ->- T_Alts ->- Bool ->- T_Elem -sem_Elem_Data pos_ ctx_ (T_NontSet names_ ) params_ (T_Attrs attrs_ ) (T_Alts alts_ ) ext_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _altsOnts :: (Set NontermIdent)- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOparamsCollect :: ParamMap- _lhsOctxCollect :: ContextMap- _attrsOnts :: (Set NontermIdent)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _namesOallFields :: DataTypes- _namesOallNonterminals :: (Set NontermIdent)- _namesOdefinedSets :: DefinedSets- _attrsOallFields :: DataTypes- _attrsOallNonterminals :: (Set NontermIdent)- _attrsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _altsOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _altsOallNonterminals :: (Set NontermIdent)- _namesIcollectedNames :: (Set Identifier)- _namesIerrors :: (Seq Error)- _namesInontSet :: (Set NontermIdent)- _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _attrsIerrors :: (Seq Error)- _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _altsIcollectedConstructorNames :: (Set ConstructorIdent)- _altsIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- -- "Transform.ag"(line 169, column 10)- _altsOnts =- ({-# LINE 169 "Transform.ag" #-}- _namesInontSet- {-# LINE 1746 "Transform.hs" #-})- -- "Transform.ag"(line 545, column 11)- _lhsOcollectedConstructorsMap =- ({-# LINE 545 "Transform.ag" #-}- Map.fromList- [ (n, _altsIcollectedConstructorNames)- | n <- Set.toList _namesInontSet- ]- {-# LINE 1754 "Transform.hs" #-})- -- "Transform.ag"(line 816, column 7)- _lhsOparamsCollect =- ({-# LINE 816 "Transform.ag" #-}- if null params_- then Map.empty- else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]- {-# LINE 1761 "Transform.hs" #-})- -- "Transform.ag"(line 839, column 7)- _lhsOctxCollect =- ({-# LINE 839 "Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 1768 "Transform.hs" #-})- -- "Transform.ag"(line 882, column 10)- _attrsOnts =- ({-# LINE 882 "Transform.ag" #-}- _namesInontSet- {-# LINE 1773 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 1778 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 1783 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 1788 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 1793 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- _altsIcollectedFields- {-# LINE 1798 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 1803 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 1808 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _namesIcollectedNames- {-# LINE 1813 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 1818 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 1823 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 1828 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 1833 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 1838 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _namesIerrors Seq.>< _attrsIerrors- {-# LINE 1843 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 1848 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 1853 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 1858 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 1863 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- _attrsIuseMap- {-# LINE 1868 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 1873 "Transform.hs" #-})- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _attrsIattrDecls- {-# LINE 1878 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 1883 "Transform.hs" #-})- -- copy rule (down)- _namesOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 1888 "Transform.hs" #-})- -- copy rule (down)- _namesOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1893 "Transform.hs" #-})- -- copy rule (down)- _namesOdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 1898 "Transform.hs" #-})- -- copy rule (down)- _attrsOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 1903 "Transform.hs" #-})- -- copy rule (down)- _attrsOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1908 "Transform.hs" #-})- -- copy rule (down)- _attrsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 1913 "Transform.hs" #-})- -- copy rule (down)- _altsOallConstructors =- ({-# LINE 95 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 1918 "Transform.hs" #-})- -- copy rule (down)- _altsOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1923 "Transform.hs" #-})- ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =- (names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets )- ( _attrsIattrDecls,_attrsIerrors,_attrsIuseMap) =- (attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOnts )- ( _altsIcollectedConstructorNames,_altsIcollectedFields) =- (alts_ _altsOallConstructors _altsOallNonterminals _altsOnts )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Deriving :: Pos ->- T_NontSet ->- ([NontermIdent]) ->- T_Elem -sem_Elem_Deriving pos_ (T_NontSet set_ ) classes_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOderivings :: Derivings- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _setOallFields :: DataTypes- _setOallNonterminals :: (Set NontermIdent)- _setOdefinedSets :: DefinedSets- _setIcollectedNames :: (Set Identifier)- _setIerrors :: (Seq Error)- _setInontSet :: (Set NontermIdent)- -- "Transform.ag"(line 867, column 14)- _lhsOderivings =- ({-# LINE 867 "Transform.ag" #-}- Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]- {-# LINE 1978 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 1983 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 1988 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 1993 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 1998 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 2003 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 2008 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 2013 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 2018 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _setIcollectedNames- {-# LINE 2023 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 2028 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 2033 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 2038 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 2043 "Transform.hs" #-})- -- use rule "Transform.ag"(line 835, column 34)- _lhsOctxCollect =- ({-# LINE 835 "Transform.ag" #-}- Map.empty- {-# LINE 2048 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _setIerrors- {-# LINE 2053 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 2058 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- Map.empty- {-# LINE 2063 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 2068 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 2073 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 2078 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- Map.empty- {-# LINE 2083 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 2088 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2093 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 2098 "Transform.hs" #-})- -- copy rule (down)- _setOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2103 "Transform.hs" #-})- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2108 "Transform.hs" #-})- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 2113 "Transform.hs" #-})- ( _setIcollectedNames,_setIerrors,_setInontSet) =- (set_ _setOallFields _setOallNonterminals _setOdefinedSets )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Module :: Pos ->- String ->- String ->- String ->- T_Elem -sem_Elem_Module pos_ name_ exports_ imports_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- "Transform.ag"(line 1045, column 7)- _lhsOmoduleDecl =- ({-# LINE 1045 "Transform.ag" #-}- Just (name_, exports_, imports_)- {-# LINE 2159 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 2164 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 2169 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 2174 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 2179 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 2184 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 2189 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 2194 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 2199 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- Set.empty- {-# LINE 2204 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 2209 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 2214 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 2219 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 2224 "Transform.hs" #-})- -- use rule "Transform.ag"(line 835, column 34)- _lhsOctxCollect =- ({-# LINE 835 "Transform.ag" #-}- Map.empty- {-# LINE 2229 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 2234 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 2239 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- Map.empty- {-# LINE 2244 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 2249 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 2254 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 2259 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- Map.empty- {-# LINE 2264 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 2269 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2274 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 2279 "Transform.hs" #-})- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Pragma :: Pos ->- ([NontermIdent]) ->- T_Elem -sem_Elem_Pragma pos_ names_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOpragmas :: (Options -> Options)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- "Transform.ag"(line 709, column 13)- _lhsOpragmas =- ({-# LINE 709 "Transform.ag" #-}- let mk n o = case getName n of- "gencatas" -> o { folds = True }- "nogencatas" -> o { folds = False }- "gendatas" -> o { dataTypes = 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" -> o { sepSemMods = True }- "genlinepragmas" -> o { genLinePragmas = True }- "newtypes" -> o { newtypes = True }- "nonewtypes" -> o { newtypes = False }- _ -> o- in \o -> foldr mk o names_- {-# LINE 2362 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 2367 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 2372 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 2377 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 2382 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 2387 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 2392 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 2397 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 2402 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- Set.empty- {-# LINE 2407 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 2412 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 2417 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 2422 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 2427 "Transform.hs" #-})- -- use rule "Transform.ag"(line 835, column 34)- _lhsOctxCollect =- ({-# LINE 835 "Transform.ag" #-}- Map.empty- {-# LINE 2432 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 2437 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 2442 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 2447 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- Map.empty- {-# LINE 2452 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 2457 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 2462 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- Map.empty- {-# LINE 2467 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 2472 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2477 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 2482 "Transform.hs" #-})- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Sem :: Pos ->- ClassContext ->- T_NontSet ->- T_Attrs ->- T_SemAlts ->- T_Elem -sem_Elem_Sem pos_ ctx_ (T_NontSet names_ ) (T_Attrs attrs_ ) (T_SemAlts alts_ ) =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _altsOnts :: (Set NontermIdent)- _lhsOctxCollect :: ContextMap- _attrsOnts :: (Set NontermIdent)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _namesOallFields :: DataTypes- _namesOallNonterminals :: (Set NontermIdent)- _namesOdefinedSets :: DefinedSets- _attrsOallFields :: DataTypes- _attrsOallNonterminals :: (Set NontermIdent)- _attrsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _altsOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _altsOallFields :: DataTypes- _namesIcollectedNames :: (Set Identifier)- _namesIerrors :: (Seq Error)- _namesInontSet :: (Set NontermIdent)- _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _attrsIerrors :: (Seq Error)- _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _altsIattrOrderCollect :: AttrOrderMap- _altsIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _altsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _altsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _altsIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _altsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _altsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _altsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _altsIerrors :: (Seq Error)- _altsIsemPragmasCollect :: PragmaMap- -- "Transform.ag"(line 170, column 10)- _altsOnts =- ({-# LINE 170 "Transform.ag" #-}- _namesInontSet- {-# LINE 2553 "Transform.hs" #-})- -- "Transform.ag"(line 839, column 7)- _lhsOctxCollect =- ({-# LINE 839 "Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 2560 "Transform.hs" #-})- -- "Transform.ag"(line 884, column 10)- _attrsOnts =- ({-# LINE 884 "Transform.ag" #-}- _namesInontSet- {-# LINE 2565 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- _altsIattrOrderCollect- {-# LINE 2570 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 2575 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- _altsIcollectedArounds- {-# LINE 2580 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- _altsIcollectedAugments- {-# LINE 2585 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 2590 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 2595 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- _altsIcollectedInsts- {-# LINE 2600 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- _altsIcollectedMerges- {-# LINE 2605 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _namesIcollectedNames- {-# LINE 2610 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- _altsIcollectedRules- {-# LINE 2615 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 2620 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- _altsIcollectedSigs- {-# LINE 2625 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- _altsIcollectedUniques- {-# LINE 2630 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 2635 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors- {-# LINE 2640 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 2645 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- Map.empty- {-# LINE 2650 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 2655 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- _altsIsemPragmasCollect- {-# LINE 2660 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 2665 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- _attrsIuseMap- {-# LINE 2670 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 2675 "Transform.hs" #-})- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _attrsIattrDecls- {-# LINE 2680 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 2685 "Transform.hs" #-})- -- copy rule (down)- _namesOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2690 "Transform.hs" #-})- -- copy rule (down)- _namesOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2695 "Transform.hs" #-})- -- copy rule (down)- _namesOdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 2700 "Transform.hs" #-})- -- copy rule (down)- _attrsOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2705 "Transform.hs" #-})- -- copy rule (down)- _attrsOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2710 "Transform.hs" #-})- -- copy rule (down)- _attrsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2715 "Transform.hs" #-})- -- copy rule (down)- _altsOallAttrDecls =- ({-# LINE 781 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 2720 "Transform.hs" #-})- -- copy rule (down)- _altsOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2725 "Transform.hs" #-})- ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =- (names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets )- ( _attrsIattrDecls,_attrsIerrors,_attrsIuseMap) =- (attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOnts )- ( _altsIattrOrderCollect,_altsIcollectedArounds,_altsIcollectedAugments,_altsIcollectedInsts,_altsIcollectedMerges,_altsIcollectedRules,_altsIcollectedSigs,_altsIcollectedUniques,_altsIerrors,_altsIsemPragmasCollect) =- (alts_ _altsOallAttrDecls _altsOallFields _altsOnts )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Set :: Pos ->- NontermIdent ->- T_NontSet ->- T_Elem -sem_Elem_Set pos_ name_ (T_NontSet set_ ) =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOcollectedSetNames :: (Set Identifier)- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _lhsOerrors :: (Seq Error)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _setOallFields :: DataTypes- _setOallNonterminals :: (Set NontermIdent)- _setOdefinedSets :: DefinedSets- _setIcollectedNames :: (Set Identifier)- _setIerrors :: (Seq Error)- _setInontSet :: (Set NontermIdent)- -- "Transform.ag"(line 522, column 10)- _lhsOcollectedSetNames =- ({-# LINE 522 "Transform.ag" #-}- Set.singleton name_- {-# LINE 2780 "Transform.hs" #-})- -- "Transform.ag"(line 629, column 13)- __tup3 =- ({-# LINE 629 "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) = checkDuplicate DupSet name_ (nontSet,Set.insert name_ allUsedNames) _lhsIdefSets- in (res, e1 Seq.>< e2)- {-# LINE 2794 "Transform.hs" #-})- -- "Transform.ag"(line 629, column 13)- (_defSets2,_) =- ({-# LINE 629 "Transform.ag" #-}- __tup3- {-# LINE 2799 "Transform.hs" #-})- -- "Transform.ag"(line 629, column 13)- (_,_errs) =- ({-# LINE 629 "Transform.ag" #-}- __tup3- {-# LINE 2804 "Transform.hs" #-})- -- "Transform.ag"(line 639, column 9)- _lhsOdefSets =- ({-# LINE 639 "Transform.ag" #-}- _defSets2- {-# LINE 2809 "Transform.hs" #-})- -- "Transform.ag"(line 639, column 9)- _lhsOerrors =- ({-# LINE 640 "Transform.ag" #-}- _errs >< _setIerrors- {-# LINE 2814 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 2819 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 2824 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 2829 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 2834 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 2839 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 2844 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 2849 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 2854 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _setIcollectedNames- {-# LINE 2859 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 2864 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 2869 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 2874 "Transform.hs" #-})- -- use rule "Transform.ag"(line 835, column 34)- _lhsOctxCollect =- ({-# LINE 835 "Transform.ag" #-}- Map.empty- {-# LINE 2879 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 2884 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 2889 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- Map.empty- {-# LINE 2894 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 2899 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 2904 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 2909 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- Map.empty- {-# LINE 2914 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 2919 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2924 "Transform.hs" #-})- -- copy rule (down)- _setOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2929 "Transform.hs" #-})- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2934 "Transform.hs" #-})- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 2939 "Transform.hs" #-})- ( _setIcollectedNames,_setIerrors,_setInontSet) =- (set_ _setOallFields _setOallNonterminals _setOdefinedSets )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Txt :: Pos ->- Identifier ->- (Maybe NontermIdent) ->- ([String]) ->- T_Elem -sem_Elem_Txt pos_ name_ mbNt_ lines_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOblocks :: Blocks- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- "Transform.ag"(line 179, column 10)- _blockInfo =- ({-# LINE 179 "Transform.ag" #-}- ( let nm = getName name_- in if nm == "imports"- then BlockImport- else if nm == "optpragmas"- then BlockPragma- else BlockOther- , mbNt_- )- {-# LINE 2992 "Transform.hs" #-})- -- "Transform.ag"(line 187, column 10)- _blockValue =- ({-# LINE 187 "Transform.ag" #-}- [(lines_, pos_)]- {-# LINE 2997 "Transform.hs" #-})- -- "Transform.ag"(line 188, column 10)- _lhsOblocks =- ({-# LINE 188 "Transform.ag" #-}- Map.singleton _blockInfo _blockValue- {-# LINE 3002 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 3007 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 3012 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 3017 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 3022 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 3027 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 3032 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 3037 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- Set.empty- {-# LINE 3042 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 3047 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 3052 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 3057 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 3062 "Transform.hs" #-})- -- use rule "Transform.ag"(line 835, column 34)- _lhsOctxCollect =- ({-# LINE 835 "Transform.ag" #-}- Map.empty- {-# LINE 3067 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 3072 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 3077 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 3082 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- Map.empty- {-# LINE 3087 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 3092 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 3097 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 3102 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- Map.empty- {-# LINE 3107 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 3112 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3117 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 3122 "Transform.hs" #-})- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Type :: Pos ->- ClassContext ->- NontermIdent ->- ([Identifier]) ->- ComplexType ->- T_Elem -sem_Elem_Type pos_ ctx_ name_ params_ type_ =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedNames :: (Set Identifier)- _lhsOtypeSyns :: TypeSyns- _lhsOparamsCollect :: ParamMap- _lhsOctxCollect :: ContextMap- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- "Transform.ag"(line 241, column 10)- _lhsOcollectedFields =- ({-# LINE 241 "Transform.ag" #-}- map (\(x,y)->(name_, x, y)) _expanded- {-# LINE 3167 "Transform.hs" #-})- -- "Transform.ag"(line 525, column 11)- _lhsOcollectedNames =- ({-# LINE 525 "Transform.ag" #-}- Set.singleton name_- {-# LINE 3172 "Transform.hs" #-})- -- "Transform.ag"(line 579, column 11)- _expanded =- ({-# LINE 579 "Transform.ag" #-}- case _argType of- List tp -> [(Ident "Cons" pos_, [(Ident "hd" pos_, tp)- ,(Ident "tl" pos_, NT name_ (map getName params_))- ]- )- ,(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_))- ])- , (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_))- ])- , (Ident "Nil" pos_, [])- ]- Tuple xs -> [(Ident "Tuple" pos_, xs)]- {-# LINE 3205 "Transform.hs" #-})- -- "Transform.ag"(line 608, column 11)- _argType =- ({-# LINE 608 "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)- {-# LINE 3216 "Transform.hs" #-})- -- "Transform.ag"(line 615, column 11)- _lhsOtypeSyns =- ({-# LINE 615 "Transform.ag" #-}- [(name_,_argType)]- {-# LINE 3221 "Transform.hs" #-})- -- "Transform.ag"(line 822, column 7)- _lhsOparamsCollect =- ({-# LINE 822 "Transform.ag" #-}- if null params_- then Map.empty- else Map.singleton name_ params_- {-# LINE 3228 "Transform.hs" #-})- -- "Transform.ag"(line 845, column 7)- _lhsOctxCollect =- ({-# LINE 845 "Transform.ag" #-}- if null ctx_- then Map.empty- else Map.singleton name_ ctx_- {-# LINE 3235 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 3240 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 3245 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 3250 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 3255 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 3260 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 3265 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 3270 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 3275 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 3280 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 3285 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 3290 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 3295 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 3300 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 3305 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 3310 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 3315 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- Map.empty- {-# LINE 3320 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 3325 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3330 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 3335 "Transform.hs" #-})- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elem_Wrapper :: Pos ->- T_NontSet ->- T_Elem -sem_Elem_Wrapper pos_ (T_NontSet set_ ) =- (T_Elem (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOwrappers :: (Set NontermIdent)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _setOallFields :: DataTypes- _setOallNonterminals :: (Set NontermIdent)- _setOdefinedSets :: DefinedSets- _setIcollectedNames :: (Set Identifier)- _setIerrors :: (Seq Error)- _setInontSet :: (Set NontermIdent)- -- "Transform.ag"(line 700, column 13)- _lhsOwrappers =- ({-# LINE 700 "Transform.ag" #-}- _setInontSet- {-# LINE 3383 "Transform.hs" #-})- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 3388 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 3393 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 3398 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 3403 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 3408 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 3413 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 3418 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 3423 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _setIcollectedNames- {-# LINE 3428 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 3433 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 3438 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 3443 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 3448 "Transform.hs" #-})- -- use rule "Transform.ag"(line 835, column 34)- _lhsOctxCollect =- ({-# LINE 835 "Transform.ag" #-}- Map.empty- {-# LINE 3453 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 3458 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _setIerrors- {-# LINE 3463 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 3468 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- Map.empty- {-# LINE 3473 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 3478 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 3483 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 3488 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- Map.empty- {-# LINE 3493 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3498 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 3503 "Transform.hs" #-})- -- copy rule (down)- _setOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 3508 "Transform.hs" #-})- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3513 "Transform.hs" #-})- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 3518 "Transform.hs" #-})- ( _setIcollectedNames,_setIerrors,_setInontSet) =- (set_ _setOallFields _setOallNonterminals _setOdefinedSets )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )--- Elems --------------------------------------------------------{-- visit 0:- inherited attributes:- allAttrDecls : Map NontermIdent (Attributes, Attributes)- allConstructors : Map NontermIdent (Set ConstructorIdent)- allFields : DataTypes- allNonterminals : Set NontermIdent- definedSets : DefinedSets- chained attributes:- attrDecls : Map NontermIdent (Attributes, Attributes)- defSets : Map Identifier (Set NontermIdent,Set Identifier)- synthesized attributes:- attrOrderCollect : AttrOrderMap- blocks : Blocks- collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)- collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]- collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]- collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- collectedNames : Set Identifier- collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]- collectedSetNames : Set Identifier- collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]- collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- ctxCollect : ContextMap- derivings : Derivings- errors : Seq Error- moduleDecl : Maybe (String,String,String)- paramsCollect : ParamMap- pragmas : Options -> Options- semPragmasCollect : PragmaMap- typeSyns : TypeSyns- useMap : Map NontermIdent (Map Identifier (String,String,String))- wrappers : Set NontermIdent- alternatives:- alternative Cons:- child hd : Elem - child tl : Elems - alternative Nil:--}--- cata-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 ((Map NontermIdent (Attributes, Attributes)) ->- (Map NontermIdent (Set ConstructorIdent)) ->- DataTypes ->- (Set NontermIdent) ->- (Map NontermIdent (Attributes, Attributes)) ->- (Map Identifier (Set NontermIdent,Set Identifier)) ->- DefinedSets ->- ( (Map NontermIdent (Attributes, Attributes)),AttrOrderMap,Blocks,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (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),PragmaMap,TypeSyns,(Map NontermIdent (Map Identifier (String,String,String))),(Set NontermIdent)))-data Inh_Elems = Inh_Elems {allAttrDecls_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))),defSets_Inh_Elems :: !((Map Identifier (Set NontermIdent,Set Identifier))),definedSets_Inh_Elems :: !(DefinedSets)}-data Syn_Elems = Syn_Elems {attrDecls_Syn_Elems :: !((Map NontermIdent (Attributes, Attributes))),attrOrderCollect_Syn_Elems :: !(AttrOrderMap),blocks_Syn_Elems :: !(Blocks),collectedArounds_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedConstructorsMap_Syn_Elems :: !((Map NontermIdent (Set ConstructorIdent))),collectedFields_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedInsts_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),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)),semPragmasCollect_Syn_Elems :: !(PragmaMap),typeSyns_Syn_Elems :: !(TypeSyns),useMap_Syn_Elems :: !((Map NontermIdent (Map Identifier (String,String,String)))),wrappers_Syn_Elems :: !((Set NontermIdent))}-wrap_Elems :: T_Elems ->- Inh_Elems ->- Syn_Elems -wrap_Elems (T_Elems sem ) (Inh_Elems _lhsIallAttrDecls _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIdefSets _lhsIdefinedSets ) =- (let ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers) =- (sem _lhsIallAttrDecls _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIdefSets _lhsIdefinedSets )- in (Syn_Elems _lhsOattrDecls _lhsOattrOrderCollect _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers ))-sem_Elems_Cons :: T_Elem ->- T_Elems ->- T_Elems -sem_Elems_Cons (T_Elem hd_ ) (T_Elems tl_ ) =- (T_Elems (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _hdOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _hdOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _hdOallFields :: DataTypes- _hdOallNonterminals :: (Set NontermIdent)- _hdOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _hdOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _hdOdefinedSets :: DefinedSets- _tlOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _tlOallConstructors :: (Map NontermIdent (Set ConstructorIdent))- _tlOallFields :: DataTypes- _tlOallNonterminals :: (Set NontermIdent)- _tlOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _tlOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _tlOdefinedSets :: DefinedSets- _hdIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _hdIattrOrderCollect :: AttrOrderMap- _hdIblocks :: Blocks- _hdIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _hdIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _hdIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _hdIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _hdIcollectedNames :: (Set Identifier)- _hdIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _hdIcollectedSetNames :: (Set Identifier)- _hdIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _hdIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _hdIctxCollect :: ContextMap- _hdIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _hdIderivings :: Derivings- _hdIerrors :: (Seq Error)- _hdImoduleDecl :: (Maybe (String,String,String))- _hdIparamsCollect :: ParamMap- _hdIpragmas :: (Options -> Options)- _hdIsemPragmasCollect :: PragmaMap- _hdItypeSyns :: TypeSyns- _hdIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _hdIwrappers :: (Set NontermIdent)- _tlIattrDecls :: (Map NontermIdent (Attributes, Attributes))- _tlIattrOrderCollect :: AttrOrderMap- _tlIblocks :: Blocks- _tlIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _tlIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _tlIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _tlIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _tlIcollectedNames :: (Set Identifier)- _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _tlIcollectedSetNames :: (Set Identifier)- _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _tlIctxCollect :: ContextMap- _tlIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- _tlIderivings :: Derivings- _tlIerrors :: (Seq Error)- _tlImoduleDecl :: (Maybe (String,String,String))- _tlIparamsCollect :: ParamMap- _tlIpragmas :: (Options -> Options)- _tlIsemPragmasCollect :: PragmaMap- _tlItypeSyns :: TypeSyns- _tlIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _tlIwrappers :: (Set NontermIdent)- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect- {-# LINE 3691 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- _hdIblocks `mapUnionWithPlusPlus` _tlIblocks- {-# LINE 3696 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- _hdIcollectedArounds ++ _tlIcollectedArounds- {-# LINE 3701 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- _hdIcollectedAugments ++ _tlIcollectedAugments- {-# LINE 3706 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap- {-# LINE 3711 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- _hdIcollectedFields ++ _tlIcollectedFields- {-# LINE 3716 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- _hdIcollectedInsts ++ _tlIcollectedInsts- {-# LINE 3721 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- _hdIcollectedMerges ++ _tlIcollectedMerges- {-# LINE 3726 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _hdIcollectedNames `Set.union` _tlIcollectedNames- {-# LINE 3731 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- _hdIcollectedRules ++ _tlIcollectedRules- {-# LINE 3736 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames- {-# LINE 3741 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- _hdIcollectedSigs ++ _tlIcollectedSigs- {-# LINE 3746 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- _hdIcollectedUniques ++ _tlIcollectedUniques- {-# LINE 3751 "Transform.hs" #-})- -- use rule "Transform.ag"(line 835, column 34)- _lhsOctxCollect =- ({-# LINE 835 "Transform.ag" #-}- _hdIctxCollect `mergeCtx` _tlIctxCollect- {-# LINE 3756 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- _hdIderivings `mergeDerivings` _tlIderivings- {-# LINE 3761 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 3766 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- _hdImoduleDecl `mplus` _tlImoduleDecl- {-# LINE 3771 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- _hdIparamsCollect `mergeParams` _tlIparamsCollect- {-# LINE 3776 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- _hdIpragmas . _tlIpragmas- {-# LINE 3781 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect- {-# LINE 3786 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- _hdItypeSyns ++ _tlItypeSyns- {-# LINE 3791 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- _hdIuseMap `merge` _tlIuseMap- {-# LINE 3796 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- _hdIwrappers `Set.union` _tlIwrappers- {-# LINE 3801 "Transform.hs" #-})- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _tlIattrDecls- {-# LINE 3806 "Transform.hs" #-})- -- copy rule (up)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _tlIdefSets- {-# LINE 3811 "Transform.hs" #-})- -- copy rule (down)- _hdOallAttrDecls =- ({-# LINE 781 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 3816 "Transform.hs" #-})- -- copy rule (down)- _hdOallConstructors =- ({-# LINE 95 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 3821 "Transform.hs" #-})- -- copy rule (down)- _hdOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 3826 "Transform.hs" #-})- -- copy rule (down)- _hdOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3831 "Transform.hs" #-})- -- copy rule (down)- _hdOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3836 "Transform.hs" #-})- -- copy rule (down)- _hdOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 3841 "Transform.hs" #-})- -- copy rule (down)- _hdOdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 3846 "Transform.hs" #-})- -- copy rule (down)- _tlOallAttrDecls =- ({-# LINE 781 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 3851 "Transform.hs" #-})- -- copy rule (down)- _tlOallConstructors =- ({-# LINE 95 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 3856 "Transform.hs" #-})- -- copy rule (down)- _tlOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 3861 "Transform.hs" #-})- -- copy rule (down)- _tlOallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3866 "Transform.hs" #-})- -- copy rule (chain)- _tlOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _hdIattrDecls- {-# LINE 3871 "Transform.hs" #-})- -- copy rule (chain)- _tlOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _hdIdefSets- {-# LINE 3876 "Transform.hs" #-})- -- copy rule (down)- _tlOdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 3881 "Transform.hs" #-})- ( _hdIattrDecls,_hdIattrOrderCollect,_hdIblocks,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedConstructorsMap,_hdIcollectedFields,_hdIcollectedInsts,_hdIcollectedMerges,_hdIcollectedNames,_hdIcollectedRules,_hdIcollectedSetNames,_hdIcollectedSigs,_hdIcollectedUniques,_hdIctxCollect,_hdIdefSets,_hdIderivings,_hdIerrors,_hdImoduleDecl,_hdIparamsCollect,_hdIpragmas,_hdIsemPragmasCollect,_hdItypeSyns,_hdIuseMap,_hdIwrappers) =- (hd_ _hdOallAttrDecls _hdOallConstructors _hdOallFields _hdOallNonterminals _hdOattrDecls _hdOdefSets _hdOdefinedSets )- ( _tlIattrDecls,_tlIattrOrderCollect,_tlIblocks,_tlIcollectedArounds,_tlIcollectedAugments,_tlIcollectedConstructorsMap,_tlIcollectedFields,_tlIcollectedInsts,_tlIcollectedMerges,_tlIcollectedNames,_tlIcollectedRules,_tlIcollectedSetNames,_tlIcollectedSigs,_tlIcollectedUniques,_tlIctxCollect,_tlIdefSets,_tlIderivings,_tlIerrors,_tlImoduleDecl,_tlIparamsCollect,_tlIpragmas,_tlIsemPragmasCollect,_tlItypeSyns,_tlIuseMap,_tlIwrappers) =- (tl_ _tlOallAttrDecls _tlOallConstructors _tlOallFields _tlOallNonterminals _tlOattrDecls _tlOdefSets _tlOdefinedSets )- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )-sem_Elems_Nil :: T_Elems -sem_Elems_Nil =- (T_Elems (\ _lhsIallAttrDecls- _lhsIallConstructors- _lhsIallFields- _lhsIallNonterminals- _lhsIattrDecls- _lhsIdefSets- _lhsIdefinedSets ->- (let _lhsOattrOrderCollect :: AttrOrderMap- _lhsOblocks :: Blocks- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))- _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedNames :: (Set Identifier)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSetNames :: (Set Identifier)- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOctxCollect :: ContextMap- _lhsOderivings :: Derivings- _lhsOerrors :: (Seq Error)- _lhsOmoduleDecl :: (Maybe (String,String,String))- _lhsOparamsCollect :: ParamMap- _lhsOpragmas :: (Options -> Options)- _lhsOsemPragmasCollect :: PragmaMap- _lhsOtypeSyns :: TypeSyns- _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))- _lhsOwrappers :: (Set NontermIdent)- _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))- _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 3925 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 3930 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 3935 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 3940 "Transform.hs" #-})- -- use rule "Transform.ag"(line 93, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 93 "Transform.ag" #-}- Map.empty- {-# LINE 3945 "Transform.hs" #-})- -- use rule "Transform.ag"(line 124, column 28)- _lhsOcollectedFields =- ({-# LINE 124 "Transform.ag" #-}- []- {-# LINE 3950 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 3955 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 3960 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- Set.empty- {-# LINE 3965 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 3970 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedSetNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 3975 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 3980 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 3985 "Transform.hs" #-})- -- use rule "Transform.ag"(line 835, column 34)- _lhsOctxCollect =- ({-# LINE 835 "Transform.ag" #-}- Map.empty- {-# LINE 3990 "Transform.hs" #-})- -- use rule "Transform.ag"(line 860, column 33)- _lhsOderivings =- ({-# LINE 860 "Transform.ag" #-}- Map.empty- {-# LINE 3995 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 4000 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1041, column 37)- _lhsOmoduleDecl =- ({-# LINE 1041 "Transform.ag" #-}- mzero- {-# LINE 4005 "Transform.hs" #-})- -- use rule "Transform.ag"(line 812, column 37)- _lhsOparamsCollect =- ({-# LINE 812 "Transform.ag" #-}- Map.empty- {-# LINE 4010 "Transform.hs" #-})- -- use rule "Transform.ag"(line 706, column 34)- _lhsOpragmas =- ({-# LINE 706 "Transform.ag" #-}- id- {-# LINE 4015 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 4020 "Transform.hs" #-})- -- use rule "Transform.ag"(line 566, column 32)- _lhsOtypeSyns =- ({-# LINE 566 "Transform.ag" #-}- []- {-# LINE 4025 "Transform.hs" #-})- -- use rule "Transform.ag"(line 136, column 15)- _lhsOuseMap =- ({-# LINE 136 "Transform.ag" #-}- Map.empty- {-# LINE 4030 "Transform.hs" #-})- -- use rule "Transform.ag"(line 697, column 32)- _lhsOwrappers =- ({-# LINE 697 "Transform.ag" #-}- Set.empty- {-# LINE 4035 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 135 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 4040 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 103 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 4045 "Transform.hs" #-})- in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )--- NontSet ------------------------------------------------------{-- visit 0:- inherited attributes:- allFields : DataTypes- allNonterminals : Set NontermIdent- definedSets : DefinedSets- synthesized attributes:- collectedNames : Set Identifier- errors : Seq Error- nontSet : Set NontermIdent- alternatives:- alternative All:- alternative Difference:- child set1 : NontSet - child set2 : NontSet - alternative Intersect:- child set1 : NontSet - child set2 : NontSet - alternative NamedSet:- child name : {NontermIdent}- visit 0:- local _tup4 : _- local nontSet : _- local errors : _- alternative Path:- child from : {NontermIdent}- child to : {NontermIdent}- alternative Union:- child set1 : NontSet - child set2 : NontSet --}--- cata-sem_NontSet :: NontSet ->- T_NontSet -sem_NontSet (All ) =- (sem_NontSet_All )-sem_NontSet (Difference _set1 _set2 ) =- (sem_NontSet_Difference (sem_NontSet _set1 ) (sem_NontSet _set2 ) )-sem_NontSet (Intersect _set1 _set2 ) =- (sem_NontSet_Intersect (sem_NontSet _set1 ) (sem_NontSet _set2 ) )-sem_NontSet (NamedSet _name ) =- (sem_NontSet_NamedSet _name )-sem_NontSet (Path _from _to ) =- (sem_NontSet_Path _from _to )-sem_NontSet (Union _set1 _set2 ) =- (sem_NontSet_Union (sem_NontSet _set1 ) (sem_NontSet _set2 ) )--- semantic domain-newtype T_NontSet = T_NontSet (DataTypes ->- (Set NontermIdent) ->- DefinedSets ->- ( (Set Identifier),(Seq Error),(Set NontermIdent)))-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))}-wrap_NontSet :: T_NontSet ->- Inh_NontSet ->- Syn_NontSet -wrap_NontSet (T_NontSet sem ) (Inh_NontSet _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets ) =- (let ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet) =- (sem _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets )- in (Syn_NontSet _lhsOcollectedNames _lhsOerrors _lhsOnontSet ))-sem_NontSet_All :: T_NontSet -sem_NontSet_All =- (T_NontSet (\ _lhsIallFields- _lhsIallNonterminals- _lhsIdefinedSets ->- (let _lhsOnontSet :: (Set NontermIdent)- _lhsOcollectedNames :: (Set Identifier)- _lhsOerrors :: (Seq Error)- -- "Transform.ag"(line 643, column 16)- _lhsOnontSet =- ({-# LINE 643 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4120 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- Set.empty- {-# LINE 4125 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 4130 "Transform.hs" #-})- in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )-sem_NontSet_Difference :: T_NontSet ->- T_NontSet ->- T_NontSet -sem_NontSet_Difference (T_NontSet set1_ ) (T_NontSet set2_ ) =- (T_NontSet (\ _lhsIallFields- _lhsIallNonterminals- _lhsIdefinedSets ->- (let _lhsOnontSet :: (Set NontermIdent)- _lhsOcollectedNames :: (Set Identifier)- _lhsOerrors :: (Seq Error)- _set1OallFields :: DataTypes- _set1OallNonterminals :: (Set NontermIdent)- _set1OdefinedSets :: DefinedSets- _set2OallFields :: DataTypes- _set2OallNonterminals :: (Set NontermIdent)- _set2OdefinedSets :: DefinedSets- _set1IcollectedNames :: (Set Identifier)- _set1Ierrors :: (Seq Error)- _set1InontSet :: (Set NontermIdent)- _set2IcollectedNames :: (Set Identifier)- _set2Ierrors :: (Seq Error)- _set2InontSet :: (Set NontermIdent)- -- "Transform.ag"(line 649, column 16)- _lhsOnontSet =- ({-# LINE 649 "Transform.ag" #-}- Set.difference _set1InontSet _set2InontSet- {-# LINE 4158 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# LINE 4163 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 4168 "Transform.hs" #-})- -- copy rule (down)- _set1OallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4173 "Transform.hs" #-})- -- copy rule (down)- _set1OallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4178 "Transform.hs" #-})- -- copy rule (down)- _set1OdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4183 "Transform.hs" #-})- -- copy rule (down)- _set2OallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4188 "Transform.hs" #-})- -- copy rule (down)- _set2OallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4193 "Transform.hs" #-})- -- copy rule (down)- _set2OdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4198 "Transform.hs" #-})- ( _set1IcollectedNames,_set1Ierrors,_set1InontSet) =- (set1_ _set1OallFields _set1OallNonterminals _set1OdefinedSets )- ( _set2IcollectedNames,_set2Ierrors,_set2InontSet) =- (set2_ _set2OallFields _set2OallNonterminals _set2OdefinedSets )- in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )-sem_NontSet_Intersect :: T_NontSet ->- T_NontSet ->- T_NontSet -sem_NontSet_Intersect (T_NontSet set1_ ) (T_NontSet set2_ ) =- (T_NontSet (\ _lhsIallFields- _lhsIallNonterminals- _lhsIdefinedSets ->- (let _lhsOnontSet :: (Set NontermIdent)- _lhsOcollectedNames :: (Set Identifier)- _lhsOerrors :: (Seq Error)- _set1OallFields :: DataTypes- _set1OallNonterminals :: (Set NontermIdent)- _set1OdefinedSets :: DefinedSets- _set2OallFields :: DataTypes- _set2OallNonterminals :: (Set NontermIdent)- _set2OdefinedSets :: DefinedSets- _set1IcollectedNames :: (Set Identifier)- _set1Ierrors :: (Seq Error)- _set1InontSet :: (Set NontermIdent)- _set2IcollectedNames :: (Set Identifier)- _set2Ierrors :: (Seq Error)- _set2InontSet :: (Set NontermIdent)- -- "Transform.ag"(line 648, column 16)- _lhsOnontSet =- ({-# LINE 648 "Transform.ag" #-}- Set.intersection _set1InontSet _set2InontSet- {-# LINE 4230 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# LINE 4235 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 4240 "Transform.hs" #-})- -- copy rule (down)- _set1OallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4245 "Transform.hs" #-})- -- copy rule (down)- _set1OallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4250 "Transform.hs" #-})- -- copy rule (down)- _set1OdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4255 "Transform.hs" #-})- -- copy rule (down)- _set2OallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4260 "Transform.hs" #-})- -- copy rule (down)- _set2OallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4265 "Transform.hs" #-})- -- copy rule (down)- _set2OdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4270 "Transform.hs" #-})- ( _set1IcollectedNames,_set1Ierrors,_set1InontSet) =- (set1_ _set1OallFields _set1OallNonterminals _set1OdefinedSets )- ( _set2IcollectedNames,_set2Ierrors,_set2InontSet) =- (set2_ _set2OallFields _set2OallNonterminals _set2OdefinedSets )- in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )-sem_NontSet_NamedSet :: NontermIdent ->- T_NontSet -sem_NontSet_NamedSet name_ =- (T_NontSet (\ _lhsIallFields- _lhsIallNonterminals- _lhsIdefinedSets ->- (let _lhsOcollectedNames :: (Set Identifier)- _lhsOerrors :: (Seq Error)- _lhsOnontSet :: (Set NontermIdent)- -- "Transform.ag"(line 528, column 14)- _lhsOcollectedNames =- ({-# LINE 528 "Transform.ag" #-}- Set.singleton name_- {-# LINE 4289 "Transform.hs" #-})- -- "Transform.ag"(line 644, column 20)- __tup4 =- ({-# LINE 644 "Transform.ag" #-}- case Map.lookup name_ _lhsIdefinedSets of- Nothing -> (Set.empty, Seq.singleton (UndefNont name_))- Just set -> (set, Seq.empty)- {-# LINE 4296 "Transform.hs" #-})- -- "Transform.ag"(line 644, column 20)- (_nontSet,_) =- ({-# LINE 644 "Transform.ag" #-}- __tup4- {-# LINE 4301 "Transform.hs" #-})- -- "Transform.ag"(line 644, column 20)- (_,_errors) =- ({-# LINE 644 "Transform.ag" #-}- __tup4- {-# LINE 4306 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _errors- {-# LINE 4311 "Transform.hs" #-})- -- copy rule (from local)- _lhsOnontSet =- ({-# LINE 111 "Transform.ag" #-}- _nontSet- {-# LINE 4316 "Transform.hs" #-})- in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )-sem_NontSet_Path :: NontermIdent ->- NontermIdent ->- T_NontSet -sem_NontSet_Path from_ to_ =- (T_NontSet (\ _lhsIallFields- _lhsIallNonterminals- _lhsIdefinedSets ->- (let _lhsOnontSet :: (Set NontermIdent)- _lhsOerrors :: (Seq Error)- _lhsOcollectedNames :: (Set Identifier)- -- "Transform.ag"(line 650, column 16)- _lhsOnontSet =- ({-# LINE 650 "Transform.ag" #-}- let table = flattenDatas _lhsIallFields- in path table from_ to_- {-# LINE 4333 "Transform.hs" #-})- -- "Transform.ag"(line 652, column 16)- _lhsOerrors =- ({-# LINE 652 "Transform.ag" #-}- let check name | Set.member name _lhsIallNonterminals- = Seq.empty- | otherwise = Seq.singleton (UndefNont name)- in check from_ >< check to_- {-# LINE 4341 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- Set.empty- {-# LINE 4346 "Transform.hs" #-})- in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )-sem_NontSet_Union :: T_NontSet ->- T_NontSet ->- T_NontSet -sem_NontSet_Union (T_NontSet set1_ ) (T_NontSet set2_ ) =- (T_NontSet (\ _lhsIallFields- _lhsIallNonterminals- _lhsIdefinedSets ->- (let _lhsOnontSet :: (Set NontermIdent)- _lhsOcollectedNames :: (Set Identifier)- _lhsOerrors :: (Seq Error)- _set1OallFields :: DataTypes- _set1OallNonterminals :: (Set NontermIdent)- _set1OdefinedSets :: DefinedSets- _set2OallFields :: DataTypes- _set2OallNonterminals :: (Set NontermIdent)- _set2OdefinedSets :: DefinedSets- _set1IcollectedNames :: (Set Identifier)- _set1Ierrors :: (Seq Error)- _set1InontSet :: (Set NontermIdent)- _set2IcollectedNames :: (Set Identifier)- _set2Ierrors :: (Seq Error)- _set2InontSet :: (Set NontermIdent)- -- "Transform.ag"(line 647, column 16)- _lhsOnontSet =- ({-# LINE 647 "Transform.ag" #-}- Set.union _set1InontSet _set2InontSet- {-# LINE 4374 "Transform.hs" #-})- -- use rule "Transform.ag"(line 85, column 50)- _lhsOcollectedNames =- ({-# LINE 85 "Transform.ag" #-}- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# LINE 4379 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 4384 "Transform.hs" #-})- -- copy rule (down)- _set1OallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4389 "Transform.hs" #-})- -- copy rule (down)- _set1OallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4394 "Transform.hs" #-})- -- copy rule (down)- _set1OdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4399 "Transform.hs" #-})- -- copy rule (down)- _set2OallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4404 "Transform.hs" #-})- -- copy rule (down)- _set2OallNonterminals =- ({-# LINE 87 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4409 "Transform.hs" #-})- -- copy rule (down)- _set2OdefinedSets =- ({-# LINE 106 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4414 "Transform.hs" #-})- ( _set1IcollectedNames,_set1Ierrors,_set1InontSet) =- (set1_ _set1OallFields _set1OallNonterminals _set1OdefinedSets )- ( _set2IcollectedNames,_set2Ierrors,_set2InontSet) =- (set2_ _set2OallFields _set2OallNonterminals _set2OdefinedSets )- in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )--- Pattern ------------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - definedAttrs : [AttrName]- definedInsts : [Identifier]- patunder : [AttrName]->Pattern- stpos : Pos- alternatives:- alternative Alias:- child field : {Identifier}- child attr : {Identifier}- child pat : Pattern - child parts : Patterns - visit 0:- local copy : _- alternative Constr:- child name : {ConstructorIdent}- child pats : Patterns - visit 0:- local copy : _- alternative Irrefutable:- child pat : Pattern - visit 0:- local copy : _- alternative Product:- child pos : {Pos}- child pats : Patterns - visit 0:- local copy : _- alternative Underscore:- child pos : {Pos}- visit 0:- local copy : _--}--- cata-sem_Pattern :: Pattern ->- T_Pattern -sem_Pattern (Alias _field _attr _pat _parts ) =- (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )-sem_Pattern (Constr _name _pats ) =- (sem_Pattern_Constr _name (sem_Patterns _pats ) )-sem_Pattern (Irrefutable _pat ) =- (sem_Pattern_Irrefutable (sem_Pattern _pat ) )-sem_Pattern (Product _pos _pats ) =- (sem_Pattern_Product _pos (sem_Patterns _pats ) )-sem_Pattern (Underscore _pos ) =- (sem_Pattern_Underscore _pos )--- semantic domain-newtype T_Pattern = T_Pattern (( Pattern ,([AttrName]),([Identifier]),([AttrName]->Pattern),Pos))-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)}-wrap_Pattern :: T_Pattern ->- Inh_Pattern ->- Syn_Pattern -wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =- (let ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos) =- (sem )- in (Syn_Pattern _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos ))-sem_Pattern_Alias :: Identifier ->- Identifier ->- T_Pattern ->- T_Patterns ->- T_Pattern -sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) =- (T_Pattern (let _lhsOdefinedAttrs :: ([AttrName])- _lhsOpatunder :: ([AttrName]->Pattern)- _lhsOdefinedInsts :: ([Identifier])- _lhsOstpos :: Pos- _lhsOcopy :: Pattern - _patIcopy :: Pattern - _patIdefinedAttrs :: ([AttrName])- _patIdefinedInsts :: ([Identifier])- _patIpatunder :: ([AttrName]->Pattern)- _patIstpos :: Pos- _partsIcopy :: Patterns - _partsIdefinedAttrs :: ([AttrName])- _partsIdefinedInsts :: ([Identifier])- _partsIpatunder :: ([AttrName]->Patterns)- -- "Transform.ag"(line 1017, column 11)- _lhsOdefinedAttrs =- ({-# LINE 1017 "Transform.ag" #-}- (field_, attr_) : _patIdefinedAttrs- {-# LINE 4504 "Transform.hs" #-})- -- "Transform.ag"(line 1018, column 11)- _lhsOpatunder =- ({-# LINE 1018 "Transform.ag" #-}- \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy- {-# LINE 4509 "Transform.hs" #-})- -- "Transform.ag"(line 1019, column 11)- _lhsOdefinedInsts =- ({-# LINE 1019 "Transform.ag" #-}- (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts- {-# LINE 4514 "Transform.hs" #-})- -- "Transform.ag"(line 1034, column 16)- _lhsOstpos =- ({-# LINE 1034 "Transform.ag" #-}- getPos field_- {-# LINE 4519 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 4524 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4529 "Transform.hs" #-})- ( _patIcopy,_patIdefinedAttrs,_patIdefinedInsts,_patIpatunder,_patIstpos) =- (pat_ )- ( _partsIcopy,_partsIdefinedAttrs,_partsIdefinedInsts,_partsIpatunder) =- (parts_ )- in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )-sem_Pattern_Constr :: ConstructorIdent ->- T_Patterns ->- T_Pattern -sem_Pattern_Constr name_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOpatunder :: ([AttrName]->Pattern)- _lhsOstpos :: Pos- _lhsOdefinedAttrs :: ([AttrName])- _lhsOdefinedInsts :: ([Identifier])- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - _patsIdefinedAttrs :: ([AttrName])- _patsIdefinedInsts :: ([Identifier])- _patsIpatunder :: ([AttrName]->Patterns)- -- "Transform.ag"(line 1021, column 12)- _lhsOpatunder =- ({-# LINE 1021 "Transform.ag" #-}- \us -> Constr name_ (_patsIpatunder us)- {-# LINE 4552 "Transform.hs" #-})- -- "Transform.ag"(line 1032, column 16)- _lhsOstpos =- ({-# LINE 1032 "Transform.ag" #-}- getPos name_- {-# LINE 4557 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1012, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1012 "Transform.ag" #-}- _patsIdefinedAttrs- {-# LINE 4562 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- _patsIdefinedInsts- {-# LINE 4567 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 4572 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4577 "Transform.hs" #-})- ( _patsIcopy,_patsIdefinedAttrs,_patsIdefinedInsts,_patsIpatunder) =- (pats_ )- in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )-sem_Pattern_Irrefutable :: T_Pattern ->- T_Pattern -sem_Pattern_Irrefutable (T_Pattern pat_ ) =- (T_Pattern (let _lhsOpatunder :: ([AttrName]->Pattern)- _lhsOdefinedAttrs :: ([AttrName])- _lhsOdefinedInsts :: ([Identifier])- _lhsOcopy :: Pattern - _lhsOstpos :: Pos- _patIcopy :: Pattern - _patIdefinedAttrs :: ([AttrName])- _patIdefinedInsts :: ([Identifier])- _patIpatunder :: ([AttrName]->Pattern)- _patIstpos :: Pos- -- "Transform.ag"(line 1023, column 17)- _lhsOpatunder =- ({-# LINE 1023 "Transform.ag" #-}- \us -> Irrefutable (_patIpatunder us)- {-# LINE 4598 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1012, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1012 "Transform.ag" #-}- _patIdefinedAttrs- {-# LINE 4603 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- _patIdefinedInsts- {-# LINE 4608 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 4613 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4618 "Transform.hs" #-})- -- copy rule (up)- _lhsOstpos =- ({-# LINE 1029 "Transform.ag" #-}- _patIstpos- {-# LINE 4623 "Transform.hs" #-})- ( _patIcopy,_patIdefinedAttrs,_patIdefinedInsts,_patIpatunder,_patIstpos) =- (pat_ )- in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )-sem_Pattern_Product :: Pos ->- T_Patterns ->- T_Pattern -sem_Pattern_Product pos_ (T_Patterns pats_ ) =- (T_Pattern (let _lhsOpatunder :: ([AttrName]->Pattern)- _lhsOstpos :: Pos- _lhsOdefinedAttrs :: ([AttrName])- _lhsOdefinedInsts :: ([Identifier])- _lhsOcopy :: Pattern - _patsIcopy :: Patterns - _patsIdefinedAttrs :: ([AttrName])- _patsIdefinedInsts :: ([Identifier])- _patsIpatunder :: ([AttrName]->Patterns)- -- "Transform.ag"(line 1022, column 13)- _lhsOpatunder =- ({-# LINE 1022 "Transform.ag" #-}- \us -> Product pos_ (_patsIpatunder us)- {-# LINE 4644 "Transform.hs" #-})- -- "Transform.ag"(line 1033, column 16)- _lhsOstpos =- ({-# LINE 1033 "Transform.ag" #-}- pos_- {-# LINE 4649 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1012, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1012 "Transform.ag" #-}- _patsIdefinedAttrs- {-# LINE 4654 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- _patsIdefinedInsts- {-# LINE 4659 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 4664 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4669 "Transform.hs" #-})- ( _patsIcopy,_patsIdefinedAttrs,_patsIdefinedInsts,_patsIpatunder) =- (pats_ )- in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )-sem_Pattern_Underscore :: Pos ->- T_Pattern -sem_Pattern_Underscore pos_ =- (T_Pattern (let _lhsOpatunder :: ([AttrName]->Pattern)- _lhsOstpos :: Pos- _lhsOdefinedAttrs :: ([AttrName])- _lhsOdefinedInsts :: ([Identifier])- _lhsOcopy :: Pattern - -- "Transform.ag"(line 1020, column 16)- _lhsOpatunder =- ({-# LINE 1020 "Transform.ag" #-}- \us -> _copy- {-# LINE 4685 "Transform.hs" #-})- -- "Transform.ag"(line 1035, column 16)- _lhsOstpos =- ({-# LINE 1035 "Transform.ag" #-}- pos_- {-# LINE 4690 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1012, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1012 "Transform.ag" #-}- []- {-# LINE 4695 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 4700 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Underscore pos_- {-# LINE 4705 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4710 "Transform.hs" #-})- in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )--- Patterns -----------------------------------------------------{-- visit 0:- synthesized attributes:- copy : SELF - definedAttrs : [AttrName]- definedInsts : [Identifier]- patunder : [AttrName]->Patterns- alternatives:- alternative Cons:- child hd : Pattern - child tl : Patterns - visit 0:- local copy : _- alternative Nil:- visit 0:- local copy : _--}--- cata-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 (( Patterns ,([AttrName]),([Identifier]),([AttrName]->Patterns)))-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))}-wrap_Patterns :: T_Patterns ->- Inh_Patterns ->- Syn_Patterns -wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =- (let ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder) =- (sem )- in (Syn_Patterns _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder ))-sem_Patterns_Cons :: T_Pattern ->- T_Patterns ->- T_Patterns -sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =- (T_Patterns (let _lhsOpatunder :: ([AttrName]->Patterns)- _lhsOdefinedAttrs :: ([AttrName])- _lhsOdefinedInsts :: ([Identifier])- _lhsOcopy :: Patterns - _hdIcopy :: Pattern - _hdIdefinedAttrs :: ([AttrName])- _hdIdefinedInsts :: ([Identifier])- _hdIpatunder :: ([AttrName]->Pattern)- _hdIstpos :: Pos- _tlIcopy :: Patterns - _tlIdefinedAttrs :: ([AttrName])- _tlIdefinedInsts :: ([Identifier])- _tlIpatunder :: ([AttrName]->Patterns)- -- "Transform.ag"(line 1027, column 10)- _lhsOpatunder =- ({-# LINE 1027 "Transform.ag" #-}- \us -> (_hdIpatunder us) : (_tlIpatunder us)- {-# LINE 4767 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1012, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1012 "Transform.ag" #-}- _hdIdefinedAttrs ++ _tlIdefinedAttrs- {-# LINE 4772 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 4777 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 4782 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4787 "Transform.hs" #-})- ( _hdIcopy,_hdIdefinedAttrs,_hdIdefinedInsts,_hdIpatunder,_hdIstpos) =- (hd_ )- ( _tlIcopy,_tlIdefinedAttrs,_tlIdefinedInsts,_tlIpatunder) =- (tl_ )- in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder)) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil =- (T_Patterns (let _lhsOpatunder :: ([AttrName]->Patterns)- _lhsOdefinedAttrs :: ([AttrName])- _lhsOdefinedInsts :: ([Identifier])- _lhsOcopy :: Patterns - -- "Transform.ag"(line 1026, column 9)- _lhsOpatunder =- ({-# LINE 1026 "Transform.ag" #-}- \us -> []- {-# LINE 4803 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1012, column 42)- _lhsOdefinedAttrs =- ({-# LINE 1012 "Transform.ag" #-}- []- {-# LINE 4808 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 4813 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- []- {-# LINE 4818 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4823 "Transform.hs" #-})- in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder)) )--- SemAlt -------------------------------------------------------{-- visit 0:- inherited attributes:- allAttrDecls : Map NontermIdent (Attributes, Attributes)- allFields : DataTypes- nts : Set NontermIdent- synthesized attributes:- attrOrderCollect : AttrOrderMap- collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]- collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]- collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]- collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- errors : Seq Error- semPragmasCollect : PragmaMap- alternatives:- alternative SemAlt:- child pos : {Pos}- child constructorSet : ConstructorSet - child rules : SemDefs - visit 0:- local pragmaNames : _- local attrOrders : _- local coninfo : _--}--- cata-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 ((Map NontermIdent (Attributes, Attributes)) ->- DataTypes ->- (Set NontermIdent) ->- ( 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))-data Inh_SemAlt = Inh_SemAlt {allAttrDecls_Inh_SemAlt :: !((Map NontermIdent (Attributes, Attributes))),allFields_Inh_SemAlt :: !(DataTypes),nts_Inh_SemAlt :: !((Set NontermIdent))}-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)}-wrap_SemAlt :: T_SemAlt ->- Inh_SemAlt ->- Syn_SemAlt -wrap_SemAlt (T_SemAlt sem ) (Inh_SemAlt _lhsIallAttrDecls _lhsIallFields _lhsInts ) =- (let ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) =- (sem _lhsIallAttrDecls _lhsIallFields _lhsInts )- in (Syn_SemAlt _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect ))-sem_SemAlt_SemAlt :: Pos ->- T_ConstructorSet ->- T_SemDefs ->- T_SemAlt -sem_SemAlt_SemAlt pos_ (T_ConstructorSet constructorSet_ ) (T_SemDefs rules_ ) =- (T_SemAlt (\ _lhsIallAttrDecls- _lhsIallFields- _lhsInts ->- (let _lhsOsemPragmasCollect :: PragmaMap- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOerrors :: (Seq Error)- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _constructorSetIcollectedConstructorNames :: (Set ConstructorIdent)- _constructorSetIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))- _constructorSetIerrors :: (Seq Error)- _rulesIaroundInfos :: ([AroundInfo])- _rulesIaugmentInfos :: ([AugmentInfo])- _rulesIdefinedInsts :: ([Identifier])- _rulesImergeInfos :: ([MergeInfo])- _rulesIorderDepsCollect :: (Set Dependency)- _rulesIpragmaNamesCollect :: ([Identifier])- _rulesIruleInfos :: ([RuleInfo])- _rulesIsigInfos :: ([SigInfo])- _rulesIuniqueInfos :: ([UniqueInfo])- -- "Transform.ag"(line 756, column 7)- _pragmaNames =- ({-# LINE 756 "Transform.ag" #-}- Set.fromList _rulesIpragmaNamesCollect- {-# LINE 4906 "Transform.hs" #-})- -- "Transform.ag"(line 757, column 7)- _lhsOsemPragmasCollect =- ({-# LINE 757 "Transform.ag" #-}- foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4914 "Transform.hs" #-})- -- "Transform.ag"(line 785, column 7)- _attrOrders =- ({-# LINE 785 "Transform.ag" #-}- [ orderMapSingle nt con _rulesIorderDepsCollect- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4922 "Transform.hs" #-})- -- "Transform.ag"(line 791, column 7)- _lhsOattrOrderCollect =- ({-# LINE 791 "Transform.ag" #-}- foldr orderMapUnion Map.empty _attrOrders- {-# LINE 4927 "Transform.hs" #-})- -- "Transform.ag"(line 937, column 12)- _coninfo =- ({-# LINE 937 "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 4937 "Transform.hs" #-})- -- "Transform.ag"(line 944, column 12)- _lhsOerrors =- ({-# LINE 944 "Transform.ag" #-}- Seq.fromList- [ UndefAlt nt con- | (nt, conset, conkeys) <- _coninfo- , con <- Set.toList (Set.difference conset conkeys)- ]- {-# LINE 4946 "Transform.hs" #-})- -- "Transform.ag"(line 949, column 12)- _lhsOcollectedRules =- ({-# LINE 949 "Transform.ag" #-}- [ (nt,con,r)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- , r <- _rulesIruleInfos- ]- {-# LINE 4955 "Transform.hs" #-})- -- "Transform.ag"(line 955, column 12)- _lhsOcollectedSigs =- ({-# LINE 955 "Transform.ag" #-}- [ (nt,con,ts)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- , ts <- _rulesIsigInfos- ]- {-# LINE 4964 "Transform.hs" #-})- -- "Transform.ag"(line 962, column 12)- _lhsOcollectedInsts =- ({-# LINE 962 "Transform.ag" #-}- [ (nt,con,_rulesIdefinedInsts)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4972 "Transform.hs" #-})- -- "Transform.ag"(line 968, column 12)- _lhsOcollectedUniques =- ({-# LINE 968 "Transform.ag" #-}- [ (nt,con,_rulesIuniqueInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4980 "Transform.hs" #-})- -- "Transform.ag"(line 974, column 12)- _lhsOcollectedAugments =- ({-# LINE 974 "Transform.ag" #-}- [ (nt, con, _rulesIaugmentInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4988 "Transform.hs" #-})- -- "Transform.ag"(line 980, column 12)- _lhsOcollectedArounds =- ({-# LINE 980 "Transform.ag" #-}- [ (nt, con, _rulesIaroundInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4996 "Transform.hs" #-})- -- "Transform.ag"(line 986, column 12)- _lhsOcollectedMerges =- ({-# LINE 986 "Transform.ag" #-}- [ (nt, con, _rulesImergeInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 5004 "Transform.hs" #-})- ( _constructorSetIcollectedConstructorNames,_constructorSetIconstructors,_constructorSetIerrors) =- (constructorSet_ )- ( _rulesIaroundInfos,_rulesIaugmentInfos,_rulesIdefinedInsts,_rulesImergeInfos,_rulesIorderDepsCollect,_rulesIpragmaNamesCollect,_rulesIruleInfos,_rulesIsigInfos,_rulesIuniqueInfos) =- (rules_ )- in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )--- SemAlts ------------------------------------------------------{-- visit 0:- inherited attributes:- allAttrDecls : Map NontermIdent (Attributes, Attributes)- allFields : DataTypes- nts : Set NontermIdent- synthesized attributes:- attrOrderCollect : AttrOrderMap- collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]- collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]- collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]- collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- errors : Seq Error- semPragmasCollect : PragmaMap- alternatives:- alternative Cons:- child hd : SemAlt - child tl : SemAlts - alternative Nil:--}--- cata-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 ((Map NontermIdent (Attributes, Attributes)) ->- DataTypes ->- (Set NontermIdent) ->- ( 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))-data Inh_SemAlts = Inh_SemAlts {allAttrDecls_Inh_SemAlts :: !((Map NontermIdent (Attributes, Attributes))),allFields_Inh_SemAlts :: !(DataTypes),nts_Inh_SemAlts :: !((Set NontermIdent))}-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)}-wrap_SemAlts :: T_SemAlts ->- Inh_SemAlts ->- Syn_SemAlts -wrap_SemAlts (T_SemAlts sem ) (Inh_SemAlts _lhsIallAttrDecls _lhsIallFields _lhsInts ) =- (let ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) =- (sem _lhsIallAttrDecls _lhsIallFields _lhsInts )- in (Syn_SemAlts _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect ))-sem_SemAlts_Cons :: T_SemAlt ->- T_SemAlts ->- T_SemAlts -sem_SemAlts_Cons (T_SemAlt hd_ ) (T_SemAlts tl_ ) =- (T_SemAlts (\ _lhsIallAttrDecls- _lhsIallFields- _lhsInts ->- (let _lhsOattrOrderCollect :: AttrOrderMap- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOerrors :: (Seq Error)- _lhsOsemPragmasCollect :: PragmaMap- _hdOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _hdOallFields :: DataTypes- _hdOnts :: (Set NontermIdent)- _tlOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))- _tlOallFields :: DataTypes- _tlOnts :: (Set NontermIdent)- _hdIattrOrderCollect :: AttrOrderMap- _hdIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _hdIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _hdIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _hdIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _hdIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _hdIerrors :: (Seq Error)- _hdIsemPragmasCollect :: PragmaMap- _tlIattrOrderCollect :: AttrOrderMap- _tlIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _tlIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _tlIerrors :: (Seq Error)- _tlIsemPragmasCollect :: PragmaMap- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect- {-# LINE 5100 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- _hdIcollectedArounds ++ _tlIcollectedArounds- {-# LINE 5105 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- _hdIcollectedAugments ++ _tlIcollectedAugments- {-# LINE 5110 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- _hdIcollectedInsts ++ _tlIcollectedInsts- {-# LINE 5115 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- _hdIcollectedMerges ++ _tlIcollectedMerges- {-# LINE 5120 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- _hdIcollectedRules ++ _tlIcollectedRules- {-# LINE 5125 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- _hdIcollectedSigs ++ _tlIcollectedSigs- {-# LINE 5130 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- _hdIcollectedUniques ++ _tlIcollectedUniques- {-# LINE 5135 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 5140 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect- {-# LINE 5145 "Transform.hs" #-})- -- copy rule (down)- _hdOallAttrDecls =- ({-# LINE 781 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 5150 "Transform.hs" #-})- -- copy rule (down)- _hdOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 5155 "Transform.hs" #-})- -- copy rule (down)- _hdOnts =- ({-# LINE 166 "Transform.ag" #-}- _lhsInts- {-# LINE 5160 "Transform.hs" #-})- -- copy rule (down)- _tlOallAttrDecls =- ({-# LINE 781 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 5165 "Transform.hs" #-})- -- copy rule (down)- _tlOallFields =- ({-# LINE 127 "Transform.ag" #-}- _lhsIallFields- {-# LINE 5170 "Transform.hs" #-})- -- copy rule (down)- _tlOnts =- ({-# LINE 166 "Transform.ag" #-}- _lhsInts- {-# LINE 5175 "Transform.hs" #-})- ( _hdIattrOrderCollect,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedInsts,_hdIcollectedMerges,_hdIcollectedRules,_hdIcollectedSigs,_hdIcollectedUniques,_hdIerrors,_hdIsemPragmasCollect) =- (hd_ _hdOallAttrDecls _hdOallFields _hdOnts )- ( _tlIattrOrderCollect,_tlIcollectedArounds,_tlIcollectedAugments,_tlIcollectedInsts,_tlIcollectedMerges,_tlIcollectedRules,_tlIcollectedSigs,_tlIcollectedUniques,_tlIerrors,_tlIsemPragmasCollect) =- (tl_ _tlOallAttrDecls _tlOallFields _tlOnts )- in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )-sem_SemAlts_Nil :: T_SemAlts -sem_SemAlts_Nil =- (T_SemAlts (\ _lhsIallAttrDecls- _lhsIallFields- _lhsInts ->- (let _lhsOattrOrderCollect :: AttrOrderMap- _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])- _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])- _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])- _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])- _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])- _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])- _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])- _lhsOerrors :: (Seq Error)- _lhsOsemPragmasCollect :: PragmaMap- -- use rule "Transform.ag"(line 780, column 55)- _lhsOattrOrderCollect =- ({-# LINE 780 "Transform.ag" #-}- Map.empty- {-# LINE 5200 "Transform.hs" #-})- -- use rule "Transform.ag"(line 155, column 32)- _lhsOcollectedArounds =- ({-# LINE 155 "Transform.ag" #-}- []- {-# LINE 5205 "Transform.hs" #-})- -- use rule "Transform.ag"(line 154, column 32)- _lhsOcollectedAugments =- ({-# LINE 154 "Transform.ag" #-}- []- {-# LINE 5210 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedInsts =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 5215 "Transform.hs" #-})- -- use rule "Transform.ag"(line 156, column 32)- _lhsOcollectedMerges =- ({-# LINE 156 "Transform.ag" #-}- []- {-# LINE 5220 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedRules =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 5225 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedSigs =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 5230 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedUniques =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 5235 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 5240 "Transform.hs" #-})- -- use rule "Transform.ag"(line 752, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 752 "Transform.ag" #-}- Map.empty- {-# LINE 5245 "Transform.hs" #-})- in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )--- SemDef -------------------------------------------------------{-- visit 0:- synthesized attributes:- aroundInfos : [AroundInfo]- augmentInfos : [AugmentInfo]- definedInsts : [Identifier]- mergeInfos : [MergeInfo]- orderDepsCollect : Set Dependency- pragmaNamesCollect : [Identifier]- ruleInfos : [RuleInfo]- sigInfos : [SigInfo]- uniqueInfos : [UniqueInfo]- alternatives:- alternative AroundDef:- child ident : {Identifier}- child rhs : {Expression}- alternative AttrOrderBefore:- child before : {[Occurrence]}- child after : {[Occurrence]}- visit 0:- local dependency : _- alternative AugmentDef:- child ident : {Identifier}- child rhs : {Expression}- alternative Def:- child pos : {Pos}- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : {Expression}- child owrt : {Bool}- alternative MergeDef:- child target : {Identifier}- child nt : {Identifier}- child sources : {[Identifier]}- child rhs : {Expression}- alternative SemPragma:- child names : {[NontermIdent]}- alternative TypeDef:- child ident : {Identifier}- child tp : {Type}- alternative UniqueDef:- child ident : {Identifier}- child ref : {Identifier}--}--- cata-sem_SemDef :: SemDef ->- T_SemDef -sem_SemDef (AroundDef _ident _rhs ) =- (sem_SemDef_AroundDef _ident _rhs )-sem_SemDef (AttrOrderBefore _before _after ) =- (sem_SemDef_AttrOrderBefore _before _after )-sem_SemDef (AugmentDef _ident _rhs ) =- (sem_SemDef_AugmentDef _ident _rhs )-sem_SemDef (Def _pos _mbName _pattern _rhs _owrt ) =- (sem_SemDef_Def _pos _mbName (sem_Pattern _pattern ) _rhs _owrt )-sem_SemDef (MergeDef _target _nt _sources _rhs ) =- (sem_SemDef_MergeDef _target _nt _sources _rhs )-sem_SemDef (SemPragma _names ) =- (sem_SemDef_SemPragma _names )-sem_SemDef (TypeDef _ident _tp ) =- (sem_SemDef_TypeDef _ident _tp )-sem_SemDef (UniqueDef _ident _ref ) =- (sem_SemDef_UniqueDef _ident _ref )--- semantic domain-newtype T_SemDef = T_SemDef (( ([AroundInfo]),([AugmentInfo]),([Identifier]),([MergeInfo]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))-data Inh_SemDef = Inh_SemDef {}-data Syn_SemDef = Syn_SemDef {aroundInfos_Syn_SemDef :: !(([AroundInfo])),augmentInfos_Syn_SemDef :: !(([AugmentInfo])),definedInsts_Syn_SemDef :: !(([Identifier])),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]))}-wrap_SemDef :: T_SemDef ->- Inh_SemDef ->- Syn_SemDef -wrap_SemDef (T_SemDef sem ) (Inh_SemDef ) =- (let ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) =- (sem )- in (Syn_SemDef _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos ))-sem_SemDef_AroundDef :: Identifier ->- Expression ->- T_SemDef -sem_SemDef_AroundDef ident_ rhs_ =- (T_SemDef (let _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "Transform.ag"(line 1005, column 17)- _lhsOaroundInfos =- ({-# LINE 1005 "Transform.ag" #-}- [ (ident_, rhs_) ]- {-# LINE 5339 "Transform.hs" #-})- -- use rule "Transform.ag"(line 930, column 40)- _lhsOaugmentInfos =- ({-# LINE 930 "Transform.ag" #-}- []- {-# LINE 5344 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 5349 "Transform.hs" #-})- -- use rule "Transform.ag"(line 932, column 40)- _lhsOmergeInfos =- ({-# LINE 932 "Transform.ag" #-}- []- {-# LINE 5354 "Transform.hs" #-})- -- use rule "Transform.ag"(line 793, column 44)- _lhsOorderDepsCollect =- ({-# LINE 793 "Transform.ag" #-}- Set.empty- {-# LINE 5359 "Transform.hs" #-})- -- use rule "Transform.ag"(line 762, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 762 "Transform.ag" #-}- []- {-# LINE 5364 "Transform.hs" #-})- -- use rule "Transform.ag"(line 927, column 40)- _lhsOruleInfos =- ({-# LINE 927 "Transform.ag" #-}- []- {-# LINE 5369 "Transform.hs" #-})- -- use rule "Transform.ag"(line 928, column 40)- _lhsOsigInfos =- ({-# LINE 928 "Transform.ag" #-}- []- {-# LINE 5374 "Transform.hs" #-})- -- use rule "Transform.ag"(line 929, column 40)- _lhsOuniqueInfos =- ({-# LINE 929 "Transform.ag" #-}- []- {-# LINE 5379 "Transform.hs" #-})- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_AttrOrderBefore :: ([Occurrence]) ->- ([Occurrence]) ->- T_SemDef -sem_SemDef_AttrOrderBefore before_ after_ =- (T_SemDef (let _lhsOorderDepsCollect :: (Set Dependency)- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "Transform.ag"(line 797, column 7)- _dependency =- ({-# LINE 797 "Transform.ag" #-}- [ Dependency b a | b <- before_, a <- after_ ]- {-# LINE 5398 "Transform.hs" #-})- -- "Transform.ag"(line 798, column 7)- _lhsOorderDepsCollect =- ({-# LINE 798 "Transform.ag" #-}- Set.fromList _dependency- {-# LINE 5403 "Transform.hs" #-})- -- use rule "Transform.ag"(line 931, column 40)- _lhsOaroundInfos =- ({-# LINE 931 "Transform.ag" #-}- []- {-# LINE 5408 "Transform.hs" #-})- -- use rule "Transform.ag"(line 930, column 40)- _lhsOaugmentInfos =- ({-# LINE 930 "Transform.ag" #-}- []- {-# LINE 5413 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 5418 "Transform.hs" #-})- -- use rule "Transform.ag"(line 932, column 40)- _lhsOmergeInfos =- ({-# LINE 932 "Transform.ag" #-}- []- {-# LINE 5423 "Transform.hs" #-})- -- use rule "Transform.ag"(line 762, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 762 "Transform.ag" #-}- []- {-# LINE 5428 "Transform.hs" #-})- -- use rule "Transform.ag"(line 927, column 40)- _lhsOruleInfos =- ({-# LINE 927 "Transform.ag" #-}- []- {-# LINE 5433 "Transform.hs" #-})- -- use rule "Transform.ag"(line 928, column 40)- _lhsOsigInfos =- ({-# LINE 928 "Transform.ag" #-}- []- {-# LINE 5438 "Transform.hs" #-})- -- use rule "Transform.ag"(line 929, column 40)- _lhsOuniqueInfos =- ({-# LINE 929 "Transform.ag" #-}- []- {-# LINE 5443 "Transform.hs" #-})- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_AugmentDef :: Identifier ->- Expression ->- T_SemDef -sem_SemDef_AugmentDef ident_ rhs_ =- (T_SemDef (let _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "Transform.ag"(line 1002, column 17)- _lhsOaugmentInfos =- ({-# LINE 1002 "Transform.ag" #-}- [ (ident_, rhs_) ]- {-# LINE 5462 "Transform.hs" #-})- -- use rule "Transform.ag"(line 931, column 40)- _lhsOaroundInfos =- ({-# LINE 931 "Transform.ag" #-}- []- {-# LINE 5467 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 5472 "Transform.hs" #-})- -- use rule "Transform.ag"(line 932, column 40)- _lhsOmergeInfos =- ({-# LINE 932 "Transform.ag" #-}- []- {-# LINE 5477 "Transform.hs" #-})- -- use rule "Transform.ag"(line 793, column 44)- _lhsOorderDepsCollect =- ({-# LINE 793 "Transform.ag" #-}- Set.empty- {-# LINE 5482 "Transform.hs" #-})- -- use rule "Transform.ag"(line 762, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 762 "Transform.ag" #-}- []- {-# LINE 5487 "Transform.hs" #-})- -- use rule "Transform.ag"(line 927, column 40)- _lhsOruleInfos =- ({-# LINE 927 "Transform.ag" #-}- []- {-# LINE 5492 "Transform.hs" #-})- -- use rule "Transform.ag"(line 928, column 40)- _lhsOsigInfos =- ({-# LINE 928 "Transform.ag" #-}- []- {-# LINE 5497 "Transform.hs" #-})- -- use rule "Transform.ag"(line 929, column 40)- _lhsOuniqueInfos =- ({-# LINE 929 "Transform.ag" #-}- []- {-# LINE 5502 "Transform.hs" #-})- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_Def :: Pos ->- (Maybe Identifier) ->- T_Pattern ->- Expression ->- Bool ->- T_SemDef -sem_SemDef_Def pos_ mbName_ (T_Pattern pattern_ ) rhs_ owrt_ =- (T_SemDef (let _lhsOruleInfos :: ([RuleInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- _patternIcopy :: Pattern - _patternIdefinedAttrs :: ([AttrName])- _patternIdefinedInsts :: ([Identifier])- _patternIpatunder :: ([AttrName]->Pattern)- _patternIstpos :: Pos- -- "Transform.ag"(line 993, column 10)- _lhsOruleInfos =- ({-# LINE 993 "Transform.ag" #-}- [ (mbName_, _patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos) ]- {-# LINE 5529 "Transform.hs" #-})- -- use rule "Transform.ag"(line 931, column 40)- _lhsOaroundInfos =- ({-# LINE 931 "Transform.ag" #-}- []- {-# LINE 5534 "Transform.hs" #-})- -- use rule "Transform.ag"(line 930, column 40)- _lhsOaugmentInfos =- ({-# LINE 930 "Transform.ag" #-}- []- {-# LINE 5539 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- _patternIdefinedInsts- {-# LINE 5544 "Transform.hs" #-})- -- use rule "Transform.ag"(line 932, column 40)- _lhsOmergeInfos =- ({-# LINE 932 "Transform.ag" #-}- []- {-# LINE 5549 "Transform.hs" #-})- -- use rule "Transform.ag"(line 793, column 44)- _lhsOorderDepsCollect =- ({-# LINE 793 "Transform.ag" #-}- Set.empty- {-# LINE 5554 "Transform.hs" #-})- -- use rule "Transform.ag"(line 762, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 762 "Transform.ag" #-}- []- {-# LINE 5559 "Transform.hs" #-})- -- use rule "Transform.ag"(line 928, column 40)- _lhsOsigInfos =- ({-# LINE 928 "Transform.ag" #-}- []- {-# LINE 5564 "Transform.hs" #-})- -- use rule "Transform.ag"(line 929, column 40)- _lhsOuniqueInfos =- ({-# LINE 929 "Transform.ag" #-}- []- {-# LINE 5569 "Transform.hs" #-})- ( _patternIcopy,_patternIdefinedAttrs,_patternIdefinedInsts,_patternIpatunder,_patternIstpos) =- (pattern_ )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_MergeDef :: Identifier ->- Identifier ->- ([Identifier]) ->- Expression ->- T_SemDef -sem_SemDef_MergeDef target_ nt_ sources_ rhs_ =- (T_SemDef (let _lhsOmergeInfos :: ([MergeInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "Transform.ag"(line 1008, column 17)- _lhsOmergeInfos =- ({-# LINE 1008 "Transform.ag" #-}- [ (target_, nt_, sources_, rhs_) ]- {-# LINE 5592 "Transform.hs" #-})- -- use rule "Transform.ag"(line 931, column 40)- _lhsOaroundInfos =- ({-# LINE 931 "Transform.ag" #-}- []- {-# LINE 5597 "Transform.hs" #-})- -- use rule "Transform.ag"(line 930, column 40)- _lhsOaugmentInfos =- ({-# LINE 930 "Transform.ag" #-}- []- {-# LINE 5602 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 5607 "Transform.hs" #-})- -- use rule "Transform.ag"(line 793, column 44)- _lhsOorderDepsCollect =- ({-# LINE 793 "Transform.ag" #-}- Set.empty- {-# LINE 5612 "Transform.hs" #-})- -- use rule "Transform.ag"(line 762, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 762 "Transform.ag" #-}- []- {-# LINE 5617 "Transform.hs" #-})- -- use rule "Transform.ag"(line 927, column 40)- _lhsOruleInfos =- ({-# LINE 927 "Transform.ag" #-}- []- {-# LINE 5622 "Transform.hs" #-})- -- use rule "Transform.ag"(line 928, column 40)- _lhsOsigInfos =- ({-# LINE 928 "Transform.ag" #-}- []- {-# LINE 5627 "Transform.hs" #-})- -- use rule "Transform.ag"(line 929, column 40)- _lhsOuniqueInfos =- ({-# LINE 929 "Transform.ag" #-}- []- {-# LINE 5632 "Transform.hs" #-})- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_SemPragma :: ([NontermIdent]) ->- T_SemDef -sem_SemDef_SemPragma names_ =- (T_SemDef (let _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "Transform.ag"(line 766, column 7)- _lhsOpragmaNamesCollect =- ({-# LINE 766 "Transform.ag" #-}- names_- {-# LINE 5650 "Transform.hs" #-})- -- use rule "Transform.ag"(line 931, column 40)- _lhsOaroundInfos =- ({-# LINE 931 "Transform.ag" #-}- []- {-# LINE 5655 "Transform.hs" #-})- -- use rule "Transform.ag"(line 930, column 40)- _lhsOaugmentInfos =- ({-# LINE 930 "Transform.ag" #-}- []- {-# LINE 5660 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 5665 "Transform.hs" #-})- -- use rule "Transform.ag"(line 932, column 40)- _lhsOmergeInfos =- ({-# LINE 932 "Transform.ag" #-}- []- {-# LINE 5670 "Transform.hs" #-})- -- use rule "Transform.ag"(line 793, column 44)- _lhsOorderDepsCollect =- ({-# LINE 793 "Transform.ag" #-}- Set.empty- {-# LINE 5675 "Transform.hs" #-})- -- use rule "Transform.ag"(line 927, column 40)- _lhsOruleInfos =- ({-# LINE 927 "Transform.ag" #-}- []- {-# LINE 5680 "Transform.hs" #-})- -- use rule "Transform.ag"(line 928, column 40)- _lhsOsigInfos =- ({-# LINE 928 "Transform.ag" #-}- []- {-# LINE 5685 "Transform.hs" #-})- -- use rule "Transform.ag"(line 929, column 40)- _lhsOuniqueInfos =- ({-# LINE 929 "Transform.ag" #-}- []- {-# LINE 5690 "Transform.hs" #-})- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_TypeDef :: Identifier ->- Type ->- T_SemDef -sem_SemDef_TypeDef ident_ tp_ =- (T_SemDef (let _lhsOsigInfos :: ([SigInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "Transform.ag"(line 996, column 14)- _lhsOsigInfos =- ({-# LINE 996 "Transform.ag" #-}- [ (ident_, tp_) ]- {-# LINE 5709 "Transform.hs" #-})- -- use rule "Transform.ag"(line 931, column 40)- _lhsOaroundInfos =- ({-# LINE 931 "Transform.ag" #-}- []- {-# LINE 5714 "Transform.hs" #-})- -- use rule "Transform.ag"(line 930, column 40)- _lhsOaugmentInfos =- ({-# LINE 930 "Transform.ag" #-}- []- {-# LINE 5719 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 5724 "Transform.hs" #-})- -- use rule "Transform.ag"(line 932, column 40)- _lhsOmergeInfos =- ({-# LINE 932 "Transform.ag" #-}- []- {-# LINE 5729 "Transform.hs" #-})- -- use rule "Transform.ag"(line 793, column 44)- _lhsOorderDepsCollect =- ({-# LINE 793 "Transform.ag" #-}- Set.empty- {-# LINE 5734 "Transform.hs" #-})- -- use rule "Transform.ag"(line 762, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 762 "Transform.ag" #-}- []- {-# LINE 5739 "Transform.hs" #-})- -- use rule "Transform.ag"(line 927, column 40)- _lhsOruleInfos =- ({-# LINE 927 "Transform.ag" #-}- []- {-# LINE 5744 "Transform.hs" #-})- -- use rule "Transform.ag"(line 929, column 40)- _lhsOuniqueInfos =- ({-# LINE 929 "Transform.ag" #-}- []- {-# LINE 5749 "Transform.hs" #-})- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_UniqueDef :: Identifier ->- Identifier ->- T_SemDef -sem_SemDef_UniqueDef ident_ ref_ =- (T_SemDef (let _lhsOuniqueInfos :: ([UniqueInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- -- "Transform.ag"(line 999, column 16)- _lhsOuniqueInfos =- ({-# LINE 999 "Transform.ag" #-}- [ (ident_, ref_) ]- {-# LINE 5768 "Transform.hs" #-})- -- use rule "Transform.ag"(line 931, column 40)- _lhsOaroundInfos =- ({-# LINE 931 "Transform.ag" #-}- []- {-# LINE 5773 "Transform.hs" #-})- -- use rule "Transform.ag"(line 930, column 40)- _lhsOaugmentInfos =- ({-# LINE 930 "Transform.ag" #-}- []- {-# LINE 5778 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 5783 "Transform.hs" #-})- -- use rule "Transform.ag"(line 932, column 40)- _lhsOmergeInfos =- ({-# LINE 932 "Transform.ag" #-}- []- {-# LINE 5788 "Transform.hs" #-})- -- use rule "Transform.ag"(line 793, column 44)- _lhsOorderDepsCollect =- ({-# LINE 793 "Transform.ag" #-}- Set.empty- {-# LINE 5793 "Transform.hs" #-})- -- use rule "Transform.ag"(line 762, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 762 "Transform.ag" #-}- []- {-# LINE 5798 "Transform.hs" #-})- -- use rule "Transform.ag"(line 927, column 40)- _lhsOruleInfos =- ({-# LINE 927 "Transform.ag" #-}- []- {-# LINE 5803 "Transform.hs" #-})- -- use rule "Transform.ag"(line 928, column 40)- _lhsOsigInfos =- ({-# LINE 928 "Transform.ag" #-}- []- {-# LINE 5808 "Transform.hs" #-})- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )--- SemDefs ------------------------------------------------------{-- visit 0:- synthesized attributes:- aroundInfos : [AroundInfo]- augmentInfos : [AugmentInfo]- definedInsts : [Identifier]- mergeInfos : [MergeInfo]- orderDepsCollect : Set Dependency- pragmaNamesCollect : [Identifier]- ruleInfos : [RuleInfo]- sigInfos : [SigInfo]- uniqueInfos : [UniqueInfo]- alternatives:- alternative Cons:- child hd : SemDef - child tl : SemDefs - alternative Nil:--}--- cata-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 (( ([AroundInfo]),([AugmentInfo]),([Identifier]),([MergeInfo]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))-data Inh_SemDefs = Inh_SemDefs {}-data Syn_SemDefs = Syn_SemDefs {aroundInfos_Syn_SemDefs :: !(([AroundInfo])),augmentInfos_Syn_SemDefs :: !(([AugmentInfo])),definedInsts_Syn_SemDefs :: !(([Identifier])),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]))}-wrap_SemDefs :: T_SemDefs ->- Inh_SemDefs ->- Syn_SemDefs -wrap_SemDefs (T_SemDefs sem ) (Inh_SemDefs ) =- (let ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) =- (sem )- in (Syn_SemDefs _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos ))-sem_SemDefs_Cons :: T_SemDef ->- T_SemDefs ->- T_SemDefs -sem_SemDefs_Cons (T_SemDef hd_ ) (T_SemDefs tl_ ) =- (T_SemDefs (let _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- _hdIaroundInfos :: ([AroundInfo])- _hdIaugmentInfos :: ([AugmentInfo])- _hdIdefinedInsts :: ([Identifier])- _hdImergeInfos :: ([MergeInfo])- _hdIorderDepsCollect :: (Set Dependency)- _hdIpragmaNamesCollect :: ([Identifier])- _hdIruleInfos :: ([RuleInfo])- _hdIsigInfos :: ([SigInfo])- _hdIuniqueInfos :: ([UniqueInfo])- _tlIaroundInfos :: ([AroundInfo])- _tlIaugmentInfos :: ([AugmentInfo])- _tlIdefinedInsts :: ([Identifier])- _tlImergeInfos :: ([MergeInfo])- _tlIorderDepsCollect :: (Set Dependency)- _tlIpragmaNamesCollect :: ([Identifier])- _tlIruleInfos :: ([RuleInfo])- _tlIsigInfos :: ([SigInfo])- _tlIuniqueInfos :: ([UniqueInfo])- -- use rule "Transform.ag"(line 931, column 40)- _lhsOaroundInfos =- ({-# LINE 931 "Transform.ag" #-}- _hdIaroundInfos ++ _tlIaroundInfos- {-# LINE 5880 "Transform.hs" #-})- -- use rule "Transform.ag"(line 930, column 40)- _lhsOaugmentInfos =- ({-# LINE 930 "Transform.ag" #-}- _hdIaugmentInfos ++ _tlIaugmentInfos- {-# LINE 5885 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 5890 "Transform.hs" #-})- -- use rule "Transform.ag"(line 932, column 40)- _lhsOmergeInfos =- ({-# LINE 932 "Transform.ag" #-}- _hdImergeInfos ++ _tlImergeInfos- {-# LINE 5895 "Transform.hs" #-})- -- use rule "Transform.ag"(line 793, column 44)- _lhsOorderDepsCollect =- ({-# LINE 793 "Transform.ag" #-}- _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect- {-# LINE 5900 "Transform.hs" #-})- -- use rule "Transform.ag"(line 762, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 762 "Transform.ag" #-}- _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect- {-# LINE 5905 "Transform.hs" #-})- -- use rule "Transform.ag"(line 927, column 40)- _lhsOruleInfos =- ({-# LINE 927 "Transform.ag" #-}- _hdIruleInfos ++ _tlIruleInfos- {-# LINE 5910 "Transform.hs" #-})- -- use rule "Transform.ag"(line 928, column 40)- _lhsOsigInfos =- ({-# LINE 928 "Transform.ag" #-}- _hdIsigInfos ++ _tlIsigInfos- {-# LINE 5915 "Transform.hs" #-})- -- use rule "Transform.ag"(line 929, column 40)- _lhsOuniqueInfos =- ({-# LINE 929 "Transform.ag" #-}- _hdIuniqueInfos ++ _tlIuniqueInfos- {-# LINE 5920 "Transform.hs" #-})- ( _hdIaroundInfos,_hdIaugmentInfos,_hdIdefinedInsts,_hdImergeInfos,_hdIorderDepsCollect,_hdIpragmaNamesCollect,_hdIruleInfos,_hdIsigInfos,_hdIuniqueInfos) =- (hd_ )- ( _tlIaroundInfos,_tlIaugmentInfos,_tlIdefinedInsts,_tlImergeInfos,_tlIorderDepsCollect,_tlIpragmaNamesCollect,_tlIruleInfos,_tlIsigInfos,_tlIuniqueInfos) =- (tl_ )- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDefs_Nil :: T_SemDefs -sem_SemDefs_Nil =- (T_SemDefs (let _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOmergeInfos :: ([MergeInfo])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- use rule "Transform.ag"(line 931, column 40)- _lhsOaroundInfos =- ({-# LINE 931 "Transform.ag" #-}- []- {-# LINE 5941 "Transform.hs" #-})- -- use rule "Transform.ag"(line 930, column 40)- _lhsOaugmentInfos =- ({-# LINE 930 "Transform.ag" #-}- []- {-# LINE 5946 "Transform.hs" #-})- -- use rule "Transform.ag"(line 1011, column 55)- _lhsOdefinedInsts =- ({-# LINE 1011 "Transform.ag" #-}- []- {-# LINE 5951 "Transform.hs" #-})- -- use rule "Transform.ag"(line 932, column 40)- _lhsOmergeInfos =- ({-# LINE 932 "Transform.ag" #-}- []- {-# LINE 5956 "Transform.hs" #-})- -- use rule "Transform.ag"(line 793, column 44)- _lhsOorderDepsCollect =- ({-# LINE 793 "Transform.ag" #-}- Set.empty- {-# LINE 5961 "Transform.hs" #-})- -- use rule "Transform.ag"(line 762, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 762 "Transform.ag" #-}- []- {-# LINE 5966 "Transform.hs" #-})- -- use rule "Transform.ag"(line 927, column 40)- _lhsOruleInfos =- ({-# LINE 927 "Transform.ag" #-}- []- {-# LINE 5971 "Transform.hs" #-})- -- use rule "Transform.ag"(line 928, column 40)- _lhsOsigInfos =- ({-# LINE 928 "Transform.ag" #-}- []- {-# LINE 5976 "Transform.hs" #-})- -- use rule "Transform.ag"(line 929, column 40)- _lhsOuniqueInfos =- ({-# LINE 929 "Transform.ag" #-}- []- {-# LINE 5981 "Transform.hs" #-})+-- UUAGC 0.9.30 (Transform.ag)+module Transform where+{-# LINE 8 "Transform.ag" #-}++import Control.Monad(mplus,mzero)+import List (partition, elem, nub,intersperse)+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)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq, empty, (><),fromList)+import Data.Foldable(toList)+import UU.Scanner.Position(noPos)++import ConcreteSyntax+import AbstractSyntax+import ErrorMessages+import Patterns (Patterns(..),Pattern(..))+import Expression (Expression(..))+import HsToken++import Options+import CommonTypes+{-# LINE 28 "../src-derived/Transform.hs" #-}++{-# LINE 2 "./ConcreteSyntax.ag" #-}++import UU.Scanner.Position (Pos)+import Patterns (Pattern)+import Expression (Expression)+import CommonTypes+{-# LINE 36 "../src-derived/Transform.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 43 "../src-derived/Transform.hs" #-}+{-# LINE 100 "Transform.ag" #-}+type DefinedSets = Map Identifier (Set NontermIdent) +{-# LINE 46 "../src-derived/Transform.hs" #-}++{-# LINE 120 "Transform.ag" #-}+type FieldMap = [(Identifier, Type)] +{-# LINE 50 "../src-derived/Transform.hs" #-}++{-# LINE 121 "Transform.ag" #-}+type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap) +{-# LINE 54 "../src-derived/Transform.hs" #-}++{-# LINE 141 "Transform.ag" #-}+type AttrName = (Identifier,Identifier) +{-# LINE 58 "../src-derived/Transform.hs" #-}++{-# LINE 142 "Transform.ag" #-}+type RuleInfo = (Maybe Identifier, [AttrName]->Pattern, Expression, [AttrName], Bool, String) +{-# LINE 62 "../src-derived/Transform.hs" #-}++{-# LINE 143 "Transform.ag" #-}+type SigInfo = (Identifier,Type) +{-# LINE 66 "../src-derived/Transform.hs" #-}++{-# LINE 144 "Transform.ag" #-}+type UniqueInfo = (Identifier,Identifier) +{-# LINE 70 "../src-derived/Transform.hs" #-}++{-# LINE 145 "Transform.ag" #-}+type AugmentInfo = (Identifier,Expression)+{-# LINE 74 "../src-derived/Transform.hs" #-}++{-# LINE 146 "Transform.ag" #-}+type AroundInfo = (Identifier,Expression)+{-# LINE 78 "../src-derived/Transform.hs" #-}++{-# LINE 147 "Transform.ag" #-}+type MergeInfo = (Identifier, Identifier, [Identifier], Expression)+{-# LINE 82 "../src-derived/Transform.hs" #-}++{-# LINE 195 "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 f e xs = foldl g (e,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 err [] = []+checkForDuplicates err (x:xs) = let (same,other) = List.partition (equalId x) xs+ in map (err x) same ++ checkForDuplicates err other++equalId :: Identifier -> Identifier -> Bool+equalId x y = getName x == getName y++{-# LINE 113 "../src-derived/Transform.hs" #-}++{-# LINE 331 "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) -> Map NontermIdent (Map ConstructorIdent FieldMap) ->+ Map NontermIdent (Map ConstructorIdent [Identifier]) -> Map NontermIdent (Map ConstructorIdent [SigInfo]) ->+ Map NontermIdent (Map ConstructorIdent [MergeInfo]) ->+ NontermIdent -> ConstructorIdent -> [RuleInfo] -> RulesAndErrors+checkRules attributes fields allinsts allsigs allmerges nt con rs+ = let fieldmap :: FieldMap+ fieldmap = (_LHS,NT nt undefined) : (_LOC,NT undefined undefined) : (_INST, NT undefined undefined) : (_FIRST, NT undefined undefined) : (_LAST, NT undefined undefined)+ : 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,exp,as,owrt,str) ((r1,e1),m1) + = let (e2,m2,u2,b2) = foldr (checkDefi owrt) (e1,m1,[],[]) as+ in ( (Rule mbNm (pat u2) exp owrt str True : 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 t)-> 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]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [Identifier] -> InstsAndErrors+checkInsts allNts sigMap fieldMap nt con+ = foldr (\inst (insts, errs) ->+ maybe (insts, Seq.singleton (MissingInstSig nt con inst) >< errs)+ (\info@(k, NT nm _) ->+ 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)+ 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 con 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)++ (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs+ in foldr checkAugment (Map.empty, Seq.empty) augments++checkArounds :: Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> 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]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [MergeInfo] -> MergesAndErrors+checkMerges allNts allInsts fieldMap nt 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.unionWith (Map.unionWith (++))+{-# LINE 268 "../src-derived/Transform.hs" #-}++{-# LINE 486 "Transform.ag" #-}++mkUniqueRules :: Options -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Attributes,Attributes) -> NontermIdent -> ConstructorIdent -> Map Identifier Identifier -> [Rule]+mkUniqueRules opts 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++ groups = Map.assocs $ Map.foldWithKey (\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 pat = Product noPos (attr outFld ref : [attr _LOC u | u <- locAttrs ])+ rhs = Expression noPos $ wrap ref $ foldr gencase (finalout locAttrs) locAttrs+ -- [HsToken ("mkUniques" ++ show (length locAttrs) ++ " ") noPos, AGField _LHS ref noPos Nothing]+ in Rule Nothing pat rhs False "-- generated by the unique rule mechanism." False+ 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 us = h ("(__cont, " ++ concat (intersperse "," (map getName us)) ++ ")")+ wrap ref inp = h "case " ++ [AGField _LHS ref noPos Nothing] ++ h " of { __cont | __cont `seq` True -> " ++ inp ++ h "}"+{-# LINE 297 "../src-derived/Transform.hs" #-}++{-# LINE 658 "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 nts = reach nts+ 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 m = foldr inv Map.empty (Map.toList m)+ 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 322 "../src-derived/Transform.hs" #-}++{-# LINE 768 "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 331 "../src-derived/Transform.hs" #-}++{-# LINE 800 "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 340 "../src-derived/Transform.hs" #-}++{-# LINE 826 "Transform.ag" #-}++mergeParams :: ParamMap -> ParamMap -> ParamMap+mergeParams = Map.unionWith (++)+{-# LINE 346 "../src-derived/Transform.hs" #-}++{-# LINE 849 "Transform.ag" #-}++mergeCtx :: ContextMap -> ContextMap -> ContextMap+mergeCtx+ = Map.unionWith nubconcat+ where nubconcat a b = nub (a ++ b)+{-# LINE 354 "../src-derived/Transform.hs" #-}++{-# LINE 862 "Transform.ag" #-}++mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)+{-# LINE 359 "../src-derived/Transform.hs" #-}++{-# LINE 873 "Transform.ag" #-}++merge x y = foldr f y (Map.toList x)+ where f ~(k,v) m = Map.insertWith (Map.union) k v m+{-# LINE 365 "../src-derived/Transform.hs" #-}++{-# LINE 900 "Transform.ag" #-}++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 375 "../src-derived/Transform.hs" #-}++{-# LINE 911 "Transform.ag" #-}++addSelf name atMap = let (eInh,eSyn) = Map.findWithDefault(Map.empty,Map.empty) name atMap+ in Map.insert name (eInh, Map.insert (Ident "self" noPos) (NT _SELF []) eSyn)atMap+{-# LINE 381 "../src-derived/Transform.hs" #-}++{-# LINE 1051 "Transform.ag" #-}++makeType :: Set NontermIdent -> Type -> Type+makeType nts tp@(NT x _) | x == _SELF = tp+ | Set.member x nts = tp+ | otherwise = Haskell (typeToHaskellString Nothing [] tp)+makeType _ tp = tp+{-# LINE 390 "../src-derived/Transform.hs" #-}++{-# LINE 1058 "Transform.ag" #-}++constructGrammar :: Set NontermIdent+ -> ParamMap+ -> DataTypes+ -> 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+ -> UniqueMap+ -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+ -> Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))+ -> Grammar++constructGrammar nts ntParams gram attrs uses derivings wrappers allrules tsigs allinsts tsyns pragmaMap orderMap contextMap uniqueMap augmentsMap aroundsMap mergeMap =+ let gr = [ (nt,Map.toList 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+ alt (con,flds) =+ let rules = maybe [] id (Map.lookup con rmap)+ tsigs = maybe [] id (Map.lookup con tsmap)+ insts = maybe [] id (Map.lookup con instsmap)+ merges = [ (n, NT t []) | (n, (t, _, _)) <- Map.assocs $ maybe Map.empty id (Map.lookup con mergemap) ]++ -- 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+ (inh,syn) = case tpI of+ NT nt _ -> let nt' = maybe nt id (deforestedNt nt)+ in Map.findWithDefault (Map.empty,Map.empty) nt' attrs+ _ -> (Map.empty,Map.empty)+ virt = if existsAsInst nm+ then case lookup nm flds of+ Just tp' -> Just (Just tp')+ Nothing -> Just Nothing+ else if existsAsMerge nm+ then (Just Nothing)+ else Nothing+ in Child nm tpI inh syn 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 cldrn rules tsigs+ in Nonterminal nt params inh syn (map alt alts)+ in Grammar tsyns uses derivings wrappers nonts pragmaMap orderMap ntParams contextMap uniqueMap augmentsMap aroundsMap mergeMap+{-# LINE 453 "../src-derived/Transform.hs" #-}++{-# LINE 1120 "Transform.ag" #-}++mapUnionWithSetUnion = Map.unionWith Set.union+mapUnionWithPlusPlus = Map.unionWith (++)+{-# LINE 459 "../src-derived/Transform.hs" #-}+-- AG ----------------------------------------------------------+{-+ visit 0:+ inherited attribute:+ options : Options+ synthesized attributes:+ blocks : Blocks+ errors : Seq Error+ moduleDecl : Maybe (String,String,String)+ output : Grammar+ pragmas : Options -> Options+ alternatives:+ alternative AG:+ child elems : Elems + visit 0:+ local allFields : _+ local allConstrs : _+ local allRules : _+ local allSigs : _+ local allInsts : _+ local allUniques : _+ local allAugments : _+ local allArounds : _+ local allMerges : _+ local augmentSigs : _+ local allRulesErrs : _+ local allNamesErrs : _+ local allSigsErrs : _+ local allInstsErrs : _+ local allUniquesErrs : _+ local allAugmentErrs : _+ local allAroundsErrs : _+ local allMergesErrs : _+ local checkedRulesPre : _+ local checkedSigs : _+ local checkedInsts : _+ local checkedUniques : _+ local checkedAugments : _+ local checkedArounds : _+ local checkedRules : _+ local checkedMerges : _+ local errs1 : _+ local errs2 : _+ local errs3 : _+ local errs4 : _+ local errs5 : _+ local errs6 : _+ local errs7 : _+ local errs8 : _+ local errs9 : _+ local errs10 : _+ local errs11 : _+ local allNonterminals : _+ local allAttrDecls : _+-}+-- cata+sem_AG :: AG ->+ T_AG +sem_AG (AG _elems ) =+ (sem_AG_AG (sem_Elems _elems ) )+-- semantic domain+newtype T_AG = T_AG (Options ->+ ( Blocks,(Seq Error),(Maybe (String,String,String)),Grammar,(Options -> Options)))+data Inh_AG = Inh_AG {options_Inh_AG :: !(Options)}+data Syn_AG = Syn_AG {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))}+wrap_AG :: T_AG ->+ Inh_AG ->+ Syn_AG +wrap_AG (T_AG sem ) (Inh_AG _lhsIoptions ) =+ (let ( _lhsOblocks,_lhsOerrors,_lhsOmoduleDecl,_lhsOoutput,_lhsOpragmas) = sem _lhsIoptions + in (Syn_AG _lhsOblocks _lhsOerrors _lhsOmoduleDecl _lhsOoutput _lhsOpragmas ))+sem_AG_AG :: T_Elems ->+ T_AG +sem_AG_AG (T_Elems elems_ ) =+ (T_AG (\ _lhsIoptions ->+ (let _lhsOoutput :: Grammar+ _lhsOerrors :: (Seq Error)+ _elemsOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _elemsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _elemsOdefinedSets :: DefinedSets+ _elemsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOblocks :: Blocks+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOpragmas :: (Options -> Options)+ _elemsOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _elemsOallFields :: DataTypes+ _elemsOallNonterminals :: (Set NontermIdent)+ _elemsIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _elemsIattrOrderCollect :: AttrOrderMap+ _elemsIblocks :: Blocks+ _elemsIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _elemsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _elemsIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _elemsIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _elemsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _elemsIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _elemsIcollectedNames :: (Set Identifier)+ _elemsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _elemsIcollectedSetNames :: (Set Identifier)+ _elemsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _elemsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _elemsIctxCollect :: ContextMap+ _elemsIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _elemsIderivings :: Derivings+ _elemsIerrors :: (Seq Error)+ _elemsImoduleDecl :: (Maybe (String,String,String))+ _elemsIparamsCollect :: ParamMap+ _elemsIpragmas :: (Options -> Options)+ _elemsIsemPragmasCollect :: PragmaMap+ _elemsItypeSyns :: TypeSyns+ _elemsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _elemsIwrappers :: (Set NontermIdent)+ -- "Transform.ag"(line 51, column 8)+ _lhsOoutput =+ ({-# LINE 51 "Transform.ag" #-}+ constructGrammar _allNonterminals+ _elemsIparamsCollect+ _allFields+ _allAttrDecls+ _elemsIuseMap+ _elemsIderivings+ (if wrappers _lhsIoptions then _allNonterminals else _elemsIwrappers)+ _checkedRules+ _checkedSigs+ _checkedInsts+ _elemsItypeSyns+ _elemsIsemPragmasCollect+ _elemsIattrOrderCollect+ _elemsIctxCollect+ _checkedUniques+ _checkedAugments+ _checkedArounds+ _checkedMerges+ {-# LINE 593 "Transform.hs" #-})+ -- "Transform.ag"(line 246, column 10)+ _allFields =+ ({-# LINE 246 "Transform.ag" #-}+ let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)+ in foldr f (Map.empty) _elemsIcollectedFields+ {-# LINE 599 "Transform.hs" #-})+ -- "Transform.ag"(line 249, column 10)+ _allConstrs =+ ({-# LINE 249 "Transform.ag" #-}+ let f (nt,con,_) = Map.insertWith (++) nt [con]+ in foldr f (Map.empty) _elemsIcollectedFields+ {-# LINE 605 "Transform.hs" #-})+ -- "Transform.ag"(line 252, column 10)+ _allRules =+ ({-# LINE 252 "Transform.ag" #-}+ let f (nt,con,r) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [r])+ in foldr f (Map.empty) _elemsIcollectedRules+ {-# LINE 611 "Transform.hs" #-})+ -- "Transform.ag"(line 255, column 10)+ _allSigs =+ ({-# LINE 255 "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 620 "Transform.hs" #-})+ -- "Transform.ag"(line 261, column 10)+ _allInsts =+ ({-# LINE 261 "Transform.ag" #-}+ let f (nt,con,is) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con is)+ in foldr f (Map.empty) _elemsIcollectedInsts+ {-# LINE 626 "Transform.hs" #-})+ -- "Transform.ag"(line 264, column 10)+ _allUniques =+ ({-# LINE 264 "Transform.ag" #-}+ let f (nt,con,us) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con us)+ in foldr f (Map.empty) _elemsIcollectedUniques+ {-# LINE 632 "Transform.hs" #-})+ -- "Transform.ag"(line 266, column 10)+ _allAugments =+ ({-# LINE 266 "Transform.ag" #-}+ let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+ in foldr f Map.empty _elemsIcollectedAugments+ {-# LINE 638 "Transform.hs" #-})+ -- "Transform.ag"(line 268, column 10)+ _allArounds =+ ({-# LINE 268 "Transform.ag" #-}+ let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+ in foldr f Map.empty _elemsIcollectedArounds+ {-# LINE 644 "Transform.hs" #-})+ -- "Transform.ag"(line 270, column 10)+ _allMerges =+ ({-# LINE 270 "Transform.ag" #-}+ let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+ in foldr f Map.empty _elemsIcollectedMerges+ {-# LINE 650 "Transform.hs" #-})+ -- "Transform.ag"(line 273, column 10)+ _augmentSigs =+ ({-# LINE 273 "Transform.ag" #-}+ let gen mp = []+ in Map.map (Map.map gen) _allAugments+ {-# LINE 656 "Transform.hs" #-})+ -- "Transform.ag"(line 276, column 10)+ _allRulesErrs =+ ({-# LINE 276 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs _allMerges )) _allRules+ {-# LINE 661 "Transform.hs" #-})+ -- "Transform.ag"(line 277, column 10)+ _allNamesErrs =+ ({-# LINE 277 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . checkRuleNames) _allRules+ {-# LINE 666 "Transform.hs" #-})+ -- "Transform.ag"(line 278, column 10)+ _allSigsErrs =+ ({-# LINE 278 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkSigs )) _allSigs+ {-# LINE 671 "Transform.hs" #-})+ -- "Transform.ag"(line 279, column 10)+ _allInstsErrs =+ ({-# LINE 279 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals _allSigs _allFields )) _allInsts+ {-# LINE 676 "Transform.hs" #-})+ -- "Transform.ag"(line 280, column 10)+ _allUniquesErrs =+ ({-# LINE 280 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls )) _allUniques+ {-# LINE 681 "Transform.hs" #-})+ -- "Transform.ag"(line 281, column 10)+ _allAugmentErrs =+ ({-# LINE 281 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls )) _allAugments+ {-# LINE 686 "Transform.hs" #-})+ -- "Transform.ag"(line 282, column 10)+ _allAroundsErrs =+ ({-# LINE 282 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields )) _allArounds+ {-# LINE 691 "Transform.hs" #-})+ -- "Transform.ag"(line 283, column 10)+ _allMergesErrs =+ ({-# LINE 283 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkMerges _allNonterminals _allInsts _allFields )) _allMerges+ {-# LINE 696 "Transform.hs" #-})+ -- "Transform.ag"(line 285, column 10)+ _checkedRulesPre =+ ({-# LINE 285 "Transform.ag" #-}+ Map.map (Map.map fst) _allRulesErrs+ {-# LINE 701 "Transform.hs" #-})+ -- "Transform.ag"(line 286, column 10)+ _checkedSigs =+ ({-# LINE 286 "Transform.ag" #-}+ Map.map (Map.map fst) _allSigsErrs `unionunionplusplus` _augmentSigs+ {-# LINE 706 "Transform.hs" #-})+ -- "Transform.ag"(line 287, column 10)+ _checkedInsts =+ ({-# LINE 287 "Transform.ag" #-}+ Map.map (Map.map fst) _allInstsErrs+ {-# LINE 711 "Transform.hs" #-})+ -- "Transform.ag"(line 288, column 10)+ _checkedUniques =+ ({-# LINE 288 "Transform.ag" #-}+ Map.map (Map.map fst) _allUniquesErrs+ {-# LINE 716 "Transform.hs" #-})+ -- "Transform.ag"(line 289, column 10)+ _checkedAugments =+ ({-# LINE 289 "Transform.ag" #-}+ Map.map (Map.map fst) _allAugmentErrs+ {-# LINE 721 "Transform.hs" #-})+ -- "Transform.ag"(line 290, column 10)+ _checkedArounds =+ ({-# LINE 290 "Transform.ag" #-}+ Map.map (Map.map fst) _allAroundsErrs+ {-# LINE 726 "Transform.hs" #-})+ -- "Transform.ag"(line 291, column 10)+ _checkedRules =+ ({-# LINE 291 "Transform.ag" #-}+ Map.unionWith (Map.unionWith (++)) _checkedRulesPre (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allFields _checkedInsts _allAttrDecls )) _checkedUniques )+ {-# LINE 731 "Transform.hs" #-})+ -- "Transform.ag"(line 292, column 10)+ _checkedMerges =+ ({-# LINE 292 "Transform.ag" #-}+ Map.map (Map.map fst) _allMergesErrs+ {-# LINE 736 "Transform.hs" #-})+ -- "Transform.ag"(line 294, column 10)+ _errs1 =+ ({-# LINE 294 "Transform.ag" #-}+ let f = checkForDuplicates (DupSynonym)+ in Seq.fromList . f . map fst $ _elemsItypeSyns+ {-# LINE 742 "Transform.hs" #-})+ -- "Transform.ag"(line 297, column 10)+ _errs2 =+ ({-# LINE 297 "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 749 "Transform.hs" #-})+ -- "Transform.ag"(line 301, column 10)+ _errs3 =+ ({-# LINE 301 "Transform.ag" #-}+ let f (nt,cons) = checkForDuplicates (DupAlt nt) cons+ in Seq.empty+ {-# LINE 755 "Transform.hs" #-})+ -- "Transform.ag"(line 305, column 10)+ _errs4 =+ ({-# LINE 305 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allRulesErrs+ {-# LINE 761 "Transform.hs" #-})+ -- "Transform.ag"(line 308, column 10)+ _errs5 =+ ({-# LINE 308 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allSigsErrs+ {-# LINE 767 "Transform.hs" #-})+ -- "Transform.ag"(line 311, column 10)+ _errs6 =+ ({-# LINE 311 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allInstsErrs+ {-# LINE 773 "Transform.hs" #-})+ -- "Transform.ag"(line 314, column 10)+ _errs7 =+ ({-# LINE 314 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allUniquesErrs+ {-# LINE 779 "Transform.hs" #-})+ -- "Transform.ag"(line 317, column 10)+ _errs8 =+ ({-# LINE 317 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allAugmentErrs+ {-# LINE 785 "Transform.hs" #-})+ -- "Transform.ag"(line 320, column 10)+ _errs9 =+ ({-# LINE 320 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allAroundsErrs+ {-# LINE 791 "Transform.hs" #-})+ -- "Transform.ag"(line 323, column 10)+ _errs10 =+ ({-# LINE 323 "Transform.ag" #-}+ let f m s = Map.fold ((><)) s m+ in Map.fold f Seq.empty _allNamesErrs+ {-# LINE 797 "Transform.hs" #-})+ -- "Transform.ag"(line 326, column 10)+ _errs11 =+ ({-# LINE 326 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allMergesErrs+ {-# LINE 803 "Transform.hs" #-})+ -- "Transform.ag"(line 329, column 10)+ _lhsOerrors =+ ({-# LINE 329 "Transform.ag" #-}+ _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9 >< _errs10 >< _errs11+ {-# LINE 808 "Transform.hs" #-})+ -- "Transform.ag"(line 531, column 10)+ _allNonterminals =+ ({-# LINE 531 "Transform.ag" #-}+ _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames+ {-# LINE 813 "Transform.hs" #-})+ -- "Transform.ag"(line 551, column 8)+ _elemsOallConstructors =+ ({-# LINE 551 "Transform.ag" #-}+ _elemsIcollectedConstructorsMap+ {-# LINE 818 "Transform.hs" #-})+ -- "Transform.ag"(line 624, column 8)+ _elemsOdefSets =+ ({-# LINE 624 "Transform.ag" #-}+ Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals ))+ {-# LINE 823 "Transform.hs" #-})+ -- "Transform.ag"(line 625, column 8)+ _elemsOdefinedSets =+ ({-# LINE 625 "Transform.ag" #-}+ Map.map fst _elemsIdefSets+ {-# LINE 828 "Transform.hs" #-})+ -- "Transform.ag"(line 879, column 8)+ _elemsOattrDecls =+ ({-# LINE 879 "Transform.ag" #-}+ Map.empty+ {-# LINE 833 "Transform.hs" #-})+ -- "Transform.ag"(line 918, column 9)+ _allAttrDecls =+ ({-# LINE 918 "Transform.ag" #-}+ if withSelf _lhsIoptions+ then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals )+ else _elemsIattrDecls+ {-# LINE 840 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ _elemsIblocks+ {-# LINE 845 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ _elemsImoduleDecl+ {-# LINE 850 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ _elemsIpragmas+ {-# LINE 855 "Transform.hs" #-})+ -- copy rule (from local)+ _elemsOallAttrDecls =+ ({-# LINE 781 "Transform.ag" #-}+ _allAttrDecls+ {-# LINE 860 "Transform.hs" #-})+ -- copy rule (from local)+ _elemsOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _allFields+ {-# LINE 865 "Transform.hs" #-})+ -- copy rule (from local)+ _elemsOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _allNonterminals+ {-# LINE 870 "Transform.hs" #-})+ ( _elemsIattrDecls,_elemsIattrOrderCollect,_elemsIblocks,_elemsIcollectedArounds,_elemsIcollectedAugments,_elemsIcollectedConstructorsMap,_elemsIcollectedFields,_elemsIcollectedInsts,_elemsIcollectedMerges,_elemsIcollectedNames,_elemsIcollectedRules,_elemsIcollectedSetNames,_elemsIcollectedSigs,_elemsIcollectedUniques,_elemsIctxCollect,_elemsIdefSets,_elemsIderivings,_elemsIerrors,_elemsImoduleDecl,_elemsIparamsCollect,_elemsIpragmas,_elemsIsemPragmasCollect,_elemsItypeSyns,_elemsIuseMap,_elemsIwrappers) =+ elems_ _elemsOallAttrDecls _elemsOallConstructors _elemsOallFields _elemsOallNonterminals _elemsOattrDecls _elemsOdefSets _elemsOdefinedSets + in ( _lhsOblocks,_lhsOerrors,_lhsOmoduleDecl,_lhsOoutput,_lhsOpragmas))) )+-- Alt ---------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allConstructors : Map NontermIdent (Set ConstructorIdent)+ allNonterminals : Set NontermIdent+ nts : Set NontermIdent+ synthesized attributes:+ collectedConstructorNames : Set ConstructorIdent+ collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]+ alternatives:+ alternative Alt:+ child pos : {Pos}+ child names : ConstructorSet + child fields : {Fields}+-}+-- cata+sem_Alt :: Alt ->+ T_Alt +sem_Alt (Alt _pos _names _fields ) =+ (sem_Alt_Alt _pos (sem_ConstructorSet _names ) _fields )+-- semantic domain+newtype T_Alt = T_Alt ((Map NontermIdent (Set ConstructorIdent)) ->+ (Set NontermIdent) ->+ (Set NontermIdent) ->+ ( (Set ConstructorIdent),([(NontermIdent, ConstructorIdent, FieldMap)])))+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 {collectedConstructorNames_Syn_Alt :: !((Set ConstructorIdent)),collectedFields_Syn_Alt :: !(([(NontermIdent, ConstructorIdent, FieldMap)]))}+wrap_Alt :: T_Alt ->+ Inh_Alt ->+ Syn_Alt +wrap_Alt (T_Alt sem ) (Inh_Alt _lhsIallConstructors _lhsIallNonterminals _lhsInts ) =+ (let ( _lhsOcollectedConstructorNames,_lhsOcollectedFields) = sem _lhsIallConstructors _lhsIallNonterminals _lhsInts + in (Syn_Alt _lhsOcollectedConstructorNames _lhsOcollectedFields ))+sem_Alt_Alt :: Pos ->+ T_ConstructorSet ->+ Fields ->+ T_Alt +sem_Alt_Alt pos_ (T_ConstructorSet names_ ) fields_ =+ (T_Alt (\ _lhsIallConstructors+ _lhsIallNonterminals+ _lhsInts ->+ (let _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _namesIcollectedConstructorNames :: (Set ConstructorIdent)+ _namesIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _namesIerrors :: (Seq Error)+ -- "Transform.ag"(line 231, column 10)+ _lhsOcollectedFields =+ ({-# LINE 231 "Transform.ag" #-}+ let fieldTable =+ [ (attr, makeType _lhsIallNonterminals tp)+ | (attr, tp) <- fields_+ ]+ in [ (nt, con, fieldTable)+ | nt <- Set.toList _lhsInts+ , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))+ ]+ {-# LINE 932 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 92 "Transform.ag" #-}+ _namesIcollectedConstructorNames+ {-# LINE 937 "Transform.hs" #-})+ ( _namesIcollectedConstructorNames,_namesIconstructors,_namesIerrors) =+ names_ + in ( _lhsOcollectedConstructorNames,_lhsOcollectedFields))) )+-- Alts --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allConstructors : Map NontermIdent (Set ConstructorIdent)+ allNonterminals : Set NontermIdent+ nts : Set NontermIdent+ synthesized attributes:+ collectedConstructorNames : Set ConstructorIdent+ collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]+ alternatives:+ alternative Cons:+ child hd : Alt + child tl : Alts + alternative Nil:+-}+-- cata+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 ((Map NontermIdent (Set ConstructorIdent)) ->+ (Set NontermIdent) ->+ (Set NontermIdent) ->+ ( (Set ConstructorIdent),([(NontermIdent, ConstructorIdent, FieldMap)])))+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 {collectedConstructorNames_Syn_Alts :: !((Set ConstructorIdent)),collectedFields_Syn_Alts :: !(([(NontermIdent, ConstructorIdent, FieldMap)]))}+wrap_Alts :: T_Alts ->+ Inh_Alts ->+ Syn_Alts +wrap_Alts (T_Alts sem ) (Inh_Alts _lhsIallConstructors _lhsIallNonterminals _lhsInts ) =+ (let ( _lhsOcollectedConstructorNames,_lhsOcollectedFields) = sem _lhsIallConstructors _lhsIallNonterminals _lhsInts + in (Syn_Alts _lhsOcollectedConstructorNames _lhsOcollectedFields ))+sem_Alts_Cons :: T_Alt ->+ T_Alts ->+ T_Alts +sem_Alts_Cons (T_Alt hd_ ) (T_Alts tl_ ) =+ (T_Alts (\ _lhsIallConstructors+ _lhsIallNonterminals+ _lhsInts ->+ (let _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _hdOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _hdOallNonterminals :: (Set NontermIdent)+ _hdOnts :: (Set NontermIdent)+ _tlOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _tlOallNonterminals :: (Set NontermIdent)+ _tlOnts :: (Set NontermIdent)+ _hdIcollectedConstructorNames :: (Set ConstructorIdent)+ _hdIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _tlIcollectedConstructorNames :: (Set ConstructorIdent)+ _tlIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ -- use rule "Transform.ag"(line 92, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 92 "Transform.ag" #-}+ _hdIcollectedConstructorNames `Set.union` _tlIcollectedConstructorNames+ {-# LINE 998 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# LINE 1003 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallConstructors =+ ({-# LINE 95 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 1008 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1013 "Transform.hs" #-})+ -- copy rule (down)+ _hdOnts =+ ({-# LINE 166 "Transform.ag" #-}+ _lhsInts+ {-# LINE 1018 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallConstructors =+ ({-# LINE 95 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 1023 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1028 "Transform.hs" #-})+ -- copy rule (down)+ _tlOnts =+ ({-# LINE 166 "Transform.ag" #-}+ _lhsInts+ {-# LINE 1033 "Transform.hs" #-})+ ( _hdIcollectedConstructorNames,_hdIcollectedFields) =+ hd_ _hdOallConstructors _hdOallNonterminals _hdOnts + ( _tlIcollectedConstructorNames,_tlIcollectedFields) =+ tl_ _tlOallConstructors _tlOallNonterminals _tlOnts + in ( _lhsOcollectedConstructorNames,_lhsOcollectedFields))) )+sem_Alts_Nil :: T_Alts +sem_Alts_Nil =+ (T_Alts (\ _lhsIallConstructors+ _lhsIallNonterminals+ _lhsInts ->+ (let _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ -- use rule "Transform.ag"(line 92, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 92 "Transform.ag" #-}+ Set.empty+ {-# LINE 1050 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 1055 "Transform.hs" #-})+ in ( _lhsOcollectedConstructorNames,_lhsOcollectedFields))) )+-- Attrs -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFields : DataTypes+ allNonterminals : Set NontermIdent+ nts : Set NontermIdent+ chained attribute:+ attrDecls : Map NontermIdent (Attributes, Attributes)+ synthesized attributes:+ errors : Seq Error+ useMap : Map NontermIdent (Map Identifier (String,String,String))+ alternatives:+ alternative Attrs:+ child pos : {Pos}+ child inh : {AttrNames}+ child chn : {AttrNames}+ child syn : {AttrNames}+ visit 0:+ local _tup1 : _+ local attrDecls : _+ local errors : _+ local _tup2 : _+ local inherited : _+ local synthesized : _+ local useMap : _+-}+-- cata+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 (DataTypes ->+ (Set NontermIdent) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ (Set NontermIdent) ->+ ( (Map NontermIdent (Attributes, Attributes)),(Seq Error),(Map NontermIdent (Map Identifier (String,String,String)))))+data Inh_Attrs = Inh_Attrs {allFields_Inh_Attrs :: !(DataTypes),allNonterminals_Inh_Attrs :: !((Set NontermIdent)),attrDecls_Inh_Attrs :: !((Map NontermIdent (Attributes, Attributes))),nts_Inh_Attrs :: !((Set NontermIdent))}+data Syn_Attrs = Syn_Attrs {attrDecls_Syn_Attrs :: !((Map NontermIdent (Attributes, Attributes))),errors_Syn_Attrs :: !((Seq Error)),useMap_Syn_Attrs :: !((Map NontermIdent (Map Identifier (String,String,String))))}+wrap_Attrs :: T_Attrs ->+ Inh_Attrs ->+ Syn_Attrs +wrap_Attrs (T_Attrs sem ) (Inh_Attrs _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsInts ) =+ (let ( _lhsOattrDecls,_lhsOerrors,_lhsOuseMap) = sem _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsInts + in (Syn_Attrs _lhsOattrDecls _lhsOerrors _lhsOuseMap ))+sem_Attrs_Attrs :: Pos ->+ AttrNames ->+ AttrNames ->+ AttrNames ->+ T_Attrs +sem_Attrs_Attrs pos_ inh_ chn_ syn_ =+ (T_Attrs (\ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsInts ->+ (let _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOerrors :: (Seq Error)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ -- "Transform.ag"(line 887, column 15)+ __tup1 =+ ({-# LINE 887 "Transform.ag" #-}+ checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls+ {-# LINE 1120 "Transform.hs" #-})+ -- "Transform.ag"(line 887, column 15)+ (_attrDecls,_) =+ ({-# LINE 887 "Transform.ag" #-}+ __tup1+ {-# LINE 1125 "Transform.hs" #-})+ -- "Transform.ag"(line 887, column 15)+ (_,_errors) =+ ({-# LINE 887 "Transform.ag" #-}+ __tup1+ {-# LINE 1130 "Transform.hs" #-})+ -- "Transform.ag"(line 889, column 15)+ __tup2 =+ ({-# LINE 889 "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 (n,(e1,e2,_)) = not (null e1 || null e2)+ in (inh++chn,chn++syn, Map.fromList (Prelude.filter isUse (uses1++uses2)))+ {-# LINE 1142 "Transform.hs" #-})+ -- "Transform.ag"(line 889, column 15)+ (_inherited,_,_) =+ ({-# LINE 889 "Transform.ag" #-}+ __tup2+ {-# LINE 1147 "Transform.hs" #-})+ -- "Transform.ag"(line 889, column 15)+ (_,_synthesized,_) =+ ({-# LINE 889 "Transform.ag" #-}+ __tup2+ {-# LINE 1152 "Transform.hs" #-})+ -- "Transform.ag"(line 889, column 15)+ (_,_,_useMap) =+ ({-# LINE 889 "Transform.ag" #-}+ __tup2+ {-# LINE 1157 "Transform.hs" #-})+ -- "Transform.ag"(line 897, column 11)+ _lhsOuseMap =+ ({-# LINE 897 "Transform.ag" #-}+ Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))+ {-# LINE 1162 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _errors+ {-# LINE 1167 "Transform.hs" #-})+ -- copy rule (from local)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _attrDecls+ {-# LINE 1172 "Transform.hs" #-})+ in ( _lhsOattrDecls,_lhsOerrors,_lhsOuseMap))) )+-- ConstructorSet ----------------------------------------------+{-+ visit 0:+ synthesized attributes:+ collectedConstructorNames : Set ConstructorIdent+ constructors : (Set ConstructorIdent->Set ConstructorIdent)+ errors : Seq Error+ alternatives:+ alternative CAll:+ alternative CDifference:+ child set1 : ConstructorSet + child set2 : ConstructorSet + alternative CName:+ child name : {ConstructorIdent}+ alternative CUnion:+ child set1 : ConstructorSet + child set2 : ConstructorSet +-}+-- cata+sem_ConstructorSet :: ConstructorSet ->+ T_ConstructorSet +sem_ConstructorSet (CAll ) =+ (sem_ConstructorSet_CAll )+sem_ConstructorSet (CDifference _set1 _set2 ) =+ (sem_ConstructorSet_CDifference (sem_ConstructorSet _set1 ) (sem_ConstructorSet _set2 ) )+sem_ConstructorSet (CName _name ) =+ (sem_ConstructorSet_CName _name )+sem_ConstructorSet (CUnion _set1 _set2 ) =+ (sem_ConstructorSet_CUnion (sem_ConstructorSet _set1 ) (sem_ConstructorSet _set2 ) )+-- semantic domain+newtype T_ConstructorSet = T_ConstructorSet (( (Set ConstructorIdent),((Set ConstructorIdent->Set ConstructorIdent)),(Seq Error)))+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))}+wrap_ConstructorSet :: T_ConstructorSet ->+ Inh_ConstructorSet ->+ Syn_ConstructorSet +wrap_ConstructorSet (T_ConstructorSet sem ) (Inh_ConstructorSet ) =+ (let ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors) = sem + in (Syn_ConstructorSet _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors ))+sem_ConstructorSet_CAll :: T_ConstructorSet +sem_ConstructorSet_CAll =+ (T_ConstructorSet (let _lhsOconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _lhsOerrors :: (Seq Error)+ -- "Transform.ag"(line 691, column 17)+ _lhsOconstructors =+ ({-# LINE 691 "Transform.ag" #-}+ \ds -> ds+ {-# LINE 1222 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 92 "Transform.ag" #-}+ Set.empty+ {-# LINE 1227 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 1232 "Transform.hs" #-})+ in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)) )+sem_ConstructorSet_CDifference :: T_ConstructorSet ->+ T_ConstructorSet ->+ T_ConstructorSet +sem_ConstructorSet_CDifference (T_ConstructorSet set1_ ) (T_ConstructorSet set2_ ) =+ (T_ConstructorSet (let _lhsOconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _lhsOerrors :: (Seq Error)+ _set1IcollectedConstructorNames :: (Set ConstructorIdent)+ _set1Iconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _set1Ierrors :: (Seq Error)+ _set2IcollectedConstructorNames :: (Set ConstructorIdent)+ _set2Iconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _set2Ierrors :: (Seq Error)+ -- "Transform.ag"(line 690, column 17)+ _lhsOconstructors =+ ({-# LINE 690 "Transform.ag" #-}+ \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds+ {-# LINE 1251 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 92 "Transform.ag" #-}+ _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+ {-# LINE 1256 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 1261 "Transform.hs" #-})+ ( _set1IcollectedConstructorNames,_set1Iconstructors,_set1Ierrors) =+ set1_ + ( _set2IcollectedConstructorNames,_set2Iconstructors,_set2Ierrors) =+ set2_ + in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)) )+sem_ConstructorSet_CName :: ConstructorIdent ->+ T_ConstructorSet +sem_ConstructorSet_CName name_ =+ (T_ConstructorSet (let _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _lhsOconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _lhsOerrors :: (Seq Error)+ -- "Transform.ag"(line 539, column 11)+ _lhsOcollectedConstructorNames =+ ({-# LINE 539 "Transform.ag" #-}+ Set.singleton name_+ {-# LINE 1277 "Transform.hs" #-})+ -- "Transform.ag"(line 688, column 17)+ _lhsOconstructors =+ ({-# LINE 688 "Transform.ag" #-}+ \ds -> Set.singleton name_+ {-# LINE 1282 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 1287 "Transform.hs" #-})+ in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)) )+sem_ConstructorSet_CUnion :: T_ConstructorSet ->+ T_ConstructorSet ->+ T_ConstructorSet +sem_ConstructorSet_CUnion (T_ConstructorSet set1_ ) (T_ConstructorSet set2_ ) =+ (T_ConstructorSet (let _lhsOconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _lhsOcollectedConstructorNames :: (Set ConstructorIdent)+ _lhsOerrors :: (Seq Error)+ _set1IcollectedConstructorNames :: (Set ConstructorIdent)+ _set1Iconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _set1Ierrors :: (Seq Error)+ _set2IcollectedConstructorNames :: (Set ConstructorIdent)+ _set2Iconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _set2Ierrors :: (Seq Error)+ -- "Transform.ag"(line 689, column 17)+ _lhsOconstructors =+ ({-# LINE 689 "Transform.ag" #-}+ \ds -> _set1Iconstructors ds `Set.union` _set2Iconstructors ds+ {-# LINE 1306 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 92 "Transform.ag" #-}+ _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+ {-# LINE 1311 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 1316 "Transform.hs" #-})+ ( _set1IcollectedConstructorNames,_set1Iconstructors,_set1Ierrors) =+ set1_ + ( _set2IcollectedConstructorNames,_set2Iconstructors,_set2Ierrors) =+ set2_ + in ( _lhsOcollectedConstructorNames,_lhsOconstructors,_lhsOerrors)) )+-- Elem --------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allAttrDecls : Map NontermIdent (Attributes, Attributes)+ allConstructors : Map NontermIdent (Set ConstructorIdent)+ allFields : DataTypes+ allNonterminals : Set NontermIdent+ definedSets : DefinedSets+ chained attributes:+ attrDecls : Map NontermIdent (Attributes, Attributes)+ defSets : Map Identifier (Set NontermIdent,Set Identifier)+ synthesized attributes:+ attrOrderCollect : AttrOrderMap+ blocks : Blocks+ collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)+ collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]+ collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ collectedNames : Set Identifier+ collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]+ collectedSetNames : Set Identifier+ collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]+ collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ ctxCollect : ContextMap+ derivings : Derivings+ errors : Seq Error+ moduleDecl : Maybe (String,String,String)+ paramsCollect : ParamMap+ pragmas : Options -> Options+ semPragmasCollect : PragmaMap+ typeSyns : TypeSyns+ useMap : Map NontermIdent (Map Identifier (String,String,String))+ wrappers : Set NontermIdent+ alternatives:+ alternative Attr:+ child pos : {Pos}+ child ctx : {ClassContext}+ child names : NontSet + child attrs : Attrs + alternative Data:+ child pos : {Pos}+ child ctx : {ClassContext}+ child names : NontSet + child params : {[Identifier]}+ child attrs : Attrs + child alts : Alts + child ext : {Bool}+ alternative Deriving:+ child pos : {Pos}+ child set : NontSet + child classes : {[NontermIdent]}+ alternative Module:+ child pos : {Pos}+ child name : {String}+ child exports : {String}+ child imports : {String}+ alternative Pragma:+ child pos : {Pos}+ child names : {[NontermIdent]}+ alternative Sem:+ child pos : {Pos}+ child ctx : {ClassContext}+ child names : NontSet + child attrs : Attrs + child alts : SemAlts + alternative Set:+ child pos : {Pos}+ child name : {NontermIdent}+ child set : NontSet + visit 0:+ local _tup3 : _+ local defSets2 : _+ local errs : _+ alternative Txt:+ child pos : {Pos}+ child name : {Identifier}+ child mbNt : {Maybe NontermIdent}+ child lines : {[String]}+ visit 0:+ local blockInfo : _+ local blockValue : _+ alternative Type:+ child pos : {Pos}+ child ctx : {ClassContext}+ child name : {NontermIdent}+ child params : {[Identifier]}+ child type : {ComplexType}+ visit 0:+ local expanded : _+ local argType : _+ alternative Wrapper:+ child pos : {Pos}+ child set : NontSet +-}+-- cata+sem_Elem :: Elem ->+ T_Elem +sem_Elem (Attr _pos _ctx _names _attrs ) =+ (sem_Elem_Attr _pos _ctx (sem_NontSet _names ) (sem_Attrs _attrs ) )+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 (Deriving _pos _set _classes ) =+ (sem_Elem_Deriving _pos (sem_NontSet _set ) _classes )+sem_Elem (Module _pos _name _exports _imports ) =+ (sem_Elem_Module _pos _name _exports _imports )+sem_Elem (Pragma _pos _names ) =+ (sem_Elem_Pragma _pos _names )+sem_Elem (Sem _pos _ctx _names _attrs _alts ) =+ (sem_Elem_Sem _pos _ctx (sem_NontSet _names ) (sem_Attrs _attrs ) (sem_SemAlts _alts ) )+sem_Elem (Set _pos _name _set ) =+ (sem_Elem_Set _pos _name (sem_NontSet _set ) )+sem_Elem (Txt _pos _name _mbNt _lines ) =+ (sem_Elem_Txt _pos _name _mbNt _lines )+sem_Elem (Type _pos _ctx _name _params _type ) =+ (sem_Elem_Type _pos _ctx _name _params _type )+sem_Elem (Wrapper _pos _set ) =+ (sem_Elem_Wrapper _pos (sem_NontSet _set ) )+-- semantic domain+newtype T_Elem = T_Elem ((Map NontermIdent (Attributes, Attributes)) ->+ (Map NontermIdent (Set ConstructorIdent)) ->+ DataTypes ->+ (Set NontermIdent) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ (Map Identifier (Set NontermIdent,Set Identifier)) ->+ DefinedSets ->+ ( (Map NontermIdent (Attributes, Attributes)),AttrOrderMap,Blocks,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (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),PragmaMap,TypeSyns,(Map NontermIdent (Map Identifier (String,String,String))),(Set NontermIdent)))+data Inh_Elem = Inh_Elem {allAttrDecls_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))),defSets_Inh_Elem :: !((Map Identifier (Set NontermIdent,Set Identifier))),definedSets_Inh_Elem :: !(DefinedSets)}+data Syn_Elem = Syn_Elem {attrDecls_Syn_Elem :: !((Map NontermIdent (Attributes, Attributes))),attrOrderCollect_Syn_Elem :: !(AttrOrderMap),blocks_Syn_Elem :: !(Blocks),collectedArounds_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedConstructorsMap_Syn_Elem :: !((Map NontermIdent (Set ConstructorIdent))),collectedFields_Syn_Elem :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedInsts_Syn_Elem :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),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)),semPragmasCollect_Syn_Elem :: !(PragmaMap),typeSyns_Syn_Elem :: !(TypeSyns),useMap_Syn_Elem :: !((Map NontermIdent (Map Identifier (String,String,String)))),wrappers_Syn_Elem :: !((Set NontermIdent))}+wrap_Elem :: T_Elem ->+ Inh_Elem ->+ Syn_Elem +wrap_Elem (T_Elem sem ) (Inh_Elem _lhsIallAttrDecls _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIdefSets _lhsIdefinedSets ) =+ (let ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers) = sem _lhsIallAttrDecls _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIdefSets _lhsIdefinedSets + in (Syn_Elem _lhsOattrDecls _lhsOattrOrderCollect _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers ))+sem_Elem_Attr :: Pos ->+ ClassContext ->+ T_NontSet ->+ T_Attrs ->+ T_Elem +sem_Elem_Attr pos_ ctx_ (T_NontSet names_ ) (T_Attrs attrs_ ) =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOctxCollect :: ContextMap+ _attrsOnts :: (Set NontermIdent)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _namesOallFields :: DataTypes+ _namesOallNonterminals :: (Set NontermIdent)+ _namesOdefinedSets :: DefinedSets+ _attrsOallFields :: DataTypes+ _attrsOallNonterminals :: (Set NontermIdent)+ _attrsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _namesIcollectedNames :: (Set Identifier)+ _namesIerrors :: (Seq Error)+ _namesInontSet :: (Set NontermIdent)+ _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _attrsIerrors :: (Seq Error)+ _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ -- "Transform.ag"(line 839, column 7)+ _lhsOctxCollect =+ ({-# LINE 839 "Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1516 "Transform.hs" #-})+ -- "Transform.ag"(line 883, column 10)+ _attrsOnts =+ ({-# LINE 883 "Transform.ag" #-}+ _namesInontSet+ {-# LINE 1521 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 1526 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 1531 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 1536 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 1541 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 1546 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 1551 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 1556 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 1561 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _namesIcollectedNames+ {-# LINE 1566 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 1571 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 1576 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 1581 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 1586 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 1591 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _namesIerrors Seq.>< _attrsIerrors+ {-# LINE 1596 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 1601 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ Map.empty+ {-# LINE 1606 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 1611 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 1616 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 1621 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ _attrsIuseMap+ {-# LINE 1626 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 1631 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _attrsIattrDecls+ {-# LINE 1636 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 1641 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 1646 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1651 "Transform.hs" #-})+ -- copy rule (down)+ _namesOdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 1656 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 1661 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1666 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 1671 "Transform.hs" #-})+ ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =+ names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets + ( _attrsIattrDecls,_attrsIerrors,_attrsIuseMap) =+ attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOnts + in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elem_Data :: Pos ->+ ClassContext ->+ T_NontSet ->+ ([Identifier]) ->+ T_Attrs ->+ T_Alts ->+ Bool ->+ T_Elem +sem_Elem_Data pos_ ctx_ (T_NontSet names_ ) params_ (T_Attrs attrs_ ) (T_Alts alts_ ) ext_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _altsOnts :: (Set NontermIdent)+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOparamsCollect :: ParamMap+ _lhsOctxCollect :: ContextMap+ _attrsOnts :: (Set NontermIdent)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _namesOallFields :: DataTypes+ _namesOallNonterminals :: (Set NontermIdent)+ _namesOdefinedSets :: DefinedSets+ _attrsOallFields :: DataTypes+ _attrsOallNonterminals :: (Set NontermIdent)+ _attrsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _altsOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _altsOallNonterminals :: (Set NontermIdent)+ _namesIcollectedNames :: (Set Identifier)+ _namesIerrors :: (Seq Error)+ _namesInontSet :: (Set NontermIdent)+ _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _attrsIerrors :: (Seq Error)+ _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _altsIcollectedConstructorNames :: (Set ConstructorIdent)+ _altsIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ -- "Transform.ag"(line 169, column 10)+ _altsOnts =+ ({-# LINE 169 "Transform.ag" #-}+ _namesInontSet+ {-# LINE 1740 "Transform.hs" #-})+ -- "Transform.ag"(line 545, column 11)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 545 "Transform.ag" #-}+ Map.fromList+ [ (n, _altsIcollectedConstructorNames)+ | n <- Set.toList _namesInontSet+ ]+ {-# LINE 1748 "Transform.hs" #-})+ -- "Transform.ag"(line 816, column 7)+ _lhsOparamsCollect =+ ({-# LINE 816 "Transform.ag" #-}+ if null params_+ then Map.empty+ else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1755 "Transform.hs" #-})+ -- "Transform.ag"(line 839, column 7)+ _lhsOctxCollect =+ ({-# LINE 839 "Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1762 "Transform.hs" #-})+ -- "Transform.ag"(line 882, column 10)+ _attrsOnts =+ ({-# LINE 882 "Transform.ag" #-}+ _namesInontSet+ {-# LINE 1767 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 1772 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 1777 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 1782 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 1787 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ _altsIcollectedFields+ {-# LINE 1792 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 1797 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 1802 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _namesIcollectedNames+ {-# LINE 1807 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 1812 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 1817 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 1822 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 1827 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 1832 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _namesIerrors Seq.>< _attrsIerrors+ {-# LINE 1837 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 1842 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 1847 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 1852 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 1857 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ _attrsIuseMap+ {-# LINE 1862 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 1867 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _attrsIattrDecls+ {-# LINE 1872 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 1877 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 1882 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1887 "Transform.hs" #-})+ -- copy rule (down)+ _namesOdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 1892 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 1897 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1902 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 1907 "Transform.hs" #-})+ -- copy rule (down)+ _altsOallConstructors =+ ({-# LINE 95 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 1912 "Transform.hs" #-})+ -- copy rule (down)+ _altsOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1917 "Transform.hs" #-})+ ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =+ names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets + ( _attrsIattrDecls,_attrsIerrors,_attrsIuseMap) =+ attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOnts + ( _altsIcollectedConstructorNames,_altsIcollectedFields) =+ alts_ _altsOallConstructors _altsOallNonterminals _altsOnts + in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elem_Deriving :: Pos ->+ T_NontSet ->+ ([NontermIdent]) ->+ T_Elem +sem_Elem_Deriving pos_ (T_NontSet set_ ) classes_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOderivings :: Derivings+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _setOallFields :: DataTypes+ _setOallNonterminals :: (Set NontermIdent)+ _setOdefinedSets :: DefinedSets+ _setIcollectedNames :: (Set Identifier)+ _setIerrors :: (Seq Error)+ _setInontSet :: (Set NontermIdent)+ -- "Transform.ag"(line 867, column 14)+ _lhsOderivings =+ ({-# LINE 867 "Transform.ag" #-}+ Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]+ {-# LINE 1972 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 1977 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 1982 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 1987 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 1992 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 1997 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 2002 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 2007 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 2012 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 2017 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 2022 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 2027 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 2032 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 2037 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 835, column 34)+ _lhsOctxCollect =+ ({-# LINE 835 "Transform.ag" #-}+ Map.empty+ {-# LINE 2042 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _setIerrors+ {-# LINE 2047 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 2052 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ Map.empty+ {-# LINE 2057 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 2062 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 2067 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 2072 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ Map.empty+ {-# LINE 2077 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 2082 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2087 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2092 "Transform.hs" #-})+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2097 "Transform.hs" #-})+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2102 "Transform.hs" #-})+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 2107 "Transform.hs" #-})+ ( _setIcollectedNames,_setIerrors,_setInontSet) =+ set_ _setOallFields _setOallNonterminals _setOdefinedSets + in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elem_Module :: Pos ->+ String ->+ String ->+ String ->+ T_Elem +sem_Elem_Module pos_ name_ exports_ imports_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- "Transform.ag"(line 1045, column 7)+ _lhsOmoduleDecl =+ ({-# LINE 1045 "Transform.ag" #-}+ Just (name_, exports_, imports_)+ {-# LINE 2153 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 2158 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 2163 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 2168 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 2173 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 2178 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 2183 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 2188 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 2193 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ Set.empty+ {-# LINE 2198 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 2203 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 2208 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 2213 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 2218 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 835, column 34)+ _lhsOctxCollect =+ ({-# LINE 835 "Transform.ag" #-}+ Map.empty+ {-# LINE 2223 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 2228 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 2233 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ Map.empty+ {-# LINE 2238 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 2243 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 2248 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 2253 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ Map.empty+ {-# LINE 2258 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 2263 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2268 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2273 "Transform.hs" #-})+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elem_Pragma :: Pos ->+ ([NontermIdent]) ->+ T_Elem +sem_Elem_Pragma pos_ names_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOpragmas :: (Options -> Options)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- "Transform.ag"(line 709, column 13)+ _lhsOpragmas =+ ({-# LINE 709 "Transform.ag" #-}+ let mk n o = case getName n of+ "gencatas" -> o { folds = True }+ "nogencatas" -> o { folds = False }+ "gendatas" -> o { dataTypes = 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" -> o { sepSemMods = True }+ "genlinepragmas" -> o { genLinePragmas = True }+ "newtypes" -> o { newtypes = True }+ "nonewtypes" -> o { newtypes = False }+ _ -> o+ in \o -> foldr mk o names_+ {-# LINE 2356 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 2361 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 2366 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 2371 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 2376 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 2381 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 2386 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 2391 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 2396 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ Set.empty+ {-# LINE 2401 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 2406 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 2411 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 2416 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 2421 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 835, column 34)+ _lhsOctxCollect =+ ({-# LINE 835 "Transform.ag" #-}+ Map.empty+ {-# LINE 2426 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 2431 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 2436 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 2441 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ Map.empty+ {-# LINE 2446 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 2451 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 2456 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ Map.empty+ {-# LINE 2461 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 2466 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2471 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2476 "Transform.hs" #-})+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elem_Sem :: Pos ->+ ClassContext ->+ T_NontSet ->+ T_Attrs ->+ T_SemAlts ->+ T_Elem +sem_Elem_Sem pos_ ctx_ (T_NontSet names_ ) (T_Attrs attrs_ ) (T_SemAlts alts_ ) =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _altsOnts :: (Set NontermIdent)+ _lhsOctxCollect :: ContextMap+ _attrsOnts :: (Set NontermIdent)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _namesOallFields :: DataTypes+ _namesOallNonterminals :: (Set NontermIdent)+ _namesOdefinedSets :: DefinedSets+ _attrsOallFields :: DataTypes+ _attrsOallNonterminals :: (Set NontermIdent)+ _attrsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _altsOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _altsOallFields :: DataTypes+ _namesIcollectedNames :: (Set Identifier)+ _namesIerrors :: (Seq Error)+ _namesInontSet :: (Set NontermIdent)+ _attrsIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _attrsIerrors :: (Seq Error)+ _attrsIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _altsIattrOrderCollect :: AttrOrderMap+ _altsIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _altsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _altsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _altsIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _altsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _altsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _altsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _altsIerrors :: (Seq Error)+ _altsIsemPragmasCollect :: PragmaMap+ -- "Transform.ag"(line 170, column 10)+ _altsOnts =+ ({-# LINE 170 "Transform.ag" #-}+ _namesInontSet+ {-# LINE 2547 "Transform.hs" #-})+ -- "Transform.ag"(line 839, column 7)+ _lhsOctxCollect =+ ({-# LINE 839 "Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 2554 "Transform.hs" #-})+ -- "Transform.ag"(line 884, column 10)+ _attrsOnts =+ ({-# LINE 884 "Transform.ag" #-}+ _namesInontSet+ {-# LINE 2559 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ _altsIattrOrderCollect+ {-# LINE 2564 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 2569 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ _altsIcollectedArounds+ {-# LINE 2574 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ _altsIcollectedAugments+ {-# LINE 2579 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 2584 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 2589 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ _altsIcollectedInsts+ {-# LINE 2594 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ _altsIcollectedMerges+ {-# LINE 2599 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _namesIcollectedNames+ {-# LINE 2604 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ _altsIcollectedRules+ {-# LINE 2609 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 2614 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ _altsIcollectedSigs+ {-# LINE 2619 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ _altsIcollectedUniques+ {-# LINE 2624 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 2629 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors+ {-# LINE 2634 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 2639 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ Map.empty+ {-# LINE 2644 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 2649 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ _altsIsemPragmasCollect+ {-# LINE 2654 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 2659 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ _attrsIuseMap+ {-# LINE 2664 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 2669 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _attrsIattrDecls+ {-# LINE 2674 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2679 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2684 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2689 "Transform.hs" #-})+ -- copy rule (down)+ _namesOdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 2694 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2699 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2704 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2709 "Transform.hs" #-})+ -- copy rule (down)+ _altsOallAttrDecls =+ ({-# LINE 781 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 2714 "Transform.hs" #-})+ -- copy rule (down)+ _altsOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2719 "Transform.hs" #-})+ ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =+ names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets + ( _attrsIattrDecls,_attrsIerrors,_attrsIuseMap) =+ attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOnts + ( _altsIattrOrderCollect,_altsIcollectedArounds,_altsIcollectedAugments,_altsIcollectedInsts,_altsIcollectedMerges,_altsIcollectedRules,_altsIcollectedSigs,_altsIcollectedUniques,_altsIerrors,_altsIsemPragmasCollect) =+ alts_ _altsOallAttrDecls _altsOallFields _altsOnts + in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elem_Set :: Pos ->+ NontermIdent ->+ T_NontSet ->+ T_Elem +sem_Elem_Set pos_ name_ (T_NontSet set_ ) =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _lhsOerrors :: (Seq Error)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _setOallFields :: DataTypes+ _setOallNonterminals :: (Set NontermIdent)+ _setOdefinedSets :: DefinedSets+ _setIcollectedNames :: (Set Identifier)+ _setIerrors :: (Seq Error)+ _setInontSet :: (Set NontermIdent)+ -- "Transform.ag"(line 522, column 10)+ _lhsOcollectedSetNames =+ ({-# LINE 522 "Transform.ag" #-}+ Set.singleton name_+ {-# LINE 2774 "Transform.hs" #-})+ -- "Transform.ag"(line 629, column 13)+ __tup3 =+ ({-# LINE 629 "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) = checkDuplicate DupSet name_ (nontSet,Set.insert name_ allUsedNames) _lhsIdefSets+ in (res, e1 Seq.>< e2)+ {-# LINE 2788 "Transform.hs" #-})+ -- "Transform.ag"(line 629, column 13)+ (_defSets2,_) =+ ({-# LINE 629 "Transform.ag" #-}+ __tup3+ {-# LINE 2793 "Transform.hs" #-})+ -- "Transform.ag"(line 629, column 13)+ (_,_errs) =+ ({-# LINE 629 "Transform.ag" #-}+ __tup3+ {-# LINE 2798 "Transform.hs" #-})+ -- "Transform.ag"(line 639, column 9)+ _lhsOdefSets =+ ({-# LINE 639 "Transform.ag" #-}+ _defSets2+ {-# LINE 2803 "Transform.hs" #-})+ -- "Transform.ag"(line 639, column 9)+ _lhsOerrors =+ ({-# LINE 640 "Transform.ag" #-}+ _errs >< _setIerrors+ {-# LINE 2808 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 2813 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 2818 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 2823 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 2828 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 2833 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 2838 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 2843 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 2848 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 2853 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 2858 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 2863 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 2868 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 835, column 34)+ _lhsOctxCollect =+ ({-# LINE 835 "Transform.ag" #-}+ Map.empty+ {-# LINE 2873 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 2878 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 2883 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ Map.empty+ {-# LINE 2888 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 2893 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 2898 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 2903 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ Map.empty+ {-# LINE 2908 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 2913 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2918 "Transform.hs" #-})+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2923 "Transform.hs" #-})+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2928 "Transform.hs" #-})+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 2933 "Transform.hs" #-})+ ( _setIcollectedNames,_setIerrors,_setInontSet) =+ set_ _setOallFields _setOallNonterminals _setOdefinedSets + in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elem_Txt :: Pos ->+ Identifier ->+ (Maybe NontermIdent) ->+ ([String]) ->+ T_Elem +sem_Elem_Txt pos_ name_ mbNt_ lines_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOblocks :: Blocks+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- "Transform.ag"(line 179, column 10)+ _blockInfo =+ ({-# LINE 179 "Transform.ag" #-}+ ( let nm = getName name_+ in if nm == "imports"+ then BlockImport+ else if nm == "optpragmas"+ then BlockPragma+ else BlockOther+ , mbNt_+ )+ {-# LINE 2986 "Transform.hs" #-})+ -- "Transform.ag"(line 187, column 10)+ _blockValue =+ ({-# LINE 187 "Transform.ag" #-}+ [(lines_, pos_)]+ {-# LINE 2991 "Transform.hs" #-})+ -- "Transform.ag"(line 188, column 10)+ _lhsOblocks =+ ({-# LINE 188 "Transform.ag" #-}+ Map.singleton _blockInfo _blockValue+ {-# LINE 2996 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 3001 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 3006 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 3011 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 3016 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 3021 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 3026 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 3031 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ Set.empty+ {-# LINE 3036 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 3041 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 3046 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 3051 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 3056 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 835, column 34)+ _lhsOctxCollect =+ ({-# LINE 835 "Transform.ag" #-}+ Map.empty+ {-# LINE 3061 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 3066 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 3071 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 3076 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ Map.empty+ {-# LINE 3081 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 3086 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 3091 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 3096 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ Map.empty+ {-# LINE 3101 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 3106 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3111 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3116 "Transform.hs" #-})+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elem_Type :: Pos ->+ ClassContext ->+ NontermIdent ->+ ([Identifier]) ->+ ComplexType ->+ T_Elem +sem_Elem_Type pos_ ctx_ name_ params_ type_ =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOtypeSyns :: TypeSyns+ _lhsOparamsCollect :: ParamMap+ _lhsOctxCollect :: ContextMap+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- "Transform.ag"(line 241, column 10)+ _lhsOcollectedFields =+ ({-# LINE 241 "Transform.ag" #-}+ map (\(x,y)->(name_, x, y)) _expanded+ {-# LINE 3161 "Transform.hs" #-})+ -- "Transform.ag"(line 525, column 11)+ _lhsOcollectedNames =+ ({-# LINE 525 "Transform.ag" #-}+ Set.singleton name_+ {-# LINE 3166 "Transform.hs" #-})+ -- "Transform.ag"(line 579, column 11)+ _expanded =+ ({-# LINE 579 "Transform.ag" #-}+ case _argType of+ List tp -> [(Ident "Cons" pos_, [(Ident "hd" pos_, tp)+ ,(Ident "tl" pos_, NT name_ (map getName params_))+ ]+ )+ ,(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_))+ ])+ , (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_))+ ])+ , (Ident "Nil" pos_, [])+ ]+ Tuple xs -> [(Ident "Tuple" pos_, xs)]+ {-# LINE 3199 "Transform.hs" #-})+ -- "Transform.ag"(line 608, column 11)+ _argType =+ ({-# LINE 608 "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)+ {-# LINE 3210 "Transform.hs" #-})+ -- "Transform.ag"(line 615, column 11)+ _lhsOtypeSyns =+ ({-# LINE 615 "Transform.ag" #-}+ [(name_,_argType)]+ {-# LINE 3215 "Transform.hs" #-})+ -- "Transform.ag"(line 822, column 7)+ _lhsOparamsCollect =+ ({-# LINE 822 "Transform.ag" #-}+ if null params_+ then Map.empty+ else Map.singleton name_ params_+ {-# LINE 3222 "Transform.hs" #-})+ -- "Transform.ag"(line 845, column 7)+ _lhsOctxCollect =+ ({-# LINE 845 "Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.singleton name_ ctx_+ {-# LINE 3229 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 3234 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 3239 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 3244 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 3249 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 3254 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 3259 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 3264 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 3269 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 3274 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 3279 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 3284 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 3289 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 3294 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 3299 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 3304 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 3309 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ Map.empty+ {-# LINE 3314 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 3319 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3324 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3329 "Transform.hs" #-})+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elem_Wrapper :: Pos ->+ T_NontSet ->+ T_Elem +sem_Elem_Wrapper pos_ (T_NontSet set_ ) =+ (T_Elem (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _setOallFields :: DataTypes+ _setOallNonterminals :: (Set NontermIdent)+ _setOdefinedSets :: DefinedSets+ _setIcollectedNames :: (Set Identifier)+ _setIerrors :: (Seq Error)+ _setInontSet :: (Set NontermIdent)+ -- "Transform.ag"(line 700, column 13)+ _lhsOwrappers =+ ({-# LINE 700 "Transform.ag" #-}+ _setInontSet+ {-# LINE 3377 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 3382 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 3387 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 3392 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 3397 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 3402 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 3407 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 3412 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 3417 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 3422 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 3427 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 3432 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 3437 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 3442 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 835, column 34)+ _lhsOctxCollect =+ ({-# LINE 835 "Transform.ag" #-}+ Map.empty+ {-# LINE 3447 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 3452 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _setIerrors+ {-# LINE 3457 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 3462 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ Map.empty+ {-# LINE 3467 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 3472 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 3477 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 3482 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ Map.empty+ {-# LINE 3487 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3492 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3497 "Transform.hs" #-})+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3502 "Transform.hs" #-})+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3507 "Transform.hs" #-})+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 3512 "Transform.hs" #-})+ ( _setIcollectedNames,_setIerrors,_setInontSet) =+ set_ _setOallFields _setOallNonterminals _setOdefinedSets + in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+-- Elems -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allAttrDecls : Map NontermIdent (Attributes, Attributes)+ allConstructors : Map NontermIdent (Set ConstructorIdent)+ allFields : DataTypes+ allNonterminals : Set NontermIdent+ definedSets : DefinedSets+ chained attributes:+ attrDecls : Map NontermIdent (Attributes, Attributes)+ defSets : Map Identifier (Set NontermIdent,Set Identifier)+ synthesized attributes:+ attrOrderCollect : AttrOrderMap+ blocks : Blocks+ collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)+ collectedFields : [(NontermIdent, ConstructorIdent, FieldMap)]+ collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ collectedNames : Set Identifier+ collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]+ collectedSetNames : Set Identifier+ collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]+ collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ ctxCollect : ContextMap+ derivings : Derivings+ errors : Seq Error+ moduleDecl : Maybe (String,String,String)+ paramsCollect : ParamMap+ pragmas : Options -> Options+ semPragmasCollect : PragmaMap+ typeSyns : TypeSyns+ useMap : Map NontermIdent (Map Identifier (String,String,String))+ wrappers : Set NontermIdent+ alternatives:+ alternative Cons:+ child hd : Elem + child tl : Elems + alternative Nil:+-}+-- cata+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 ((Map NontermIdent (Attributes, Attributes)) ->+ (Map NontermIdent (Set ConstructorIdent)) ->+ DataTypes ->+ (Set NontermIdent) ->+ (Map NontermIdent (Attributes, Attributes)) ->+ (Map Identifier (Set NontermIdent,Set Identifier)) ->+ DefinedSets ->+ ( (Map NontermIdent (Attributes, Attributes)),AttrOrderMap,Blocks,([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]),([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (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),PragmaMap,TypeSyns,(Map NontermIdent (Map Identifier (String,String,String))),(Set NontermIdent)))+data Inh_Elems = Inh_Elems {allAttrDecls_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))),defSets_Inh_Elems :: !((Map Identifier (Set NontermIdent,Set Identifier))),definedSets_Inh_Elems :: !(DefinedSets)}+data Syn_Elems = Syn_Elems {attrDecls_Syn_Elems :: !((Map NontermIdent (Attributes, Attributes))),attrOrderCollect_Syn_Elems :: !(AttrOrderMap),blocks_Syn_Elems :: !(Blocks),collectedArounds_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])),collectedAugments_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])),collectedConstructorsMap_Syn_Elems :: !((Map NontermIdent (Set ConstructorIdent))),collectedFields_Syn_Elems :: !(([(NontermIdent, ConstructorIdent, FieldMap)])),collectedInsts_Syn_Elems :: !(([ (NontermIdent, ConstructorIdent, [Identifier]) ])),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)),semPragmasCollect_Syn_Elems :: !(PragmaMap),typeSyns_Syn_Elems :: !(TypeSyns),useMap_Syn_Elems :: !((Map NontermIdent (Map Identifier (String,String,String)))),wrappers_Syn_Elems :: !((Set NontermIdent))}+wrap_Elems :: T_Elems ->+ Inh_Elems ->+ Syn_Elems +wrap_Elems (T_Elems sem ) (Inh_Elems _lhsIallAttrDecls _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIdefSets _lhsIdefinedSets ) =+ (let ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers) = sem _lhsIallAttrDecls _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIdefSets _lhsIdefinedSets + in (Syn_Elems _lhsOattrDecls _lhsOattrOrderCollect _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers ))+sem_Elems_Cons :: T_Elem ->+ T_Elems ->+ T_Elems +sem_Elems_Cons (T_Elem hd_ ) (T_Elems tl_ ) =+ (T_Elems (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _hdOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _hdOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _hdOallFields :: DataTypes+ _hdOallNonterminals :: (Set NontermIdent)+ _hdOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _hdOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _hdOdefinedSets :: DefinedSets+ _tlOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _tlOallConstructors :: (Map NontermIdent (Set ConstructorIdent))+ _tlOallFields :: DataTypes+ _tlOallNonterminals :: (Set NontermIdent)+ _tlOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _tlOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _tlOdefinedSets :: DefinedSets+ _hdIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _hdIattrOrderCollect :: AttrOrderMap+ _hdIblocks :: Blocks+ _hdIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _hdIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _hdIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _hdIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _hdIcollectedNames :: (Set Identifier)+ _hdIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _hdIcollectedSetNames :: (Set Identifier)+ _hdIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _hdIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _hdIctxCollect :: ContextMap+ _hdIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _hdIderivings :: Derivings+ _hdIerrors :: (Seq Error)+ _hdImoduleDecl :: (Maybe (String,String,String))+ _hdIparamsCollect :: ParamMap+ _hdIpragmas :: (Options -> Options)+ _hdIsemPragmasCollect :: PragmaMap+ _hdItypeSyns :: TypeSyns+ _hdIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _hdIwrappers :: (Set NontermIdent)+ _tlIattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _tlIattrOrderCollect :: AttrOrderMap+ _tlIblocks :: Blocks+ _tlIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _tlIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _tlIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _tlIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _tlIcollectedNames :: (Set Identifier)+ _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _tlIcollectedSetNames :: (Set Identifier)+ _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _tlIctxCollect :: ContextMap+ _tlIdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ _tlIderivings :: Derivings+ _tlIerrors :: (Seq Error)+ _tlImoduleDecl :: (Maybe (String,String,String))+ _tlIparamsCollect :: ParamMap+ _tlIpragmas :: (Options -> Options)+ _tlIsemPragmasCollect :: PragmaMap+ _tlItypeSyns :: TypeSyns+ _tlIuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _tlIwrappers :: (Set NontermIdent)+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+ {-# LINE 3684 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ _hdIblocks `mapUnionWithPlusPlus` _tlIblocks+ {-# LINE 3689 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ _hdIcollectedArounds ++ _tlIcollectedArounds+ {-# LINE 3694 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ _hdIcollectedAugments ++ _tlIcollectedAugments+ {-# LINE 3699 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap+ {-# LINE 3704 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# LINE 3709 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ _hdIcollectedInsts ++ _tlIcollectedInsts+ {-# LINE 3714 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ _hdIcollectedMerges ++ _tlIcollectedMerges+ {-# LINE 3719 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _hdIcollectedNames `Set.union` _tlIcollectedNames+ {-# LINE 3724 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ _hdIcollectedRules ++ _tlIcollectedRules+ {-# LINE 3729 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames+ {-# LINE 3734 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ _hdIcollectedSigs ++ _tlIcollectedSigs+ {-# LINE 3739 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ _hdIcollectedUniques ++ _tlIcollectedUniques+ {-# LINE 3744 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 835, column 34)+ _lhsOctxCollect =+ ({-# LINE 835 "Transform.ag" #-}+ _hdIctxCollect `mergeCtx` _tlIctxCollect+ {-# LINE 3749 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ _hdIderivings `mergeDerivings` _tlIderivings+ {-# LINE 3754 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 3759 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ _hdImoduleDecl `mplus` _tlImoduleDecl+ {-# LINE 3764 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ _hdIparamsCollect `mergeParams` _tlIparamsCollect+ {-# LINE 3769 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ _hdIpragmas . _tlIpragmas+ {-# LINE 3774 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+ {-# LINE 3779 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ _hdItypeSyns ++ _tlItypeSyns+ {-# LINE 3784 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ _hdIuseMap `merge` _tlIuseMap+ {-# LINE 3789 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ _hdIwrappers `Set.union` _tlIwrappers+ {-# LINE 3794 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _tlIattrDecls+ {-# LINE 3799 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _tlIdefSets+ {-# LINE 3804 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallAttrDecls =+ ({-# LINE 781 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 3809 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallConstructors =+ ({-# LINE 95 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 3814 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3819 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3824 "Transform.hs" #-})+ -- copy rule (down)+ _hdOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3829 "Transform.hs" #-})+ -- copy rule (down)+ _hdOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3834 "Transform.hs" #-})+ -- copy rule (down)+ _hdOdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 3839 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallAttrDecls =+ ({-# LINE 781 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 3844 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallConstructors =+ ({-# LINE 95 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 3849 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3854 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3859 "Transform.hs" #-})+ -- copy rule (chain)+ _tlOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _hdIattrDecls+ {-# LINE 3864 "Transform.hs" #-})+ -- copy rule (chain)+ _tlOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _hdIdefSets+ {-# LINE 3869 "Transform.hs" #-})+ -- copy rule (down)+ _tlOdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 3874 "Transform.hs" #-})+ ( _hdIattrDecls,_hdIattrOrderCollect,_hdIblocks,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedConstructorsMap,_hdIcollectedFields,_hdIcollectedInsts,_hdIcollectedMerges,_hdIcollectedNames,_hdIcollectedRules,_hdIcollectedSetNames,_hdIcollectedSigs,_hdIcollectedUniques,_hdIctxCollect,_hdIdefSets,_hdIderivings,_hdIerrors,_hdImoduleDecl,_hdIparamsCollect,_hdIpragmas,_hdIsemPragmasCollect,_hdItypeSyns,_hdIuseMap,_hdIwrappers) =+ hd_ _hdOallAttrDecls _hdOallConstructors _hdOallFields _hdOallNonterminals _hdOattrDecls _hdOdefSets _hdOdefinedSets + ( _tlIattrDecls,_tlIattrOrderCollect,_tlIblocks,_tlIcollectedArounds,_tlIcollectedAugments,_tlIcollectedConstructorsMap,_tlIcollectedFields,_tlIcollectedInsts,_tlIcollectedMerges,_tlIcollectedNames,_tlIcollectedRules,_tlIcollectedSetNames,_tlIcollectedSigs,_tlIcollectedUniques,_tlIctxCollect,_tlIdefSets,_tlIderivings,_tlIerrors,_tlImoduleDecl,_tlIparamsCollect,_tlIpragmas,_tlIsemPragmasCollect,_tlItypeSyns,_tlIuseMap,_tlIwrappers) =+ tl_ _tlOallAttrDecls _tlOallConstructors _tlOallFields _tlOallNonterminals _tlOattrDecls _tlOdefSets _tlOdefinedSets + in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+sem_Elems_Nil :: T_Elems +sem_Elems_Nil =+ (T_Elems (\ _lhsIallAttrDecls+ _lhsIallConstructors+ _lhsIallFields+ _lhsIallNonterminals+ _lhsIattrDecls+ _lhsIdefSets+ _lhsIdefinedSets ->+ (let _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOblocks :: Blocks+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))+ _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSetNames :: (Set Identifier)+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOctxCollect :: ContextMap+ _lhsOderivings :: Derivings+ _lhsOerrors :: (Seq Error)+ _lhsOmoduleDecl :: (Maybe (String,String,String))+ _lhsOparamsCollect :: ParamMap+ _lhsOpragmas :: (Options -> Options)+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOtypeSyns :: TypeSyns+ _lhsOuseMap :: (Map NontermIdent (Map Identifier (String,String,String)))+ _lhsOwrappers :: (Set NontermIdent)+ _lhsOattrDecls :: (Map NontermIdent (Attributes, Attributes))+ _lhsOdefSets :: (Map Identifier (Set NontermIdent,Set Identifier))+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 3918 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 3923 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 3928 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 3933 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 93, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 93 "Transform.ag" #-}+ Map.empty+ {-# LINE 3938 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 124, column 28)+ _lhsOcollectedFields =+ ({-# LINE 124 "Transform.ag" #-}+ []+ {-# LINE 3943 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 3948 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 3953 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ Set.empty+ {-# LINE 3958 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 3963 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 3968 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 3973 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 3978 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 835, column 34)+ _lhsOctxCollect =+ ({-# LINE 835 "Transform.ag" #-}+ Map.empty+ {-# LINE 3983 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 860, column 33)+ _lhsOderivings =+ ({-# LINE 860 "Transform.ag" #-}+ Map.empty+ {-# LINE 3988 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 3993 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1041, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 1041 "Transform.ag" #-}+ mzero+ {-# LINE 3998 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 812, column 37)+ _lhsOparamsCollect =+ ({-# LINE 812 "Transform.ag" #-}+ Map.empty+ {-# LINE 4003 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 706, column 34)+ _lhsOpragmas =+ ({-# LINE 706 "Transform.ag" #-}+ id+ {-# LINE 4008 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 4013 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 566, column 32)+ _lhsOtypeSyns =+ ({-# LINE 566 "Transform.ag" #-}+ []+ {-# LINE 4018 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 136, column 15)+ _lhsOuseMap =+ ({-# LINE 136 "Transform.ag" #-}+ Map.empty+ {-# LINE 4023 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 697, column 32)+ _lhsOwrappers =+ ({-# LINE 697 "Transform.ag" #-}+ Set.empty+ {-# LINE 4028 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 135 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 4033 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 103 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 4038 "Transform.hs" #-})+ in ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedNames,_lhsOcollectedRules,_lhsOcollectedSetNames,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOctxCollect,_lhsOdefSets,_lhsOderivings,_lhsOerrors,_lhsOmoduleDecl,_lhsOparamsCollect,_lhsOpragmas,_lhsOsemPragmasCollect,_lhsOtypeSyns,_lhsOuseMap,_lhsOwrappers))) )+-- NontSet -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allFields : DataTypes+ allNonterminals : Set NontermIdent+ definedSets : DefinedSets+ synthesized attributes:+ collectedNames : Set Identifier+ errors : Seq Error+ nontSet : Set NontermIdent+ alternatives:+ alternative All:+ alternative Difference:+ child set1 : NontSet + child set2 : NontSet + alternative Intersect:+ child set1 : NontSet + child set2 : NontSet + alternative NamedSet:+ child name : {NontermIdent}+ visit 0:+ local _tup4 : _+ local nontSet : _+ local errors : _+ alternative Path:+ child from : {NontermIdent}+ child to : {NontermIdent}+ alternative Union:+ child set1 : NontSet + child set2 : NontSet +-}+-- cata+sem_NontSet :: NontSet ->+ T_NontSet +sem_NontSet (All ) =+ (sem_NontSet_All )+sem_NontSet (Difference _set1 _set2 ) =+ (sem_NontSet_Difference (sem_NontSet _set1 ) (sem_NontSet _set2 ) )+sem_NontSet (Intersect _set1 _set2 ) =+ (sem_NontSet_Intersect (sem_NontSet _set1 ) (sem_NontSet _set2 ) )+sem_NontSet (NamedSet _name ) =+ (sem_NontSet_NamedSet _name )+sem_NontSet (Path _from _to ) =+ (sem_NontSet_Path _from _to )+sem_NontSet (Union _set1 _set2 ) =+ (sem_NontSet_Union (sem_NontSet _set1 ) (sem_NontSet _set2 ) )+-- semantic domain+newtype T_NontSet = T_NontSet (DataTypes ->+ (Set NontermIdent) ->+ DefinedSets ->+ ( (Set Identifier),(Seq Error),(Set NontermIdent)))+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))}+wrap_NontSet :: T_NontSet ->+ Inh_NontSet ->+ Syn_NontSet +wrap_NontSet (T_NontSet sem ) (Inh_NontSet _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets ) =+ (let ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet) = sem _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets + in (Syn_NontSet _lhsOcollectedNames _lhsOerrors _lhsOnontSet ))+sem_NontSet_All :: T_NontSet +sem_NontSet_All =+ (T_NontSet (\ _lhsIallFields+ _lhsIallNonterminals+ _lhsIdefinedSets ->+ (let _lhsOnontSet :: (Set NontermIdent)+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOerrors :: (Seq Error)+ -- "Transform.ag"(line 643, column 16)+ _lhsOnontSet =+ ({-# LINE 643 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4112 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ Set.empty+ {-# LINE 4117 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 4122 "Transform.hs" #-})+ in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )+sem_NontSet_Difference :: T_NontSet ->+ T_NontSet ->+ T_NontSet +sem_NontSet_Difference (T_NontSet set1_ ) (T_NontSet set2_ ) =+ (T_NontSet (\ _lhsIallFields+ _lhsIallNonterminals+ _lhsIdefinedSets ->+ (let _lhsOnontSet :: (Set NontermIdent)+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOerrors :: (Seq Error)+ _set1OallFields :: DataTypes+ _set1OallNonterminals :: (Set NontermIdent)+ _set1OdefinedSets :: DefinedSets+ _set2OallFields :: DataTypes+ _set2OallNonterminals :: (Set NontermIdent)+ _set2OdefinedSets :: DefinedSets+ _set1IcollectedNames :: (Set Identifier)+ _set1Ierrors :: (Seq Error)+ _set1InontSet :: (Set NontermIdent)+ _set2IcollectedNames :: (Set Identifier)+ _set2Ierrors :: (Seq Error)+ _set2InontSet :: (Set NontermIdent)+ -- "Transform.ag"(line 649, column 16)+ _lhsOnontSet =+ ({-# LINE 649 "Transform.ag" #-}+ Set.difference _set1InontSet _set2InontSet+ {-# LINE 4150 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# LINE 4155 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 4160 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4165 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4170 "Transform.hs" #-})+ -- copy rule (down)+ _set1OdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4175 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4180 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4185 "Transform.hs" #-})+ -- copy rule (down)+ _set2OdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4190 "Transform.hs" #-})+ ( _set1IcollectedNames,_set1Ierrors,_set1InontSet) =+ set1_ _set1OallFields _set1OallNonterminals _set1OdefinedSets + ( _set2IcollectedNames,_set2Ierrors,_set2InontSet) =+ set2_ _set2OallFields _set2OallNonterminals _set2OdefinedSets + in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )+sem_NontSet_Intersect :: T_NontSet ->+ T_NontSet ->+ T_NontSet +sem_NontSet_Intersect (T_NontSet set1_ ) (T_NontSet set2_ ) =+ (T_NontSet (\ _lhsIallFields+ _lhsIallNonterminals+ _lhsIdefinedSets ->+ (let _lhsOnontSet :: (Set NontermIdent)+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOerrors :: (Seq Error)+ _set1OallFields :: DataTypes+ _set1OallNonterminals :: (Set NontermIdent)+ _set1OdefinedSets :: DefinedSets+ _set2OallFields :: DataTypes+ _set2OallNonterminals :: (Set NontermIdent)+ _set2OdefinedSets :: DefinedSets+ _set1IcollectedNames :: (Set Identifier)+ _set1Ierrors :: (Seq Error)+ _set1InontSet :: (Set NontermIdent)+ _set2IcollectedNames :: (Set Identifier)+ _set2Ierrors :: (Seq Error)+ _set2InontSet :: (Set NontermIdent)+ -- "Transform.ag"(line 648, column 16)+ _lhsOnontSet =+ ({-# LINE 648 "Transform.ag" #-}+ Set.intersection _set1InontSet _set2InontSet+ {-# LINE 4222 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# LINE 4227 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 4232 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4237 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4242 "Transform.hs" #-})+ -- copy rule (down)+ _set1OdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4247 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4252 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4257 "Transform.hs" #-})+ -- copy rule (down)+ _set2OdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4262 "Transform.hs" #-})+ ( _set1IcollectedNames,_set1Ierrors,_set1InontSet) =+ set1_ _set1OallFields _set1OallNonterminals _set1OdefinedSets + ( _set2IcollectedNames,_set2Ierrors,_set2InontSet) =+ set2_ _set2OallFields _set2OallNonterminals _set2OdefinedSets + in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )+sem_NontSet_NamedSet :: NontermIdent ->+ T_NontSet +sem_NontSet_NamedSet name_ =+ (T_NontSet (\ _lhsIallFields+ _lhsIallNonterminals+ _lhsIdefinedSets ->+ (let _lhsOcollectedNames :: (Set Identifier)+ _lhsOerrors :: (Seq Error)+ _lhsOnontSet :: (Set NontermIdent)+ -- "Transform.ag"(line 528, column 14)+ _lhsOcollectedNames =+ ({-# LINE 528 "Transform.ag" #-}+ Set.singleton name_+ {-# LINE 4281 "Transform.hs" #-})+ -- "Transform.ag"(line 644, column 20)+ __tup4 =+ ({-# LINE 644 "Transform.ag" #-}+ case Map.lookup name_ _lhsIdefinedSets of+ Nothing -> (Set.empty, Seq.singleton (UndefNont name_))+ Just set -> (set, Seq.empty)+ {-# LINE 4288 "Transform.hs" #-})+ -- "Transform.ag"(line 644, column 20)+ (_nontSet,_) =+ ({-# LINE 644 "Transform.ag" #-}+ __tup4+ {-# LINE 4293 "Transform.hs" #-})+ -- "Transform.ag"(line 644, column 20)+ (_,_errors) =+ ({-# LINE 644 "Transform.ag" #-}+ __tup4+ {-# LINE 4298 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _errors+ {-# LINE 4303 "Transform.hs" #-})+ -- copy rule (from local)+ _lhsOnontSet =+ ({-# LINE 111 "Transform.ag" #-}+ _nontSet+ {-# LINE 4308 "Transform.hs" #-})+ in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )+sem_NontSet_Path :: NontermIdent ->+ NontermIdent ->+ T_NontSet +sem_NontSet_Path from_ to_ =+ (T_NontSet (\ _lhsIallFields+ _lhsIallNonterminals+ _lhsIdefinedSets ->+ (let _lhsOnontSet :: (Set NontermIdent)+ _lhsOerrors :: (Seq Error)+ _lhsOcollectedNames :: (Set Identifier)+ -- "Transform.ag"(line 650, column 16)+ _lhsOnontSet =+ ({-# LINE 650 "Transform.ag" #-}+ let table = flattenDatas _lhsIallFields+ in path table from_ to_+ {-# LINE 4325 "Transform.hs" #-})+ -- "Transform.ag"(line 652, column 16)+ _lhsOerrors =+ ({-# LINE 652 "Transform.ag" #-}+ let check name | Set.member name _lhsIallNonterminals+ = Seq.empty+ | otherwise = Seq.singleton (UndefNont name)+ in check from_ >< check to_+ {-# LINE 4333 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ Set.empty+ {-# LINE 4338 "Transform.hs" #-})+ in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )+sem_NontSet_Union :: T_NontSet ->+ T_NontSet ->+ T_NontSet +sem_NontSet_Union (T_NontSet set1_ ) (T_NontSet set2_ ) =+ (T_NontSet (\ _lhsIallFields+ _lhsIallNonterminals+ _lhsIdefinedSets ->+ (let _lhsOnontSet :: (Set NontermIdent)+ _lhsOcollectedNames :: (Set Identifier)+ _lhsOerrors :: (Seq Error)+ _set1OallFields :: DataTypes+ _set1OallNonterminals :: (Set NontermIdent)+ _set1OdefinedSets :: DefinedSets+ _set2OallFields :: DataTypes+ _set2OallNonterminals :: (Set NontermIdent)+ _set2OdefinedSets :: DefinedSets+ _set1IcollectedNames :: (Set Identifier)+ _set1Ierrors :: (Seq Error)+ _set1InontSet :: (Set NontermIdent)+ _set2IcollectedNames :: (Set Identifier)+ _set2Ierrors :: (Seq Error)+ _set2InontSet :: (Set NontermIdent)+ -- "Transform.ag"(line 647, column 16)+ _lhsOnontSet =+ ({-# LINE 647 "Transform.ag" #-}+ Set.union _set1InontSet _set2InontSet+ {-# LINE 4366 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 85, column 50)+ _lhsOcollectedNames =+ ({-# LINE 85 "Transform.ag" #-}+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# LINE 4371 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 4376 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4381 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4386 "Transform.hs" #-})+ -- copy rule (down)+ _set1OdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4391 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4396 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallNonterminals =+ ({-# LINE 87 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4401 "Transform.hs" #-})+ -- copy rule (down)+ _set2OdefinedSets =+ ({-# LINE 106 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4406 "Transform.hs" #-})+ ( _set1IcollectedNames,_set1Ierrors,_set1InontSet) =+ set1_ _set1OallFields _set1OallNonterminals _set1OdefinedSets + ( _set2IcollectedNames,_set2Ierrors,_set2InontSet) =+ set2_ _set2OallFields _set2OallNonterminals _set2OdefinedSets + in ( _lhsOcollectedNames,_lhsOerrors,_lhsOnontSet))) )+-- Pattern -----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : SELF + definedAttrs : [AttrName]+ definedInsts : [Identifier]+ patunder : [AttrName]->Pattern+ stpos : Pos+ alternatives:+ alternative Alias:+ child field : {Identifier}+ child attr : {Identifier}+ child pat : Pattern + child parts : Patterns + visit 0:+ local copy : _+ alternative Constr:+ child name : {ConstructorIdent}+ child pats : Patterns + visit 0:+ local copy : _+ alternative Irrefutable:+ child pat : Pattern + visit 0:+ local copy : _+ alternative Product:+ child pos : {Pos}+ child pats : Patterns + visit 0:+ local copy : _+ alternative Underscore:+ child pos : {Pos}+ visit 0:+ local copy : _+-}+-- cata+sem_Pattern :: Pattern ->+ T_Pattern +sem_Pattern (Alias _field _attr _pat _parts ) =+ (sem_Pattern_Alias _field _attr (sem_Pattern _pat ) (sem_Patterns _parts ) )+sem_Pattern (Constr _name _pats ) =+ (sem_Pattern_Constr _name (sem_Patterns _pats ) )+sem_Pattern (Irrefutable _pat ) =+ (sem_Pattern_Irrefutable (sem_Pattern _pat ) )+sem_Pattern (Product _pos _pats ) =+ (sem_Pattern_Product _pos (sem_Patterns _pats ) )+sem_Pattern (Underscore _pos ) =+ (sem_Pattern_Underscore _pos )+-- semantic domain+newtype T_Pattern = T_Pattern (( Pattern ,([AttrName]),([Identifier]),([AttrName]->Pattern),Pos))+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)}+wrap_Pattern :: T_Pattern ->+ Inh_Pattern ->+ Syn_Pattern +wrap_Pattern (T_Pattern sem ) (Inh_Pattern ) =+ (let ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos) = sem + in (Syn_Pattern _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos ))+sem_Pattern_Alias :: Identifier ->+ Identifier ->+ T_Pattern ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) =+ (T_Pattern (let _lhsOdefinedAttrs :: ([AttrName])+ _lhsOpatunder :: ([AttrName]->Pattern)+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOstpos :: Pos+ _lhsOcopy :: Pattern + _patIcopy :: Pattern + _patIdefinedAttrs :: ([AttrName])+ _patIdefinedInsts :: ([Identifier])+ _patIpatunder :: ([AttrName]->Pattern)+ _patIstpos :: Pos+ _partsIcopy :: Patterns + _partsIdefinedAttrs :: ([AttrName])+ _partsIdefinedInsts :: ([Identifier])+ _partsIpatunder :: ([AttrName]->Patterns)+ -- "Transform.ag"(line 1017, column 11)+ _lhsOdefinedAttrs =+ ({-# LINE 1017 "Transform.ag" #-}+ (field_, attr_) : _patIdefinedAttrs+ {-# LINE 4495 "Transform.hs" #-})+ -- "Transform.ag"(line 1018, column 11)+ _lhsOpatunder =+ ({-# LINE 1018 "Transform.ag" #-}+ \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy+ {-# LINE 4500 "Transform.hs" #-})+ -- "Transform.ag"(line 1019, column 11)+ _lhsOdefinedInsts =+ ({-# LINE 1019 "Transform.ag" #-}+ (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts+ {-# LINE 4505 "Transform.hs" #-})+ -- "Transform.ag"(line 1034, column 16)+ _lhsOstpos =+ ({-# LINE 1034 "Transform.ag" #-}+ getPos field_+ {-# LINE 4510 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Alias field_ attr_ _patIcopy _partsIcopy+ {-# LINE 4515 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4520 "Transform.hs" #-})+ ( _patIcopy,_patIdefinedAttrs,_patIdefinedInsts,_patIpatunder,_patIstpos) =+ pat_ + ( _partsIcopy,_partsIdefinedAttrs,_partsIdefinedInsts,_partsIpatunder) =+ parts_ + in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Constr name_ (T_Patterns pats_ ) =+ (T_Pattern (let _lhsOpatunder :: ([AttrName]->Pattern)+ _lhsOstpos :: Pos+ _lhsOdefinedAttrs :: ([AttrName])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns + _patsIdefinedAttrs :: ([AttrName])+ _patsIdefinedInsts :: ([Identifier])+ _patsIpatunder :: ([AttrName]->Patterns)+ -- "Transform.ag"(line 1021, column 12)+ _lhsOpatunder =+ ({-# LINE 1021 "Transform.ag" #-}+ \us -> Constr name_ (_patsIpatunder us)+ {-# LINE 4543 "Transform.hs" #-})+ -- "Transform.ag"(line 1032, column 16)+ _lhsOstpos =+ ({-# LINE 1032 "Transform.ag" #-}+ getPos name_+ {-# LINE 4548 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1012, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1012 "Transform.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 4553 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ _patsIdefinedInsts+ {-# LINE 4558 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 4563 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4568 "Transform.hs" #-})+ ( _patsIcopy,_patsIdefinedAttrs,_patsIdefinedInsts,_patsIpatunder) =+ pats_ + in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern +sem_Pattern_Irrefutable (T_Pattern pat_ ) =+ (T_Pattern (let _lhsOpatunder :: ([AttrName]->Pattern)+ _lhsOdefinedAttrs :: ([AttrName])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOcopy :: Pattern + _lhsOstpos :: Pos+ _patIcopy :: Pattern + _patIdefinedAttrs :: ([AttrName])+ _patIdefinedInsts :: ([Identifier])+ _patIpatunder :: ([AttrName]->Pattern)+ _patIstpos :: Pos+ -- "Transform.ag"(line 1023, column 17)+ _lhsOpatunder =+ ({-# LINE 1023 "Transform.ag" #-}+ \us -> Irrefutable (_patIpatunder us)+ {-# LINE 4589 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1012, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1012 "Transform.ag" #-}+ _patIdefinedAttrs+ {-# LINE 4594 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ _patIdefinedInsts+ {-# LINE 4599 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 4604 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4609 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOstpos =+ ({-# LINE 1029 "Transform.ag" #-}+ _patIstpos+ {-# LINE 4614 "Transform.hs" #-})+ ( _patIcopy,_patIdefinedAttrs,_patIdefinedInsts,_patIpatunder,_patIstpos) =+ pat_ + in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Product pos_ (T_Patterns pats_ ) =+ (T_Pattern (let _lhsOpatunder :: ([AttrName]->Pattern)+ _lhsOstpos :: Pos+ _lhsOdefinedAttrs :: ([AttrName])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns + _patsIdefinedAttrs :: ([AttrName])+ _patsIdefinedInsts :: ([Identifier])+ _patsIpatunder :: ([AttrName]->Patterns)+ -- "Transform.ag"(line 1022, column 13)+ _lhsOpatunder =+ ({-# LINE 1022 "Transform.ag" #-}+ \us -> Product pos_ (_patsIpatunder us)+ {-# LINE 4635 "Transform.hs" #-})+ -- "Transform.ag"(line 1033, column 16)+ _lhsOstpos =+ ({-# LINE 1033 "Transform.ag" #-}+ pos_+ {-# LINE 4640 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1012, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1012 "Transform.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 4645 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ _patsIdefinedInsts+ {-# LINE 4650 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 4655 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4660 "Transform.hs" #-})+ ( _patsIcopy,_patsIdefinedAttrs,_patsIdefinedInsts,_patsIpatunder) =+ pats_ + in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )+sem_Pattern_Underscore :: Pos ->+ T_Pattern +sem_Pattern_Underscore pos_ =+ (T_Pattern (let _lhsOpatunder :: ([AttrName]->Pattern)+ _lhsOstpos :: Pos+ _lhsOdefinedAttrs :: ([AttrName])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOcopy :: Pattern + -- "Transform.ag"(line 1020, column 16)+ _lhsOpatunder =+ ({-# LINE 1020 "Transform.ag" #-}+ \us -> _copy+ {-# LINE 4676 "Transform.hs" #-})+ -- "Transform.ag"(line 1035, column 16)+ _lhsOstpos =+ ({-# LINE 1035 "Transform.ag" #-}+ pos_+ {-# LINE 4681 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1012, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1012 "Transform.ag" #-}+ []+ {-# LINE 4686 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 4691 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Underscore pos_+ {-# LINE 4696 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4701 "Transform.hs" #-})+ in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder,_lhsOstpos)) )+-- Patterns ----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ copy : SELF + definedAttrs : [AttrName]+ definedInsts : [Identifier]+ patunder : [AttrName]->Patterns+ alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 0:+ local copy : _+ alternative Nil:+ visit 0:+ local copy : _+-}+-- cata+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 (( Patterns ,([AttrName]),([Identifier]),([AttrName]->Patterns)))+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))}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns +wrap_Patterns (T_Patterns sem ) (Inh_Patterns ) =+ (let ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder) = sem + in (Syn_Patterns _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder ))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns +sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) =+ (T_Patterns (let _lhsOpatunder :: ([AttrName]->Patterns)+ _lhsOdefinedAttrs :: ([AttrName])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOcopy :: Patterns + _hdIcopy :: Pattern + _hdIdefinedAttrs :: ([AttrName])+ _hdIdefinedInsts :: ([Identifier])+ _hdIpatunder :: ([AttrName]->Pattern)+ _hdIstpos :: Pos+ _tlIcopy :: Patterns + _tlIdefinedAttrs :: ([AttrName])+ _tlIdefinedInsts :: ([Identifier])+ _tlIpatunder :: ([AttrName]->Patterns)+ -- "Transform.ag"(line 1027, column 10)+ _lhsOpatunder =+ ({-# LINE 1027 "Transform.ag" #-}+ \us -> (_hdIpatunder us) : (_tlIpatunder us)+ {-# LINE 4757 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1012, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1012 "Transform.ag" #-}+ _hdIdefinedAttrs ++ _tlIdefinedAttrs+ {-# LINE 4762 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 4767 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 4772 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4777 "Transform.hs" #-})+ ( _hdIcopy,_hdIdefinedAttrs,_hdIdefinedInsts,_hdIpatunder,_hdIstpos) =+ hd_ + ( _tlIcopy,_tlIdefinedAttrs,_tlIdefinedInsts,_tlIpatunder) =+ tl_ + in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder)) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil =+ (T_Patterns (let _lhsOpatunder :: ([AttrName]->Patterns)+ _lhsOdefinedAttrs :: ([AttrName])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOcopy :: Patterns + -- "Transform.ag"(line 1026, column 9)+ _lhsOpatunder =+ ({-# LINE 1026 "Transform.ag" #-}+ \us -> []+ {-# LINE 4793 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1012, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 1012 "Transform.ag" #-}+ []+ {-# LINE 4798 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 4803 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ []+ {-# LINE 4808 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4813 "Transform.hs" #-})+ in ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder)) )+-- SemAlt ------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allAttrDecls : Map NontermIdent (Attributes, Attributes)+ allFields : DataTypes+ nts : Set NontermIdent+ synthesized attributes:+ attrOrderCollect : AttrOrderMap+ collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]+ collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]+ collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ errors : Seq Error+ semPragmasCollect : PragmaMap+ alternatives:+ alternative SemAlt:+ child pos : {Pos}+ child constructorSet : ConstructorSet + child rules : SemDefs + visit 0:+ local pragmaNames : _+ local attrOrders : _+ local coninfo : _+-}+-- cata+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 ((Map NontermIdent (Attributes, Attributes)) ->+ DataTypes ->+ (Set NontermIdent) ->+ ( 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))+data Inh_SemAlt = Inh_SemAlt {allAttrDecls_Inh_SemAlt :: !((Map NontermIdent (Attributes, Attributes))),allFields_Inh_SemAlt :: !(DataTypes),nts_Inh_SemAlt :: !((Set NontermIdent))}+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)}+wrap_SemAlt :: T_SemAlt ->+ Inh_SemAlt ->+ Syn_SemAlt +wrap_SemAlt (T_SemAlt sem ) (Inh_SemAlt _lhsIallAttrDecls _lhsIallFields _lhsInts ) =+ (let ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) = sem _lhsIallAttrDecls _lhsIallFields _lhsInts + in (Syn_SemAlt _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect ))+sem_SemAlt_SemAlt :: Pos ->+ T_ConstructorSet ->+ T_SemDefs ->+ T_SemAlt +sem_SemAlt_SemAlt pos_ (T_ConstructorSet constructorSet_ ) (T_SemDefs rules_ ) =+ (T_SemAlt (\ _lhsIallAttrDecls+ _lhsIallFields+ _lhsInts ->+ (let _lhsOsemPragmasCollect :: PragmaMap+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOerrors :: (Seq Error)+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _constructorSetIcollectedConstructorNames :: (Set ConstructorIdent)+ _constructorSetIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+ _constructorSetIerrors :: (Seq Error)+ _rulesIaroundInfos :: ([AroundInfo])+ _rulesIaugmentInfos :: ([AugmentInfo])+ _rulesIdefinedInsts :: ([Identifier])+ _rulesImergeInfos :: ([MergeInfo])+ _rulesIorderDepsCollect :: (Set Dependency)+ _rulesIpragmaNamesCollect :: ([Identifier])+ _rulesIruleInfos :: ([RuleInfo])+ _rulesIsigInfos :: ([SigInfo])+ _rulesIuniqueInfos :: ([UniqueInfo])+ -- "Transform.ag"(line 756, column 7)+ _pragmaNames =+ ({-# LINE 756 "Transform.ag" #-}+ Set.fromList _rulesIpragmaNamesCollect+ {-# LINE 4895 "Transform.hs" #-})+ -- "Transform.ag"(line 757, column 7)+ _lhsOsemPragmasCollect =+ ({-# LINE 757 "Transform.ag" #-}+ foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4903 "Transform.hs" #-})+ -- "Transform.ag"(line 785, column 7)+ _attrOrders =+ ({-# LINE 785 "Transform.ag" #-}+ [ orderMapSingle nt con _rulesIorderDepsCollect+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4911 "Transform.hs" #-})+ -- "Transform.ag"(line 791, column 7)+ _lhsOattrOrderCollect =+ ({-# LINE 791 "Transform.ag" #-}+ foldr orderMapUnion Map.empty _attrOrders+ {-# LINE 4916 "Transform.hs" #-})+ -- "Transform.ag"(line 937, column 12)+ _coninfo =+ ({-# LINE 937 "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 4926 "Transform.hs" #-})+ -- "Transform.ag"(line 944, column 12)+ _lhsOerrors =+ ({-# LINE 944 "Transform.ag" #-}+ Seq.fromList+ [ UndefAlt nt con+ | (nt, conset, conkeys) <- _coninfo+ , con <- Set.toList (Set.difference conset conkeys)+ ]+ {-# LINE 4935 "Transform.hs" #-})+ -- "Transform.ag"(line 949, column 12)+ _lhsOcollectedRules =+ ({-# LINE 949 "Transform.ag" #-}+ [ (nt,con,r)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ , r <- _rulesIruleInfos+ ]+ {-# LINE 4944 "Transform.hs" #-})+ -- "Transform.ag"(line 955, column 12)+ _lhsOcollectedSigs =+ ({-# LINE 955 "Transform.ag" #-}+ [ (nt,con,ts)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ , ts <- _rulesIsigInfos+ ]+ {-# LINE 4953 "Transform.hs" #-})+ -- "Transform.ag"(line 962, column 12)+ _lhsOcollectedInsts =+ ({-# LINE 962 "Transform.ag" #-}+ [ (nt,con,_rulesIdefinedInsts)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4961 "Transform.hs" #-})+ -- "Transform.ag"(line 968, column 12)+ _lhsOcollectedUniques =+ ({-# LINE 968 "Transform.ag" #-}+ [ (nt,con,_rulesIuniqueInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4969 "Transform.hs" #-})+ -- "Transform.ag"(line 974, column 12)+ _lhsOcollectedAugments =+ ({-# LINE 974 "Transform.ag" #-}+ [ (nt, con, _rulesIaugmentInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4977 "Transform.hs" #-})+ -- "Transform.ag"(line 980, column 12)+ _lhsOcollectedArounds =+ ({-# LINE 980 "Transform.ag" #-}+ [ (nt, con, _rulesIaroundInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4985 "Transform.hs" #-})+ -- "Transform.ag"(line 986, column 12)+ _lhsOcollectedMerges =+ ({-# LINE 986 "Transform.ag" #-}+ [ (nt, con, _rulesImergeInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4993 "Transform.hs" #-})+ ( _constructorSetIcollectedConstructorNames,_constructorSetIconstructors,_constructorSetIerrors) =+ constructorSet_ + ( _rulesIaroundInfos,_rulesIaugmentInfos,_rulesIdefinedInsts,_rulesImergeInfos,_rulesIorderDepsCollect,_rulesIpragmaNamesCollect,_rulesIruleInfos,_rulesIsigInfos,_rulesIuniqueInfos) =+ rules_ + in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )+-- SemAlts -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ allAttrDecls : Map NontermIdent (Attributes, Attributes)+ allFields : DataTypes+ nts : Set NontermIdent+ synthesized attributes:+ attrOrderCollect : AttrOrderMap+ collectedArounds : [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ collectedAugments : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ collectedInsts : [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ collectedMerges : [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ collectedRules : [ (NontermIdent, ConstructorIdent, RuleInfo)]+ collectedSigs : [ (NontermIdent, ConstructorIdent, SigInfo) ]+ collectedUniques : [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ errors : Seq Error+ semPragmasCollect : PragmaMap+ alternatives:+ alternative Cons:+ child hd : SemAlt + child tl : SemAlts + alternative Nil:+-}+-- cata+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 ((Map NontermIdent (Attributes, Attributes)) ->+ DataTypes ->+ (Set NontermIdent) ->+ ( 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))+data Inh_SemAlts = Inh_SemAlts {allAttrDecls_Inh_SemAlts :: !((Map NontermIdent (Attributes, Attributes))),allFields_Inh_SemAlts :: !(DataTypes),nts_Inh_SemAlts :: !((Set NontermIdent))}+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)}+wrap_SemAlts :: T_SemAlts ->+ Inh_SemAlts ->+ Syn_SemAlts +wrap_SemAlts (T_SemAlts sem ) (Inh_SemAlts _lhsIallAttrDecls _lhsIallFields _lhsInts ) =+ (let ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) = sem _lhsIallAttrDecls _lhsIallFields _lhsInts + in (Syn_SemAlts _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect ))+sem_SemAlts_Cons :: T_SemAlt ->+ T_SemAlts ->+ T_SemAlts +sem_SemAlts_Cons (T_SemAlt hd_ ) (T_SemAlts tl_ ) =+ (T_SemAlts (\ _lhsIallAttrDecls+ _lhsIallFields+ _lhsInts ->+ (let _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOerrors :: (Seq Error)+ _lhsOsemPragmasCollect :: PragmaMap+ _hdOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _hdOallFields :: DataTypes+ _hdOnts :: (Set NontermIdent)+ _tlOallAttrDecls :: (Map NontermIdent (Attributes, Attributes))+ _tlOallFields :: DataTypes+ _tlOnts :: (Set NontermIdent)+ _hdIattrOrderCollect :: AttrOrderMap+ _hdIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _hdIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _hdIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _hdIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _hdIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _hdIerrors :: (Seq Error)+ _hdIsemPragmasCollect :: PragmaMap+ _tlIattrOrderCollect :: AttrOrderMap+ _tlIcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _tlIcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _tlIerrors :: (Seq Error)+ _tlIsemPragmasCollect :: PragmaMap+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+ {-# LINE 5088 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ _hdIcollectedArounds ++ _tlIcollectedArounds+ {-# LINE 5093 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ _hdIcollectedAugments ++ _tlIcollectedAugments+ {-# LINE 5098 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ _hdIcollectedInsts ++ _tlIcollectedInsts+ {-# LINE 5103 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ _hdIcollectedMerges ++ _tlIcollectedMerges+ {-# LINE 5108 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ _hdIcollectedRules ++ _tlIcollectedRules+ {-# LINE 5113 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ _hdIcollectedSigs ++ _tlIcollectedSigs+ {-# LINE 5118 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ _hdIcollectedUniques ++ _tlIcollectedUniques+ {-# LINE 5123 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 5128 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+ {-# LINE 5133 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallAttrDecls =+ ({-# LINE 781 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 5138 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 5143 "Transform.hs" #-})+ -- copy rule (down)+ _hdOnts =+ ({-# LINE 166 "Transform.ag" #-}+ _lhsInts+ {-# LINE 5148 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallAttrDecls =+ ({-# LINE 781 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 5153 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallFields =+ ({-# LINE 127 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 5158 "Transform.hs" #-})+ -- copy rule (down)+ _tlOnts =+ ({-# LINE 166 "Transform.ag" #-}+ _lhsInts+ {-# LINE 5163 "Transform.hs" #-})+ ( _hdIattrOrderCollect,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedInsts,_hdIcollectedMerges,_hdIcollectedRules,_hdIcollectedSigs,_hdIcollectedUniques,_hdIerrors,_hdIsemPragmasCollect) =+ hd_ _hdOallAttrDecls _hdOallFields _hdOnts + ( _tlIattrOrderCollect,_tlIcollectedArounds,_tlIcollectedAugments,_tlIcollectedInsts,_tlIcollectedMerges,_tlIcollectedRules,_tlIcollectedSigs,_tlIcollectedUniques,_tlIerrors,_tlIsemPragmasCollect) =+ tl_ _tlOallAttrDecls _tlOallFields _tlOnts + in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )+sem_SemAlts_Nil :: T_SemAlts +sem_SemAlts_Nil =+ (T_SemAlts (\ _lhsIallAttrDecls+ _lhsIallFields+ _lhsInts ->+ (let _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOcollectedArounds :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ])+ _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])+ _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])+ _lhsOcollectedMerges :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ])+ _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+ _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+ _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+ _lhsOerrors :: (Seq Error)+ _lhsOsemPragmasCollect :: PragmaMap+ -- use rule "Transform.ag"(line 780, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 780 "Transform.ag" #-}+ Map.empty+ {-# LINE 5188 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 155, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 155 "Transform.ag" #-}+ []+ {-# LINE 5193 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 154, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 154 "Transform.ag" #-}+ []+ {-# LINE 5198 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 5203 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 156, column 32)+ _lhsOcollectedMerges =+ ({-# LINE 156 "Transform.ag" #-}+ []+ {-# LINE 5208 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedRules =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 5213 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 5218 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 5223 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 5228 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 752, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 752 "Transform.ag" #-}+ Map.empty+ {-# LINE 5233 "Transform.hs" #-})+ in ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedMerges,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )+-- SemDef ------------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ aroundInfos : [AroundInfo]+ augmentInfos : [AugmentInfo]+ definedInsts : [Identifier]+ mergeInfos : [MergeInfo]+ orderDepsCollect : Set Dependency+ pragmaNamesCollect : [Identifier]+ ruleInfos : [RuleInfo]+ sigInfos : [SigInfo]+ uniqueInfos : [UniqueInfo]+ alternatives:+ alternative AroundDef:+ child ident : {Identifier}+ child rhs : {Expression}+ alternative AttrOrderBefore:+ child before : {[Occurrence]}+ child after : {[Occurrence]}+ visit 0:+ local dependency : _+ alternative AugmentDef:+ child ident : {Identifier}+ child rhs : {Expression}+ alternative Def:+ child pos : {Pos}+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : {Expression}+ child owrt : {Bool}+ alternative MergeDef:+ child target : {Identifier}+ child nt : {Identifier}+ child sources : {[Identifier]}+ child rhs : {Expression}+ alternative SemPragma:+ child names : {[NontermIdent]}+ alternative TypeDef:+ child ident : {Identifier}+ child tp : {Type}+ alternative UniqueDef:+ child ident : {Identifier}+ child ref : {Identifier}+-}+-- cata+sem_SemDef :: SemDef ->+ T_SemDef +sem_SemDef (AroundDef _ident _rhs ) =+ (sem_SemDef_AroundDef _ident _rhs )+sem_SemDef (AttrOrderBefore _before _after ) =+ (sem_SemDef_AttrOrderBefore _before _after )+sem_SemDef (AugmentDef _ident _rhs ) =+ (sem_SemDef_AugmentDef _ident _rhs )+sem_SemDef (Def _pos _mbName _pattern _rhs _owrt ) =+ (sem_SemDef_Def _pos _mbName (sem_Pattern _pattern ) _rhs _owrt )+sem_SemDef (MergeDef _target _nt _sources _rhs ) =+ (sem_SemDef_MergeDef _target _nt _sources _rhs )+sem_SemDef (SemPragma _names ) =+ (sem_SemDef_SemPragma _names )+sem_SemDef (TypeDef _ident _tp ) =+ (sem_SemDef_TypeDef _ident _tp )+sem_SemDef (UniqueDef _ident _ref ) =+ (sem_SemDef_UniqueDef _ident _ref )+-- semantic domain+newtype T_SemDef = T_SemDef (( ([AroundInfo]),([AugmentInfo]),([Identifier]),([MergeInfo]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))+data Inh_SemDef = Inh_SemDef {}+data Syn_SemDef = Syn_SemDef {aroundInfos_Syn_SemDef :: !(([AroundInfo])),augmentInfos_Syn_SemDef :: !(([AugmentInfo])),definedInsts_Syn_SemDef :: !(([Identifier])),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]))}+wrap_SemDef :: T_SemDef ->+ Inh_SemDef ->+ Syn_SemDef +wrap_SemDef (T_SemDef sem ) (Inh_SemDef ) =+ (let ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) = sem + in (Syn_SemDef _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos ))+sem_SemDef_AroundDef :: Identifier ->+ Expression ->+ T_SemDef +sem_SemDef_AroundDef ident_ rhs_ =+ (T_SemDef (let _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "Transform.ag"(line 1005, column 17)+ _lhsOaroundInfos =+ ({-# LINE 1005 "Transform.ag" #-}+ [ (ident_, rhs_) ]+ {-# LINE 5326 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 930, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 930 "Transform.ag" #-}+ []+ {-# LINE 5331 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 5336 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 932, column 40)+ _lhsOmergeInfos =+ ({-# LINE 932 "Transform.ag" #-}+ []+ {-# LINE 5341 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 793, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 793 "Transform.ag" #-}+ Set.empty+ {-# LINE 5346 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 762, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 762 "Transform.ag" #-}+ []+ {-# LINE 5351 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 927, column 40)+ _lhsOruleInfos =+ ({-# LINE 927 "Transform.ag" #-}+ []+ {-# LINE 5356 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 928, column 40)+ _lhsOsigInfos =+ ({-# LINE 928 "Transform.ag" #-}+ []+ {-# LINE 5361 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 929, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 929 "Transform.ag" #-}+ []+ {-# LINE 5366 "Transform.hs" #-})+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_AttrOrderBefore :: ([Occurrence]) ->+ ([Occurrence]) ->+ T_SemDef +sem_SemDef_AttrOrderBefore before_ after_ =+ (T_SemDef (let _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "Transform.ag"(line 797, column 7)+ _dependency =+ ({-# LINE 797 "Transform.ag" #-}+ [ Dependency b a | b <- before_, a <- after_ ]+ {-# LINE 5385 "Transform.hs" #-})+ -- "Transform.ag"(line 798, column 7)+ _lhsOorderDepsCollect =+ ({-# LINE 798 "Transform.ag" #-}+ Set.fromList _dependency+ {-# LINE 5390 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 931, column 40)+ _lhsOaroundInfos =+ ({-# LINE 931 "Transform.ag" #-}+ []+ {-# LINE 5395 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 930, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 930 "Transform.ag" #-}+ []+ {-# LINE 5400 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 5405 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 932, column 40)+ _lhsOmergeInfos =+ ({-# LINE 932 "Transform.ag" #-}+ []+ {-# LINE 5410 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 762, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 762 "Transform.ag" #-}+ []+ {-# LINE 5415 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 927, column 40)+ _lhsOruleInfos =+ ({-# LINE 927 "Transform.ag" #-}+ []+ {-# LINE 5420 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 928, column 40)+ _lhsOsigInfos =+ ({-# LINE 928 "Transform.ag" #-}+ []+ {-# LINE 5425 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 929, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 929 "Transform.ag" #-}+ []+ {-# LINE 5430 "Transform.hs" #-})+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_AugmentDef :: Identifier ->+ Expression ->+ T_SemDef +sem_SemDef_AugmentDef ident_ rhs_ =+ (T_SemDef (let _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "Transform.ag"(line 1002, column 17)+ _lhsOaugmentInfos =+ ({-# LINE 1002 "Transform.ag" #-}+ [ (ident_, rhs_) ]+ {-# LINE 5449 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 931, column 40)+ _lhsOaroundInfos =+ ({-# LINE 931 "Transform.ag" #-}+ []+ {-# LINE 5454 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 5459 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 932, column 40)+ _lhsOmergeInfos =+ ({-# LINE 932 "Transform.ag" #-}+ []+ {-# LINE 5464 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 793, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 793 "Transform.ag" #-}+ Set.empty+ {-# LINE 5469 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 762, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 762 "Transform.ag" #-}+ []+ {-# LINE 5474 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 927, column 40)+ _lhsOruleInfos =+ ({-# LINE 927 "Transform.ag" #-}+ []+ {-# LINE 5479 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 928, column 40)+ _lhsOsigInfos =+ ({-# LINE 928 "Transform.ag" #-}+ []+ {-# LINE 5484 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 929, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 929 "Transform.ag" #-}+ []+ {-# LINE 5489 "Transform.hs" #-})+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_Def :: Pos ->+ (Maybe Identifier) ->+ T_Pattern ->+ Expression ->+ Bool ->+ T_SemDef +sem_SemDef_Def pos_ mbName_ (T_Pattern pattern_ ) rhs_ owrt_ =+ (T_SemDef (let _lhsOruleInfos :: ([RuleInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ _patternIcopy :: Pattern + _patternIdefinedAttrs :: ([AttrName])+ _patternIdefinedInsts :: ([Identifier])+ _patternIpatunder :: ([AttrName]->Pattern)+ _patternIstpos :: Pos+ -- "Transform.ag"(line 993, column 10)+ _lhsOruleInfos =+ ({-# LINE 993 "Transform.ag" #-}+ [ (mbName_, _patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos) ]+ {-# LINE 5516 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 931, column 40)+ _lhsOaroundInfos =+ ({-# LINE 931 "Transform.ag" #-}+ []+ {-# LINE 5521 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 930, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 930 "Transform.ag" #-}+ []+ {-# LINE 5526 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ _patternIdefinedInsts+ {-# LINE 5531 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 932, column 40)+ _lhsOmergeInfos =+ ({-# LINE 932 "Transform.ag" #-}+ []+ {-# LINE 5536 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 793, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 793 "Transform.ag" #-}+ Set.empty+ {-# LINE 5541 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 762, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 762 "Transform.ag" #-}+ []+ {-# LINE 5546 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 928, column 40)+ _lhsOsigInfos =+ ({-# LINE 928 "Transform.ag" #-}+ []+ {-# LINE 5551 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 929, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 929 "Transform.ag" #-}+ []+ {-# LINE 5556 "Transform.hs" #-})+ ( _patternIcopy,_patternIdefinedAttrs,_patternIdefinedInsts,_patternIpatunder,_patternIstpos) =+ pattern_ + in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_MergeDef :: Identifier ->+ Identifier ->+ ([Identifier]) ->+ Expression ->+ T_SemDef +sem_SemDef_MergeDef target_ nt_ sources_ rhs_ =+ (T_SemDef (let _lhsOmergeInfos :: ([MergeInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "Transform.ag"(line 1008, column 17)+ _lhsOmergeInfos =+ ({-# LINE 1008 "Transform.ag" #-}+ [ (target_, nt_, sources_, rhs_) ]+ {-# LINE 5579 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 931, column 40)+ _lhsOaroundInfos =+ ({-# LINE 931 "Transform.ag" #-}+ []+ {-# LINE 5584 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 930, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 930 "Transform.ag" #-}+ []+ {-# LINE 5589 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 5594 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 793, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 793 "Transform.ag" #-}+ Set.empty+ {-# LINE 5599 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 762, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 762 "Transform.ag" #-}+ []+ {-# LINE 5604 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 927, column 40)+ _lhsOruleInfos =+ ({-# LINE 927 "Transform.ag" #-}+ []+ {-# LINE 5609 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 928, column 40)+ _lhsOsigInfos =+ ({-# LINE 928 "Transform.ag" #-}+ []+ {-# LINE 5614 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 929, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 929 "Transform.ag" #-}+ []+ {-# LINE 5619 "Transform.hs" #-})+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_SemPragma :: ([NontermIdent]) ->+ T_SemDef +sem_SemDef_SemPragma names_ =+ (T_SemDef (let _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "Transform.ag"(line 766, column 7)+ _lhsOpragmaNamesCollect =+ ({-# LINE 766 "Transform.ag" #-}+ names_+ {-# LINE 5637 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 931, column 40)+ _lhsOaroundInfos =+ ({-# LINE 931 "Transform.ag" #-}+ []+ {-# LINE 5642 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 930, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 930 "Transform.ag" #-}+ []+ {-# LINE 5647 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 5652 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 932, column 40)+ _lhsOmergeInfos =+ ({-# LINE 932 "Transform.ag" #-}+ []+ {-# LINE 5657 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 793, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 793 "Transform.ag" #-}+ Set.empty+ {-# LINE 5662 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 927, column 40)+ _lhsOruleInfos =+ ({-# LINE 927 "Transform.ag" #-}+ []+ {-# LINE 5667 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 928, column 40)+ _lhsOsigInfos =+ ({-# LINE 928 "Transform.ag" #-}+ []+ {-# LINE 5672 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 929, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 929 "Transform.ag" #-}+ []+ {-# LINE 5677 "Transform.hs" #-})+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_TypeDef :: Identifier ->+ Type ->+ T_SemDef +sem_SemDef_TypeDef ident_ tp_ =+ (T_SemDef (let _lhsOsigInfos :: ([SigInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "Transform.ag"(line 996, column 14)+ _lhsOsigInfos =+ ({-# LINE 996 "Transform.ag" #-}+ [ (ident_, tp_) ]+ {-# LINE 5696 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 931, column 40)+ _lhsOaroundInfos =+ ({-# LINE 931 "Transform.ag" #-}+ []+ {-# LINE 5701 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 930, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 930 "Transform.ag" #-}+ []+ {-# LINE 5706 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 5711 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 932, column 40)+ _lhsOmergeInfos =+ ({-# LINE 932 "Transform.ag" #-}+ []+ {-# LINE 5716 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 793, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 793 "Transform.ag" #-}+ Set.empty+ {-# LINE 5721 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 762, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 762 "Transform.ag" #-}+ []+ {-# LINE 5726 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 927, column 40)+ _lhsOruleInfos =+ ({-# LINE 927 "Transform.ag" #-}+ []+ {-# LINE 5731 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 929, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 929 "Transform.ag" #-}+ []+ {-# LINE 5736 "Transform.hs" #-})+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_UniqueDef :: Identifier ->+ Identifier ->+ T_SemDef +sem_SemDef_UniqueDef ident_ ref_ =+ (T_SemDef (let _lhsOuniqueInfos :: ([UniqueInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ -- "Transform.ag"(line 999, column 16)+ _lhsOuniqueInfos =+ ({-# LINE 999 "Transform.ag" #-}+ [ (ident_, ref_) ]+ {-# LINE 5755 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 931, column 40)+ _lhsOaroundInfos =+ ({-# LINE 931 "Transform.ag" #-}+ []+ {-# LINE 5760 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 930, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 930 "Transform.ag" #-}+ []+ {-# LINE 5765 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 5770 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 932, column 40)+ _lhsOmergeInfos =+ ({-# LINE 932 "Transform.ag" #-}+ []+ {-# LINE 5775 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 793, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 793 "Transform.ag" #-}+ Set.empty+ {-# LINE 5780 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 762, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 762 "Transform.ag" #-}+ []+ {-# LINE 5785 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 927, column 40)+ _lhsOruleInfos =+ ({-# LINE 927 "Transform.ag" #-}+ []+ {-# LINE 5790 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 928, column 40)+ _lhsOsigInfos =+ ({-# LINE 928 "Transform.ag" #-}+ []+ {-# LINE 5795 "Transform.hs" #-})+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+-- SemDefs -----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ aroundInfos : [AroundInfo]+ augmentInfos : [AugmentInfo]+ definedInsts : [Identifier]+ mergeInfos : [MergeInfo]+ orderDepsCollect : Set Dependency+ pragmaNamesCollect : [Identifier]+ ruleInfos : [RuleInfo]+ sigInfos : [SigInfo]+ uniqueInfos : [UniqueInfo]+ alternatives:+ alternative Cons:+ child hd : SemDef + child tl : SemDefs + alternative Nil:+-}+-- cata+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 (( ([AroundInfo]),([AugmentInfo]),([Identifier]),([MergeInfo]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))+data Inh_SemDefs = Inh_SemDefs {}+data Syn_SemDefs = Syn_SemDefs {aroundInfos_Syn_SemDefs :: !(([AroundInfo])),augmentInfos_Syn_SemDefs :: !(([AugmentInfo])),definedInsts_Syn_SemDefs :: !(([Identifier])),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]))}+wrap_SemDefs :: T_SemDefs ->+ Inh_SemDefs ->+ Syn_SemDefs +wrap_SemDefs (T_SemDefs sem ) (Inh_SemDefs ) =+ (let ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) = sem + in (Syn_SemDefs _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos ))+sem_SemDefs_Cons :: T_SemDef ->+ T_SemDefs ->+ T_SemDefs +sem_SemDefs_Cons (T_SemDef hd_ ) (T_SemDefs tl_ ) =+ (T_SemDefs (let _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ _hdIaroundInfos :: ([AroundInfo])+ _hdIaugmentInfos :: ([AugmentInfo])+ _hdIdefinedInsts :: ([Identifier])+ _hdImergeInfos :: ([MergeInfo])+ _hdIorderDepsCollect :: (Set Dependency)+ _hdIpragmaNamesCollect :: ([Identifier])+ _hdIruleInfos :: ([RuleInfo])+ _hdIsigInfos :: ([SigInfo])+ _hdIuniqueInfos :: ([UniqueInfo])+ _tlIaroundInfos :: ([AroundInfo])+ _tlIaugmentInfos :: ([AugmentInfo])+ _tlIdefinedInsts :: ([Identifier])+ _tlImergeInfos :: ([MergeInfo])+ _tlIorderDepsCollect :: (Set Dependency)+ _tlIpragmaNamesCollect :: ([Identifier])+ _tlIruleInfos :: ([RuleInfo])+ _tlIsigInfos :: ([SigInfo])+ _tlIuniqueInfos :: ([UniqueInfo])+ -- use rule "Transform.ag"(line 931, column 40)+ _lhsOaroundInfos =+ ({-# LINE 931 "Transform.ag" #-}+ _hdIaroundInfos ++ _tlIaroundInfos+ {-# LINE 5866 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 930, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 930 "Transform.ag" #-}+ _hdIaugmentInfos ++ _tlIaugmentInfos+ {-# LINE 5871 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 5876 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 932, column 40)+ _lhsOmergeInfos =+ ({-# LINE 932 "Transform.ag" #-}+ _hdImergeInfos ++ _tlImergeInfos+ {-# LINE 5881 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 793, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 793 "Transform.ag" #-}+ _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect+ {-# LINE 5886 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 762, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 762 "Transform.ag" #-}+ _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect+ {-# LINE 5891 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 927, column 40)+ _lhsOruleInfos =+ ({-# LINE 927 "Transform.ag" #-}+ _hdIruleInfos ++ _tlIruleInfos+ {-# LINE 5896 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 928, column 40)+ _lhsOsigInfos =+ ({-# LINE 928 "Transform.ag" #-}+ _hdIsigInfos ++ _tlIsigInfos+ {-# LINE 5901 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 929, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 929 "Transform.ag" #-}+ _hdIuniqueInfos ++ _tlIuniqueInfos+ {-# LINE 5906 "Transform.hs" #-})+ ( _hdIaroundInfos,_hdIaugmentInfos,_hdIdefinedInsts,_hdImergeInfos,_hdIorderDepsCollect,_hdIpragmaNamesCollect,_hdIruleInfos,_hdIsigInfos,_hdIuniqueInfos) =+ hd_ + ( _tlIaroundInfos,_tlIaugmentInfos,_tlIdefinedInsts,_tlImergeInfos,_tlIorderDepsCollect,_tlIpragmaNamesCollect,_tlIruleInfos,_tlIsigInfos,_tlIuniqueInfos) =+ tl_ + in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDefs_Nil :: T_SemDefs +sem_SemDefs_Nil =+ (T_SemDefs (let _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOmergeInfos :: ([MergeInfo])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- use rule "Transform.ag"(line 931, column 40)+ _lhsOaroundInfos =+ ({-# LINE 931 "Transform.ag" #-}+ []+ {-# LINE 5927 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 930, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 930 "Transform.ag" #-}+ []+ {-# LINE 5932 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 1011, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 1011 "Transform.ag" #-}+ []+ {-# LINE 5937 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 932, column 40)+ _lhsOmergeInfos =+ ({-# LINE 932 "Transform.ag" #-}+ []+ {-# LINE 5942 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 793, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 793 "Transform.ag" #-}+ Set.empty+ {-# LINE 5947 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 762, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 762 "Transform.ag" #-}+ []+ {-# LINE 5952 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 927, column 40)+ _lhsOruleInfos =+ ({-# LINE 927 "Transform.ag" #-}+ []+ {-# LINE 5957 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 928, column 40)+ _lhsOsigInfos =+ ({-# LINE 928 "Transform.ag" #-}+ []+ {-# LINE 5962 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 929, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 929 "Transform.ag" #-}+ []+ {-# LINE 5967 "Transform.hs" #-}) in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOmergeInfos,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )
src-derived/Visage.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (Visage.ag)+-- UUAGC 0.9.30 (Visage.ag) module Visage where {-# LINE 6 "Visage.ag" #-} @@ -85,8 +85,7 @@ Inh_Expression -> Syn_Expression wrap_Expression (T_Expression sem ) (Inh_Expression ) =- (let ( _lhsOaterm) =- (sem )+ (let ( _lhsOaterm) = sem in (Syn_Expression _lhsOaterm )) sem_Expression_Expression :: Pos -> ([HsToken]) ->@@ -97,7 +96,7 @@ _lhsOaterm = ({-# LINE 103 "Visage.ag" #-} AAppl "Expression" [AString (sQ (showAGPos pos_)), AString (sQ (unlines . showTokens . tokensToStrings $ tks_))]- {-# LINE 101 "Visage.hs" #-})+ {-# LINE 100 "Visage.hs" #-}) in ( _lhsOaterm)) ) -- VisageChild ------------------------------------------------- {-@@ -125,8 +124,7 @@ Inh_VisageChild -> Syn_VisageChild wrap_VisageChild (T_VisageChild sem ) (Inh_VisageChild ) =- (let ( _lhsOaterm) =- (sem )+ (let ( _lhsOaterm) = sem in (Syn_VisageChild _lhsOaterm )) sem_VisageChild_VChild :: Identifier -> Type ->@@ -145,14 +143,14 @@ AString (sQ (showMap inh_)), AString (sQ (showMap syn_)), AAppl "Rules" _rulesIaterms]- {-# LINE 149 "Visage.hs" #-})+ {-# LINE 147 "Visage.hs" #-}) -- "Visage.ag"(line 89, column 18) _rulesOisLoc = ({-# LINE 89 "Visage.ag" #-} False- {-# LINE 154 "Visage.hs" #-})+ {-# LINE 152 "Visage.hs" #-}) ( _rulesIaterms) =- (rules_ _rulesOisLoc )+ rules_ _rulesOisLoc in ( _lhsOaterm)) ) -- VisageChildren ---------------------------------------------- {-@@ -178,8 +176,7 @@ Inh_VisageChildren -> Syn_VisageChildren wrap_VisageChildren (T_VisageChildren sem ) (Inh_VisageChildren ) =- (let ( _lhsOaterms) =- (sem )+ (let ( _lhsOaterms) = sem in (Syn_VisageChildren _lhsOaterms )) sem_VisageChildren_Cons :: T_VisageChild -> T_VisageChildren ->@@ -192,11 +189,11 @@ _lhsOaterms = ({-# LINE 80 "Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 196 "Visage.hs" #-})+ {-# LINE 193 "Visage.hs" #-}) ( _hdIaterm) =- (hd_ )+ hd_ ( _tlIaterms) =- (tl_ )+ tl_ in ( _lhsOaterms)) ) sem_VisageChildren_Nil :: T_VisageChildren sem_VisageChildren_Nil =@@ -205,7 +202,7 @@ _lhsOaterms = ({-# LINE 81 "Visage.ag" #-} []- {-# LINE 209 "Visage.hs" #-})+ {-# LINE 206 "Visage.hs" #-}) in ( _lhsOaterms)) ) -- VisageGrammar ----------------------------------------------- {-@@ -229,8 +226,7 @@ Inh_VisageGrammar -> Syn_VisageGrammar wrap_VisageGrammar (T_VisageGrammar sem ) (Inh_VisageGrammar ) =- (let ( _lhsOaterm) =- (sem )+ (let ( _lhsOaterm) = sem in (Syn_VisageGrammar _lhsOaterm )) sem_VisageGrammar_VGrammar :: T_VisageNonterminals -> T_VisageGrammar @@ -241,9 +237,9 @@ _lhsOaterm = ({-# LINE 54 "Visage.ag" #-} AAppl "Productions" _nontsIaterms- {-# LINE 245 "Visage.hs" #-})+ {-# LINE 241 "Visage.hs" #-}) ( _nontsIaterms) =- (nonts_ )+ nonts_ in ( _lhsOaterm)) ) -- VisageNonterminal ------------------------------------------- {-@@ -270,8 +266,7 @@ Inh_VisageNonterminal -> Syn_VisageNonterminal wrap_VisageNonterminal (T_VisageNonterminal sem ) (Inh_VisageNonterminal ) =- (let ( _lhsOaterm) =- (sem )+ (let ( _lhsOaterm) = sem in (Syn_VisageNonterminal _lhsOaterm )) sem_VisageNonterminal_VNonterminal :: NontermIdent -> Attributes ->@@ -286,9 +281,9 @@ ({-# LINE 63 "Visage.ag" #-} AAppl "Production" [AString (sQ (getName nt_)), AString (sQ(showMap inh_)), AString (sQ(showMap syn_)), AAppl "Alternatives" _altsIaterms]- {-# LINE 290 "Visage.hs" #-})+ {-# LINE 285 "Visage.hs" #-}) ( _altsIaterms) =- (alts_ )+ alts_ in ( _lhsOaterm)) ) -- VisageNonterminals ------------------------------------------ {-@@ -314,8 +309,7 @@ Inh_VisageNonterminals -> Syn_VisageNonterminals wrap_VisageNonterminals (T_VisageNonterminals sem ) (Inh_VisageNonterminals ) =- (let ( _lhsOaterms) =- (sem )+ (let ( _lhsOaterms) = sem in (Syn_VisageNonterminals _lhsOaterms )) sem_VisageNonterminals_Cons :: T_VisageNonterminal -> T_VisageNonterminals ->@@ -328,11 +322,11 @@ _lhsOaterms = ({-# LINE 58 "Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 332 "Visage.hs" #-})+ {-# LINE 326 "Visage.hs" #-}) ( _hdIaterm) =- (hd_ )+ hd_ ( _tlIaterms) =- (tl_ )+ tl_ in ( _lhsOaterms)) ) sem_VisageNonterminals_Nil :: T_VisageNonterminals sem_VisageNonterminals_Nil =@@ -341,7 +335,7 @@ _lhsOaterms = ({-# LINE 59 "Visage.ag" #-} []- {-# LINE 345 "Visage.hs" #-})+ {-# LINE 339 "Visage.hs" #-}) in ( _lhsOaterms)) ) -- VisagePattern ----------------------------------------------- {-@@ -386,8 +380,7 @@ Inh_VisagePattern -> Syn_VisagePattern wrap_VisagePattern (T_VisagePattern sem ) (Inh_VisagePattern ) =- (let ( _lhsOaterm) =- (sem )+ (let ( _lhsOaterm) = sem in (Syn_VisagePattern _lhsOaterm )) sem_VisagePattern_VAlias :: Identifier -> Identifier ->@@ -401,9 +394,9 @@ ({-# LINE 119 "Visage.ag" #-} AAppl "Pattern" [AAppl "Alias" [AString (sQ (showAGPos (getPos field_))), AString (sQ (getName field_ ++ "." ++ getName attr_)), _patIaterm]]- {-# LINE 405 "Visage.hs" #-})+ {-# LINE 398 "Visage.hs" #-}) ( _patIaterm) =- (pat_ )+ pat_ in ( _lhsOaterm)) ) sem_VisagePattern_VConstr :: ConstructorIdent -> T_VisagePatterns ->@@ -417,9 +410,9 @@ AAppl "Pattern" [AAppl "Constr" [AString (sQ (showAGPos (getPos name_))), AString (sQ (getName name_)), AAppl "Patterns" _patsIaterms]]- {-# LINE 421 "Visage.hs" #-})+ {-# LINE 414 "Visage.hs" #-}) ( _patsIaterms) =- (pats_ )+ pats_ in ( _lhsOaterm)) ) sem_VisagePattern_VProduct :: Pos -> T_VisagePatterns ->@@ -432,9 +425,9 @@ ({-# LINE 115 "Visage.ag" #-} AAppl "Pattern" [AAppl "Product" [AString (sQ (showAGPos pos_)), AAppl "Patterns" _patsIaterms]]- {-# LINE 436 "Visage.hs" #-})+ {-# LINE 429 "Visage.hs" #-}) ( _patsIaterms) =- (pats_ )+ pats_ in ( _lhsOaterm)) ) sem_VisagePattern_VUnderscore :: Pos -> T_VisagePattern @@ -444,7 +437,7 @@ _lhsOaterm = ({-# LINE 121 "Visage.ag" #-} AAppl "Pattern" [AAppl "Underscore" [AString (sQ (showAGPos pos_))]]- {-# LINE 448 "Visage.hs" #-})+ {-# LINE 441 "Visage.hs" #-}) in ( _lhsOaterm)) ) sem_VisagePattern_VVar :: Identifier -> Identifier ->@@ -456,7 +449,7 @@ ({-# LINE 117 "Visage.ag" #-} AAppl "Pattern" [AAppl "Var" [AString (sQ (showAGPos (getPos field_))), AString (sQ (getName field_ ++ "." ++ getName attr_))]]- {-# LINE 460 "Visage.hs" #-})+ {-# LINE 453 "Visage.hs" #-}) in ( _lhsOaterm)) ) -- VisagePatterns ---------------------------------------------- {-@@ -482,8 +475,7 @@ Inh_VisagePatterns -> Syn_VisagePatterns wrap_VisagePatterns (T_VisagePatterns sem ) (Inh_VisagePatterns ) =- (let ( _lhsOaterms) =- (sem )+ (let ( _lhsOaterms) = sem in (Syn_VisagePatterns _lhsOaterms )) sem_VisagePatterns_Cons :: T_VisagePattern -> T_VisagePatterns ->@@ -496,11 +488,11 @@ _lhsOaterms = ({-# LINE 107 "Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 500 "Visage.hs" #-})+ {-# LINE 492 "Visage.hs" #-}) ( _hdIaterm) =- (hd_ )+ hd_ ( _tlIaterms) =- (tl_ )+ tl_ in ( _lhsOaterms)) ) sem_VisagePatterns_Nil :: T_VisagePatterns sem_VisagePatterns_Nil =@@ -509,7 +501,7 @@ _lhsOaterms = ({-# LINE 108 "Visage.ag" #-} []- {-# LINE 513 "Visage.hs" #-})+ {-# LINE 505 "Visage.hs" #-}) in ( _lhsOaterms)) ) -- VisageProduction -------------------------------------------- {-@@ -536,8 +528,7 @@ Inh_VisageProduction -> Syn_VisageProduction wrap_VisageProduction (T_VisageProduction sem ) (Inh_VisageProduction ) =- (let ( _lhsOaterm) =- (sem )+ (let ( _lhsOaterm) = sem in (Syn_VisageProduction _lhsOaterm )) sem_VisageProduction_VProduction :: ConstructorIdent -> T_VisageChildren ->@@ -557,23 +548,23 @@ AAppl "Alternative" [AString (sQ (getName con_)), AAppl "Children" _childrenIaterms, AAppl "Rules" _rulesIaterms, AAppl "LocRules" _locrulesIaterms]- {-# LINE 561 "Visage.hs" #-})+ {-# LINE 552 "Visage.hs" #-}) -- "Visage.ag"(line 76, column 18) _locrulesOisLoc = ({-# LINE 76 "Visage.ag" #-} True- {-# LINE 566 "Visage.hs" #-})+ {-# LINE 557 "Visage.hs" #-}) -- "Visage.ag"(line 77, column 18) _rulesOisLoc = ({-# LINE 77 "Visage.ag" #-} False- {-# LINE 571 "Visage.hs" #-})+ {-# LINE 562 "Visage.hs" #-}) ( _childrenIaterms) =- (children_ )+ children_ ( _rulesIaterms) =- (rules_ _rulesOisLoc )+ rules_ _rulesOisLoc ( _locrulesIaterms) =- (locrules_ _locrulesOisLoc )+ locrules_ _locrulesOisLoc in ( _lhsOaterm)) ) -- VisageProductions ------------------------------------------- {-@@ -599,8 +590,7 @@ Inh_VisageProductions -> Syn_VisageProductions wrap_VisageProductions (T_VisageProductions sem ) (Inh_VisageProductions ) =- (let ( _lhsOaterms) =- (sem )+ (let ( _lhsOaterms) = sem in (Syn_VisageProductions _lhsOaterms )) sem_VisageProductions_Cons :: T_VisageProduction -> T_VisageProductions ->@@ -613,11 +603,11 @@ _lhsOaterms = ({-# LINE 68 "Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 617 "Visage.hs" #-})+ {-# LINE 607 "Visage.hs" #-}) ( _hdIaterm) =- (hd_ )+ hd_ ( _tlIaterms) =- (tl_ )+ tl_ in ( _lhsOaterms)) ) sem_VisageProductions_Nil :: T_VisageProductions sem_VisageProductions_Nil =@@ -626,7 +616,7 @@ _lhsOaterms = ({-# LINE 69 "Visage.ag" #-} []- {-# LINE 630 "Visage.hs" #-})+ {-# LINE 620 "Visage.hs" #-}) in ( _lhsOaterms)) ) -- VisageRule -------------------------------------------------- {-@@ -657,8 +647,7 @@ Inh_VisageRule -> Syn_VisageRule wrap_VisageRule (T_VisageRule sem ) (Inh_VisageRule _lhsIisLoc ) =- (let ( _lhsOaterm) =- (sem _lhsIisLoc )+ (let ( _lhsOaterm) = sem _lhsIisLoc in (Syn_VisageRule _lhsOaterm )) sem_VisageRule_VRule :: ([(Identifier,Identifier)]) -> Identifier ->@@ -676,11 +665,11 @@ ({-# LINE 97 "Visage.ag" #-} AAppl (if _lhsIisLoc then "LocRule" else "Rule") ([AString (sQ (getName attr_)), _patIaterm, _rhsIaterm] ++ if _lhsIisLoc then [AString (sQ (show owrt_))] else [])- {-# LINE 680 "Visage.hs" #-})+ {-# LINE 669 "Visage.hs" #-}) ( _patIaterm) =- (pat_ )+ pat_ ( _rhsIaterm) =- (rhs_ )+ rhs_ in ( _lhsOaterm))) ) -- VisageRules ------------------------------------------------- {-@@ -709,8 +698,7 @@ Inh_VisageRules -> Syn_VisageRules wrap_VisageRules (T_VisageRules sem ) (Inh_VisageRules _lhsIisLoc ) =- (let ( _lhsOaterms) =- (sem _lhsIisLoc )+ (let ( _lhsOaterms) = sem _lhsIisLoc in (Syn_VisageRules _lhsOaterms )) sem_VisageRules_Cons :: T_VisageRule -> T_VisageRules ->@@ -726,21 +714,21 @@ _lhsOaterms = ({-# LINE 92 "Visage.ag" #-} _hdIaterm : _tlIaterms- {-# LINE 730 "Visage.hs" #-})+ {-# LINE 718 "Visage.hs" #-}) -- copy rule (down) _hdOisLoc = ({-# LINE 51 "Visage.ag" #-} _lhsIisLoc- {-# LINE 735 "Visage.hs" #-})+ {-# LINE 723 "Visage.hs" #-}) -- copy rule (down) _tlOisLoc = ({-# LINE 51 "Visage.ag" #-} _lhsIisLoc- {-# LINE 740 "Visage.hs" #-})+ {-# LINE 728 "Visage.hs" #-}) ( _hdIaterm) =- (hd_ _hdOisLoc )+ hd_ _hdOisLoc ( _tlIaterms) =- (tl_ _tlOisLoc )+ tl_ _tlOisLoc in ( _lhsOaterms))) ) sem_VisageRules_Nil :: T_VisageRules sem_VisageRules_Nil =@@ -750,5 +738,5 @@ _lhsOaterms = ({-# LINE 93 "Visage.ag" #-} []- {-# LINE 754 "Visage.hs" #-})+ {-# LINE 742 "Visage.hs" #-}) in ( _lhsOaterms))) )
src-derived/VisagePatterns.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (VisagePatterns.ag)+-- UUAGC 0.9.30 (VisagePatterns.ag) module VisagePatterns where {-# LINE 2 "VisagePatterns.ag" #-}
src-derived/VisageSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.29 (VisageSyntax.ag)+-- UUAGC 0.9.30 (VisageSyntax.ag) module VisageSyntax where {-# LINE 2 "VisageSyntax.ag" #-}
src/Version.hs view
@@ -1,4 +1,4 @@ module Version where banner :: String -banner = "Attribute Grammar compiler / HUT project. Version 0.9.30" +banner = "Attribute Grammar compiler / HUT project. Version 0.9.31"
uuagc.cabal view
@@ -1,7 +1,7 @@ cabal-version: >=1.2 build-type: Simple name: uuagc-version: 0.9.30+version: 0.9.31 license: GPL license-file: LICENSE maintainer: Arie Middelkoop <ariem@cs.uu.nl>
uuagc.cabal-for-ghc-6.6 view
@@ -1,5 +1,5 @@ name: uuagc-version: 0.9.30+version: 0.9.31 license: GPL license-file: LICENSE maintainer: Arie Middelkoop <ariem@cs.uu.nl>