packages feed

uuagc 0.9.18 → 0.9.19

raw patch · 30 files changed

+26175/−19102 lines, 30 filesdep ~uulibPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: uulib

API changes (from Hackage documentation)

Files

src-derived/AbstractSyntax.hs view
@@ -2,6 +2,7 @@  -- UUAGC 0.9.14 (AbstractSyntax.ag) module AbstractSyntax where+{-# LINE 2 "AbstractSyntax.ag" #-}  -- AbstractSyntax.ag imports import Data.Set(Set)@@ -9,6 +10,7 @@ import Patterns    (Pattern(..),Patterns) import Expression  (Expression(..)) import CommonTypes+{-# LINE 14 "../src-derived/AbstractSyntax.hs" #-} -- Child ------------------------------------------------------- {-    alternatives:@@ -44,8 +46,9 @@          child contextMap     : {ContextMap}          child uniqueMap      : {UniqueMap}          child augmentsMap    : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+         child aroundsMap     : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))} -}-data Grammar  = Grammar (TypeSyns) (UseMap) (Derivings) (Set NontermIdent) (Nonterminals) (PragmaMap) (AttrOrderMap) (ParamMap) (ContextMap) (UniqueMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) +data Grammar  = Grammar (TypeSyns) (UseMap) (Derivings) (Set NontermIdent) (Nonterminals) (PragmaMap) (AttrOrderMap) (ParamMap) (ContextMap) (UniqueMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression])))  -- Nonterminal ------------------------------------------------- {-    alternatives:
src-derived/AbstractSyntaxDump.hs view
@@ -2,6 +2,7 @@  -- UUAGC 0.9.14 (AbstractSyntaxDump.ag) module AbstractSyntaxDump where+{-# LINE 6 "AbstractSyntaxDump.ag" #-}  import Data.List import qualified Data.Map as Map@@ -11,7 +12,9 @@  import AbstractSyntax import TokenDef+{-# LINE 16 "../src-derived/AbstractSyntaxDump.hs" #-} +{-# LINE 2 "./AbstractSyntax.ag" #-}  -- AbstractSyntax.ag imports import Data.Set(Set)@@ -19,15 +22,20 @@ import Patterns    (Pattern(..),Patterns) import Expression  (Expression(..)) import CommonTypes+{-# LINE 26 "../src-derived/AbstractSyntaxDump.hs" #-} +{-# LINE 2 "./Patterns.ag" #-}  -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 33 "../src-derived/AbstractSyntaxDump.hs" #-} +{-# LINE 2 "./Expression.ag" #-}  import UU.Scanner.Position(Pos) import HsToken+{-# LINE 39 "../src-derived/AbstractSyntaxDump.hs" #-} -- Child ------------------------------------------------------- {-    visit 0:@@ -67,7 +75,9 @@     (T_Child (let _lhsOpp :: PP_Doc                   -- "AbstractSyntaxDump.ag"(line 35, column 33)                   _lhsOpp =+                      {-# LINE 35 "AbstractSyntaxDump.ag" #-}                       ppNestInfo ["Child","Child"] [pp name_, ppShow tp_] [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_] []+                      {-# LINE 81 "AbstractSyntaxDump.hs" #-}               in  ( _lhsOpp)) ) -- Children ---------------------------------------------------- {-@@ -108,10 +118,14 @@                      _tlIppL :: ([PP_Doc])                      -- "AbstractSyntaxDump.ag"(line 67, column 33)                      _lhsOppL =+                         {-# LINE 67 "AbstractSyntaxDump.ag" #-}                          _hdIpp : _tlIppL+                         {-# LINE 124 "AbstractSyntaxDump.hs" #-}                      -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                      _lhsOpp =+                         {-# LINE 17 "AbstractSyntaxDump.ag" #-}                          _hdIpp >-< _tlIpp+                         {-# LINE 129 "AbstractSyntaxDump.hs" #-}                      ( _hdIpp) =                          (hd_ )                      ( _tlIpp,_tlIppL) =@@ -123,10 +137,14 @@                      _lhsOpp :: PP_Doc                      -- "AbstractSyntaxDump.ag"(line 68, column 33)                      _lhsOppL =+                         {-# LINE 68 "AbstractSyntaxDump.ag" #-}                          []+                         {-# LINE 143 "AbstractSyntaxDump.hs" #-}                      -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                      _lhsOpp =+                         {-# LINE 17 "AbstractSyntaxDump.ag" #-}                          empty+                         {-# LINE 148 "AbstractSyntaxDump.hs" #-}                  in  ( _lhsOpp,_lhsOppL)) ) -- Expression -------------------------------------------------- {-@@ -161,7 +179,9 @@     (T_Expression (let _lhsOpp :: PP_Doc                        -- "AbstractSyntaxDump.ag"(line 50, column 25)                        _lhsOpp =+                           {-# LINE 50 "AbstractSyntaxDump.ag" #-}                            ppNestInfo ["Expression","Expression"] [ppShow pos_] [ppF "txt" $ vlist . showTokens . tokensToStrings $ tks_] []+                           {-# LINE 185 "AbstractSyntaxDump.hs" #-}                    in  ( _lhsOpp)) ) -- Grammar ----------------------------------------------------- {-@@ -181,12 +201,13 @@          child contextMap     : {ContextMap}          child uniqueMap      : {UniqueMap}          child augmentsMap    : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+         child aroundsMap     : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))} -} -- cata sem_Grammar :: Grammar  ->                T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )  =-    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )+sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap )  =+    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap ) -- semantic domain newtype T_Grammar  = T_Grammar (( PP_Doc)) data Inh_Grammar  = Inh_Grammar {}@@ -209,13 +230,15 @@                        ContextMap ->                        UniqueMap ->                        (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+                       (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->                        T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_  =+sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_ aroundsMap_  =     (T_Grammar (let _lhsOpp :: PP_Doc                     _nontsIpp :: PP_Doc                     _nontsIppL :: ([PP_Doc])                     -- "AbstractSyntaxDump.ag"(line 20, column 25)                     _lhsOpp =+                        {-# LINE 20 "AbstractSyntaxDump.ag" #-}                         ppNestInfo ["Grammar","Grammar"] []                            [ ppF "typeSyns" $ ppAssocL typeSyns_                            , ppF "useMap" $ ppMap $ Map.map ppMap $ useMap_@@ -223,6 +246,7 @@                            , ppF "wrappers" $ ppShow $ wrappers_                            , ppF "nonts" $ ppVList _nontsIppL                            ] []+                        {-# LINE 250 "AbstractSyntaxDump.hs" #-}                     ( _nontsIpp,_nontsIppL) =                         (nonts_ )                 in  ( _lhsOpp)) )@@ -267,7 +291,9 @@                         _prodsIppL :: ([PP_Doc])                         -- "AbstractSyntaxDump.ag"(line 29, column 25)                         _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 297 "AbstractSyntaxDump.hs" #-}                         ( _prodsIpp,_prodsIppL) =                             (prods_ )                     in  ( _lhsOpp)) )@@ -310,10 +336,14 @@                          _tlIppL :: ([PP_Doc])                          -- "AbstractSyntaxDump.ag"(line 75, column 33)                          _lhsOppL =+                             {-# LINE 75 "AbstractSyntaxDump.ag" #-}                              _hdIpp : _tlIppL+                             {-# LINE 342 "AbstractSyntaxDump.hs" #-}                          -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                          _lhsOpp =+                             {-# LINE 17 "AbstractSyntaxDump.ag" #-}                              _hdIpp >-< _tlIpp+                             {-# LINE 347 "AbstractSyntaxDump.hs" #-}                          ( _hdIpp) =                              (hd_ )                          ( _tlIpp,_tlIppL) =@@ -325,10 +355,14 @@                          _lhsOpp :: PP_Doc                          -- "AbstractSyntaxDump.ag"(line 76, column 33)                          _lhsOppL =+                             {-# LINE 76 "AbstractSyntaxDump.ag" #-}                              []+                             {-# LINE 361 "AbstractSyntaxDump.hs" #-}                          -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                          _lhsOpp =+                             {-# LINE 17 "AbstractSyntaxDump.ag" #-}                              empty+                             {-# LINE 366 "AbstractSyntaxDump.hs" #-}                      in  ( _lhsOpp,_lhsOppL)) ) -- Pattern ----------------------------------------------------- {-@@ -402,13 +436,19 @@                     _partsIppL :: ([PP_Doc])                     -- "AbstractSyntaxDump.ag"(line 46, column 33)                     _lhsOpp =+                        {-# LINE 46 "AbstractSyntaxDump.ag" #-}                         ppNestInfo ["Pattern","Alias"] [pp field_, pp attr_] [ppF "pat" $ _patIpp] []+                        {-# LINE 442 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Alias field_ attr_ _patIcopy _partsIcopy+                        {-# LINE 447 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 452 "AbstractSyntaxDump.hs" #-}                     ( _patIcopy,_patIpp) =                         (pat_ )                     ( _partsIcopy,_partsIpp,_partsIppL) =@@ -425,13 +465,19 @@                     _patsIppL :: ([PP_Doc])                     -- "AbstractSyntaxDump.ag"(line 44, column 33)                     _lhsOpp =+                        {-# LINE 44 "AbstractSyntaxDump.ag" #-}                         ppNestInfo ["Pattern","Constr"] [pp name_] [ppF "pats" $ ppVList _patsIppL] []+                        {-# LINE 471 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Constr name_ _patsIcopy+                        {-# LINE 476 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 481 "AbstractSyntaxDump.hs" #-}                     ( _patsIcopy,_patsIpp,_patsIppL) =                         (pats_ )                 in  ( _lhsOcopy,_lhsOpp)) )@@ -444,13 +490,19 @@                     _patIpp :: PP_Doc                     -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                     _lhsOpp =+                        {-# LINE 17 "AbstractSyntaxDump.ag" #-}                         _patIpp+                        {-# LINE 496 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Irrefutable _patIcopy+                        {-# LINE 501 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 506 "AbstractSyntaxDump.hs" #-}                     ( _patIcopy,_patIpp) =                         (pat_ )                 in  ( _lhsOcopy,_lhsOpp)) )@@ -465,13 +517,19 @@                     _patsIppL :: ([PP_Doc])                     -- "AbstractSyntaxDump.ag"(line 45, column 33)                     _lhsOpp =+                        {-# LINE 45 "AbstractSyntaxDump.ag" #-}                         ppNestInfo ["Pattern","Product"] [ppShow pos_] [ppF "pats" $ ppVList _patsIppL] []+                        {-# LINE 523 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Product pos_ _patsIcopy+                        {-# LINE 528 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 533 "AbstractSyntaxDump.hs" #-}                     ( _patsIcopy,_patsIpp,_patsIppL) =                         (pats_ )                 in  ( _lhsOcopy,_lhsOpp)) )@@ -482,13 +540,19 @@                     _lhsOcopy :: Pattern                     -- "AbstractSyntaxDump.ag"(line 47, column 25)                     _lhsOpp =+                        {-# LINE 47 "AbstractSyntaxDump.ag" #-}                         ppNestInfo ["Pattern","Underscore"] [ppShow pos_] [] []+                        {-# LINE 546 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Underscore pos_+                        {-# LINE 551 "AbstractSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 556 "AbstractSyntaxDump.hs" #-}                 in  ( _lhsOcopy,_lhsOpp)) ) -- Patterns ---------------------------------------------------- {-@@ -537,16 +601,24 @@                      _tlIppL :: ([PP_Doc])                      -- "AbstractSyntaxDump.ag"(line 55, column 33)                      _lhsOppL =+                         {-# LINE 55 "AbstractSyntaxDump.ag" #-}                          _hdIpp : _tlIppL+                         {-# LINE 607 "AbstractSyntaxDump.hs" #-}                      -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                      _lhsOpp =+                         {-# LINE 17 "AbstractSyntaxDump.ag" #-}                          _hdIpp >-< _tlIpp+                         {-# LINE 612 "AbstractSyntaxDump.hs" #-}                      -- self rule                      _copy =+                         {-# LINE 23 "./Patterns.ag" #-}                          (:) _hdIcopy _tlIcopy+                         {-# LINE 617 "AbstractSyntaxDump.hs" #-}                      -- self rule                      _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}                          _copy+                         {-# LINE 622 "AbstractSyntaxDump.hs" #-}                      ( _hdIcopy,_hdIpp) =                          (hd_ )                      ( _tlIcopy,_tlIpp,_tlIppL) =@@ -559,16 +631,24 @@                      _lhsOcopy :: Patterns                      -- "AbstractSyntaxDump.ag"(line 56, column 33)                      _lhsOppL =+                         {-# LINE 56 "AbstractSyntaxDump.ag" #-}                          []+                         {-# LINE 637 "AbstractSyntaxDump.hs" #-}                      -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                      _lhsOpp =+                         {-# LINE 17 "AbstractSyntaxDump.ag" #-}                          empty+                         {-# LINE 642 "AbstractSyntaxDump.hs" #-}                      -- self rule                      _copy =+                         {-# LINE 23 "./Patterns.ag" #-}                          []+                         {-# LINE 647 "AbstractSyntaxDump.hs" #-}                      -- self rule                      _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}                          _copy+                         {-# LINE 652 "AbstractSyntaxDump.hs" #-}                  in  ( _lhsOcopy,_lhsOpp,_lhsOppL)) ) -- Production -------------------------------------------------- {-@@ -613,7 +693,9 @@                        _typeSigsIppL :: ([PP_Doc])                        -- "AbstractSyntaxDump.ag"(line 32, column 25)                        _lhsOpp =+                           {-# LINE 32 "AbstractSyntaxDump.ag" #-}                            ppNestInfo ["Production","Production"] [pp con_] [ppF "children" $ ppVList _childrenIppL,ppF "rules" $ ppVList _rulesIppL,ppF "typeSigs" $ ppVList _typeSigsIppL] []+                           {-# LINE 699 "AbstractSyntaxDump.hs" #-}                        ( _childrenIpp,_childrenIppL) =                            (children_ )                        ( _rulesIpp,_rulesIppL) =@@ -660,10 +742,14 @@                         _tlIppL :: ([PP_Doc])                         -- "AbstractSyntaxDump.ag"(line 71, column 33)                         _lhsOppL =+                            {-# LINE 71 "AbstractSyntaxDump.ag" #-}                             _hdIpp : _tlIppL+                            {-# LINE 748 "AbstractSyntaxDump.hs" #-}                         -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                         _lhsOpp =+                            {-# LINE 17 "AbstractSyntaxDump.ag" #-}                             _hdIpp >-< _tlIpp+                            {-# LINE 753 "AbstractSyntaxDump.hs" #-}                         ( _hdIpp) =                             (hd_ )                         ( _tlIpp,_tlIppL) =@@ -675,10 +761,14 @@                         _lhsOpp :: PP_Doc                         -- "AbstractSyntaxDump.ag"(line 72, column 33)                         _lhsOppL =+                            {-# LINE 72 "AbstractSyntaxDump.ag" #-}                             []+                            {-# LINE 767 "AbstractSyntaxDump.hs" #-}                         -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                         _lhsOpp =+                            {-# LINE 17 "AbstractSyntaxDump.ag" #-}                             empty+                            {-# LINE 772 "AbstractSyntaxDump.hs" #-}                     in  ( _lhsOpp,_lhsOppL)) ) -- Rule -------------------------------------------------------- {-@@ -720,7 +810,9 @@                  _rhsIpp :: PP_Doc                  -- "AbstractSyntaxDump.ag"(line 38, column 33)                  _lhsOpp =+                     {-# LINE 38 "AbstractSyntaxDump.ag" #-}                      ppNestInfo ["Rule","Rule"] [ppShow owrt_, pp origin_] [ppF "pattern" $ _patternIpp, ppF "rhs" $ _rhsIpp] []+                     {-# LINE 816 "AbstractSyntaxDump.hs" #-}                  ( _patternIcopy,_patternIpp) =                      (pattern_ )                  ( _rhsIpp) =@@ -765,10 +857,14 @@                   _tlIppL :: ([PP_Doc])                   -- "AbstractSyntaxDump.ag"(line 63, column 33)                   _lhsOppL =+                      {-# LINE 63 "AbstractSyntaxDump.ag" #-}                       _hdIpp : _tlIppL+                      {-# LINE 863 "AbstractSyntaxDump.hs" #-}                   -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                   _lhsOpp =+                      {-# LINE 17 "AbstractSyntaxDump.ag" #-}                       _hdIpp >-< _tlIpp+                      {-# LINE 868 "AbstractSyntaxDump.hs" #-}                   ( _hdIpp) =                       (hd_ )                   ( _tlIpp,_tlIppL) =@@ -780,10 +876,14 @@                   _lhsOpp :: PP_Doc                   -- "AbstractSyntaxDump.ag"(line 64, column 33)                   _lhsOppL =+                      {-# LINE 64 "AbstractSyntaxDump.ag" #-}                       []+                      {-# LINE 882 "AbstractSyntaxDump.hs" #-}                   -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                   _lhsOpp =+                      {-# LINE 17 "AbstractSyntaxDump.ag" #-}                       empty+                      {-# LINE 887 "AbstractSyntaxDump.hs" #-}               in  ( _lhsOpp,_lhsOppL)) ) -- TypeSig ----------------------------------------------------- {-@@ -818,7 +918,9 @@     (T_TypeSig (let _lhsOpp :: PP_Doc                     -- "AbstractSyntaxDump.ag"(line 41, column 33)                     _lhsOpp =+                        {-# LINE 41 "AbstractSyntaxDump.ag" #-}                         ppNestInfo ["TypeSig","TypeSig"] [pp name_, ppShow tp_] [] []+                        {-# LINE 924 "AbstractSyntaxDump.hs" #-}                 in  ( _lhsOpp)) ) -- TypeSigs ---------------------------------------------------- {-@@ -859,10 +961,14 @@                      _tlIppL :: ([PP_Doc])                      -- "AbstractSyntaxDump.ag"(line 59, column 33)                      _lhsOppL =+                         {-# LINE 59 "AbstractSyntaxDump.ag" #-}                          _hdIpp : _tlIppL+                         {-# LINE 967 "AbstractSyntaxDump.hs" #-}                      -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                      _lhsOpp =+                         {-# LINE 17 "AbstractSyntaxDump.ag" #-}                          _hdIpp >-< _tlIpp+                         {-# LINE 972 "AbstractSyntaxDump.hs" #-}                      ( _hdIpp) =                          (hd_ )                      ( _tlIpp,_tlIppL) =@@ -874,8 +980,12 @@                      _lhsOpp :: PP_Doc                      -- "AbstractSyntaxDump.ag"(line 60, column 33)                      _lhsOppL =+                         {-# LINE 60 "AbstractSyntaxDump.ag" #-}                          []+                         {-# LINE 986 "AbstractSyntaxDump.hs" #-}                      -- use rule "AbstractSyntaxDump.ag"(line 17, column 58)                      _lhsOpp =+                         {-# LINE 17 "AbstractSyntaxDump.ag" #-}                          empty+                         {-# LINE 991 "AbstractSyntaxDump.hs" #-}                  in  ( _lhsOpp,_lhsOppL)) )
src-derived/Code.hs view
@@ -2,6 +2,7 @@  -- UUAGC 0.9.14 (Code.ag) module Code where+{-# LINE 2 "Code.ag" #-}  import Pretty import Patterns@@ -10,6 +11,8 @@ import qualified Data.Set as Set import Data.Map(Map) import qualified Data.Map as Map+{-# LINE 15 "../src-derived/Code.hs" #-}+{-# LINE 102 "Code.ag" #-}  -- Unboxed tuples --   unbox  Whether unboxed tuples are wanted or not@@ -26,6 +29,7 @@ mkTupleLhs :: Bool -> Bool -> [String] -> Lhs mkTupleLhs  unbox noInh comps | not unbox || noInh || length comps == 1 = TupleLhs comps                               | otherwise                               = UnboxedTupleLhs comps+{-# LINE 33 "../src-derived/Code.hs" #-} -- CaseAlt ----------------------------------------------------- {-    alternatives:
src-derived/CodeSyntax.hs view
@@ -2,11 +2,13 @@  -- UUAGC 0.9.14 (CodeSyntax.ag) module CodeSyntax where+{-# LINE 2 "CodeSyntax.ag" #-}  import Patterns import CommonTypes import Data.Map(Map) import Data.Set(Set)+{-# LINE 12 "../src-derived/CodeSyntax.hs" #-} -- CGrammar ---------------------------------------------------- {-    alternatives:@@ -18,8 +20,9 @@          child pragmas        : {PragmaMap}          child paramMap       : {ParamMap}          child contextMap     : {ContextMap}+         child aroundsMap     : {Map NontermIdent (Map ConstructorIdent (Set Identifier))} -}-data CGrammar  = CGrammar (TypeSyns) (Derivings) (Set NontermIdent) (CNonterminals) (PragmaMap) (ParamMap) (ContextMap) +data CGrammar  = CGrammar (TypeSyns) (Derivings) (Set NontermIdent) (CNonterminals) (PragmaMap) (ParamMap) (ContextMap) (Map NontermIdent (Map ConstructorIdent (Set Identifier)))  -- CInterface -------------------------------------------------- {-    alternatives:
src-derived/CodeSyntaxDump.hs view
@@ -2,6 +2,7 @@  -- UUAGC 0.9.14 (CodeSyntaxDump.ag) module CodeSyntaxDump where+{-# LINE 5 "CodeSyntaxDump.ag" #-}  import Data.List import qualified Data.Map as Map@@ -10,17 +11,23 @@ import PPUtil  import CodeSyntax+{-# LINE 15 "../src-derived/CodeSyntaxDump.hs" #-} +{-# LINE 2 "./CodeSyntax.ag" #-}  import Patterns import CommonTypes import Data.Map(Map) import Data.Set(Set)+{-# LINE 23 "../src-derived/CodeSyntaxDump.hs" #-} +{-# LINE 2 "./Patterns.ag" #-}  -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 30 "../src-derived/CodeSyntaxDump.hs" #-}+{-# LINE 15 "CodeSyntaxDump.ag" #-}  ppChild :: (Identifier,Type,Bool) -> PP_Doc ppChild (nm,tp,b)@@ -47,6 +54,7 @@  ppStrings :: [String] -> PP_Doc ppStrings = vlist+{-# LINE 58 "../src-derived/CodeSyntaxDump.hs" #-} -- CGrammar ---------------------------------------------------- {-    visit 0:@@ -61,12 +69,13 @@          child pragmas        : {PragmaMap}          child paramMap       : {ParamMap}          child contextMap     : {ContextMap}+         child aroundsMap     : {Map NontermIdent (Map ConstructorIdent (Set Identifier))} -} -- cata sem_CGrammar :: CGrammar  ->                 T_CGrammar -sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap )  =-    (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts ) _pragmas _paramMap _contextMap )+sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _aroundsMap )  =+    (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts ) _pragmas _paramMap _contextMap _aroundsMap ) -- semantic domain newtype T_CGrammar  = T_CGrammar (( PP_Doc)) data Inh_CGrammar  = Inh_CGrammar {}@@ -85,18 +94,21 @@                          PragmaMap ->                          ParamMap ->                          ContextMap ->+                         (Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->                          T_CGrammar -sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_  =+sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_ aroundsMap_  =     (T_CGrammar (let _lhsOpp :: PP_Doc                      _nontsIpp :: PP_Doc                      _nontsIppL :: ([PP_Doc])                      -- "CodeSyntaxDump.ag"(line 47, column 21)                      _lhsOpp =+                         {-# LINE 47 "CodeSyntaxDump.ag" #-}                          ppNestInfo ["CGrammar","CGrammar"] []                                     [ ppF "typeSyns"  $ ppAssocL typeSyns_                                     , ppF "derivings" $ ppMap $ derivings_                                     , ppF "nonts"     $ ppVList _nontsIppL                                     ] []+                         {-# LINE 112 "CodeSyntaxDump.hs" #-}                      ( _nontsIpp,_nontsIppL) =                          (nonts_ )                  in  ( _lhsOpp)) )@@ -133,7 +145,9 @@                        _segIppL :: ([PP_Doc])                        -- "CodeSyntaxDump.ag"(line 57, column 21)                        _lhsOpp =+                           {-# LINE 57 "CodeSyntaxDump.ag" #-}                            ppNestInfo ["CInterface","CInterface"] [] [ppF "seg" $ ppVList _segIppL] []+                           {-# LINE 151 "CodeSyntaxDump.hs" #-}                        ( _segIpp,_segIppL) =                            (seg_ )                    in  ( _lhsOpp)) )@@ -181,7 +195,9 @@                          _interIpp :: PP_Doc                          -- "CodeSyntaxDump.ag"(line 54, column 33)                          _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 201 "CodeSyntaxDump.hs" #-}                          ( _prodsIpp,_prodsIppL) =                              (prods_ )                          ( _interIpp) =@@ -226,10 +242,14 @@                           _tlIppL :: ([PP_Doc])                           -- "CodeSyntaxDump.ag"(line 102, column 33)                           _lhsOppL =+                              {-# LINE 102 "CodeSyntaxDump.ag" #-}                               _hdIpp : _tlIppL+                              {-# LINE 248 "CodeSyntaxDump.hs" #-}                           -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                           _lhsOpp =+                              {-# LINE 44 "CodeSyntaxDump.ag" #-}                               _hdIpp >-< _tlIpp+                              {-# LINE 253 "CodeSyntaxDump.hs" #-}                           ( _hdIpp) =                               (hd_ )                           ( _tlIpp,_tlIppL) =@@ -241,10 +261,14 @@                           _lhsOpp :: PP_Doc                           -- "CodeSyntaxDump.ag"(line 103, column 33)                           _lhsOppL =+                              {-# LINE 103 "CodeSyntaxDump.ag" #-}                               []+                              {-# LINE 267 "CodeSyntaxDump.hs" #-}                           -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                           _lhsOpp =+                              {-# LINE 44 "CodeSyntaxDump.ag" #-}                               empty+                              {-# LINE 272 "CodeSyntaxDump.hs" #-}                       in  ( _lhsOpp,_lhsOppL)) ) -- CProduction ------------------------------------------------- {-@@ -285,7 +309,9 @@                         _visitsIppL :: ([PP_Doc])                         -- "CodeSyntaxDump.ag"(line 63, column 17)                         _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 315 "CodeSyntaxDump.hs" #-}                         ( _visitsIpp,_visitsIppL) =                             (visits_ )                     in  ( _lhsOpp)) )@@ -328,10 +354,14 @@                          _tlIppL :: ([PP_Doc])                          -- "CodeSyntaxDump.ag"(line 94, column 33)                          _lhsOppL =+                             {-# LINE 94 "CodeSyntaxDump.ag" #-}                              _hdIpp : _tlIppL+                             {-# LINE 360 "CodeSyntaxDump.hs" #-}                          -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                          _lhsOpp =+                             {-# LINE 44 "CodeSyntaxDump.ag" #-}                              _hdIpp >-< _tlIpp+                             {-# LINE 365 "CodeSyntaxDump.hs" #-}                          ( _hdIpp) =                              (hd_ )                          ( _tlIpp,_tlIppL) =@@ -343,10 +373,14 @@                          _lhsOpp :: PP_Doc                          -- "CodeSyntaxDump.ag"(line 95, column 33)                          _lhsOppL =+                             {-# LINE 95 "CodeSyntaxDump.ag" #-}                              []+                             {-# LINE 379 "CodeSyntaxDump.hs" #-}                          -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                          _lhsOpp =+                             {-# LINE 44 "CodeSyntaxDump.ag" #-}                              empty+                             {-# LINE 384 "CodeSyntaxDump.hs" #-}                      in  ( _lhsOpp,_lhsOppL)) ) -- CRule ------------------------------------------------------- {-@@ -406,7 +440,9 @@     (T_CRule (let _lhsOpp :: PP_Doc                   -- "CodeSyntaxDump.ag"(line 70, column 21)                   _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 446 "CodeSyntaxDump.hs" #-}               in  ( _lhsOpp)) ) sem_CRule_CRule :: Identifier ->                    Bool ->@@ -429,7 +465,9 @@                   _patternIpp :: PP_Doc                   -- "CodeSyntaxDump.ag"(line 69, column 33)                   _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 471 "CodeSyntaxDump.hs" #-}                   ( _patternIcopy,_patternIpp) =                       (pattern_ )               in  ( _lhsOpp)) )@@ -466,7 +504,9 @@     (T_CSegment (let _lhsOpp :: PP_Doc                      -- "CodeSyntaxDump.ag"(line 60, column 21)                      _lhsOpp =+                         {-# LINE 60 "CodeSyntaxDump.ag" #-}                          ppNestInfo ["CSegment","CSegment"] [] [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_] []+                         {-# LINE 510 "CodeSyntaxDump.hs" #-}                  in  ( _lhsOpp)) ) -- CSegments --------------------------------------------------- {-@@ -507,10 +547,14 @@                       _tlIppL :: ([PP_Doc])                       -- "CodeSyntaxDump.ag"(line 98, column 33)                       _lhsOppL =+                          {-# LINE 98 "CodeSyntaxDump.ag" #-}                           _hdIpp : _tlIppL+                          {-# LINE 553 "CodeSyntaxDump.hs" #-}                       -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                       _lhsOpp =+                          {-# LINE 44 "CodeSyntaxDump.ag" #-}                           _hdIpp >-< _tlIpp+                          {-# LINE 558 "CodeSyntaxDump.hs" #-}                       ( _hdIpp) =                           (hd_ )                       ( _tlIpp,_tlIppL) =@@ -522,10 +566,14 @@                       _lhsOpp :: PP_Doc                       -- "CodeSyntaxDump.ag"(line 99, column 33)                       _lhsOppL =+                          {-# LINE 99 "CodeSyntaxDump.ag" #-}                           []+                          {-# LINE 572 "CodeSyntaxDump.hs" #-}                       -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                       _lhsOpp =+                          {-# LINE 44 "CodeSyntaxDump.ag" #-}                           empty+                          {-# LINE 577 "CodeSyntaxDump.hs" #-}                   in  ( _lhsOpp,_lhsOppL)) ) -- CVisit ------------------------------------------------------ {-@@ -568,7 +616,9 @@                    _intraIppL :: ([PP_Doc])                    -- "CodeSyntaxDump.ag"(line 66, column 21)                    _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 622 "CodeSyntaxDump.hs" #-}                    ( _vssIppL) =                        (vss_ )                    ( _intraIppL) =@@ -613,10 +663,14 @@                     _tlIppL :: ([PP_Doc])                     -- "CodeSyntaxDump.ag"(line 90, column 33)                     _lhsOppL =+                        {-# LINE 90 "CodeSyntaxDump.ag" #-}                         _hdIpp : _tlIppL+                        {-# LINE 669 "CodeSyntaxDump.hs" #-}                     -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                     _lhsOpp =+                        {-# LINE 44 "CodeSyntaxDump.ag" #-}                         _hdIpp >-< _tlIpp+                        {-# LINE 674 "CodeSyntaxDump.hs" #-}                     ( _hdIpp) =                         (hd_ )                     ( _tlIpp,_tlIppL) =@@ -628,10 +682,14 @@                     _lhsOpp :: PP_Doc                     -- "CodeSyntaxDump.ag"(line 91, column 33)                     _lhsOppL =+                        {-# LINE 91 "CodeSyntaxDump.ag" #-}                         []+                        {-# LINE 688 "CodeSyntaxDump.hs" #-}                     -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                     _lhsOpp =+                        {-# LINE 44 "CodeSyntaxDump.ag" #-}                         empty+                        {-# LINE 693 "CodeSyntaxDump.hs" #-}                 in  ( _lhsOpp,_lhsOppL)) ) -- Pattern ----------------------------------------------------- {-@@ -705,13 +763,19 @@                     _partsIppL :: ([PP_Doc])                     -- "CodeSyntaxDump.ag"(line 75, column 33)                     _lhsOpp =+                        {-# LINE 75 "CodeSyntaxDump.ag" #-}                         ppNestInfo ["Pattern","Alias"] [pp field_, pp attr_] [ppF "pat" $ _patIpp] []+                        {-# LINE 769 "CodeSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Alias field_ attr_ _patIcopy _partsIcopy+                        {-# LINE 774 "CodeSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 779 "CodeSyntaxDump.hs" #-}                     ( _patIcopy,_patIpp) =                         (pat_ )                     ( _partsIcopy,_partsIpp,_partsIppL) =@@ -728,13 +792,19 @@                     _patsIppL :: ([PP_Doc])                     -- "CodeSyntaxDump.ag"(line 73, column 33)                     _lhsOpp =+                        {-# LINE 73 "CodeSyntaxDump.ag" #-}                         ppNestInfo ["Pattern","Constr"] [pp name_] [ppF "pats" $ ppVList _patsIppL] []+                        {-# LINE 798 "CodeSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Constr name_ _patsIcopy+                        {-# LINE 803 "CodeSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 808 "CodeSyntaxDump.hs" #-}                     ( _patsIcopy,_patsIpp,_patsIppL) =                         (pats_ )                 in  ( _lhsOcopy,_lhsOpp)) )@@ -747,13 +817,19 @@                     _patIpp :: PP_Doc                     -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                     _lhsOpp =+                        {-# LINE 44 "CodeSyntaxDump.ag" #-}                         _patIpp+                        {-# LINE 823 "CodeSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Irrefutable _patIcopy+                        {-# LINE 828 "CodeSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 833 "CodeSyntaxDump.hs" #-}                     ( _patIcopy,_patIpp) =                         (pat_ )                 in  ( _lhsOcopy,_lhsOpp)) )@@ -768,13 +844,19 @@                     _patsIppL :: ([PP_Doc])                     -- "CodeSyntaxDump.ag"(line 74, column 33)                     _lhsOpp =+                        {-# LINE 74 "CodeSyntaxDump.ag" #-}                         ppNestInfo ["Pattern","Product"] [ppShow pos_] [ppF "pats" $ ppVList _patsIppL] []+                        {-# LINE 850 "CodeSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Product pos_ _patsIcopy+                        {-# LINE 855 "CodeSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 860 "CodeSyntaxDump.hs" #-}                     ( _patsIcopy,_patsIpp,_patsIppL) =                         (pats_ )                 in  ( _lhsOcopy,_lhsOpp)) )@@ -785,13 +867,19 @@                     _lhsOcopy :: Pattern                     -- "CodeSyntaxDump.ag"(line 76, column 25)                     _lhsOpp =+                        {-# LINE 76 "CodeSyntaxDump.ag" #-}                         ppNestInfo ["Pattern","Underscore"] [ppShow pos_] [] []+                        {-# LINE 873 "CodeSyntaxDump.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Underscore pos_+                        {-# LINE 878 "CodeSyntaxDump.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 883 "CodeSyntaxDump.hs" #-}                 in  ( _lhsOcopy,_lhsOpp)) ) -- Patterns ---------------------------------------------------- {-@@ -840,16 +928,24 @@                      _tlIppL :: ([PP_Doc])                      -- "CodeSyntaxDump.ag"(line 82, column 33)                      _lhsOppL =+                         {-# LINE 82 "CodeSyntaxDump.ag" #-}                          _hdIpp : _tlIppL+                         {-# LINE 934 "CodeSyntaxDump.hs" #-}                      -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                      _lhsOpp =+                         {-# LINE 44 "CodeSyntaxDump.ag" #-}                          _hdIpp >-< _tlIpp+                         {-# LINE 939 "CodeSyntaxDump.hs" #-}                      -- self rule                      _copy =+                         {-# LINE 23 "./Patterns.ag" #-}                          (:) _hdIcopy _tlIcopy+                         {-# LINE 944 "CodeSyntaxDump.hs" #-}                      -- self rule                      _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}                          _copy+                         {-# LINE 949 "CodeSyntaxDump.hs" #-}                      ( _hdIcopy,_hdIpp) =                          (hd_ )                      ( _tlIcopy,_tlIpp,_tlIppL) =@@ -862,16 +958,24 @@                      _lhsOcopy :: Patterns                      -- "CodeSyntaxDump.ag"(line 83, column 33)                      _lhsOppL =+                         {-# LINE 83 "CodeSyntaxDump.ag" #-}                          []+                         {-# LINE 964 "CodeSyntaxDump.hs" #-}                      -- use rule "CodeSyntaxDump.ag"(line 44, column 40)                      _lhsOpp =+                         {-# LINE 44 "CodeSyntaxDump.ag" #-}                          empty+                         {-# LINE 969 "CodeSyntaxDump.hs" #-}                      -- self rule                      _copy =+                         {-# LINE 23 "./Patterns.ag" #-}                          []+                         {-# LINE 974 "CodeSyntaxDump.hs" #-}                      -- self rule                      _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}                          _copy+                         {-# LINE 979 "CodeSyntaxDump.hs" #-}                  in  ( _lhsOcopy,_lhsOpp,_lhsOppL)) ) -- Sequence ---------------------------------------------------- {-@@ -909,7 +1013,9 @@                      _tlIppL :: ([PP_Doc])                      -- "CodeSyntaxDump.ag"(line 86, column 33)                      _lhsOppL =+                         {-# LINE 86 "CodeSyntaxDump.ag" #-}                          _hdIpp : _tlIppL+                         {-# LINE 1019 "CodeSyntaxDump.hs" #-}                      ( _hdIpp) =                          (hd_ )                      ( _tlIppL) =@@ -920,5 +1026,7 @@     (T_Sequence (let _lhsOppL :: ([PP_Doc])                      -- "CodeSyntaxDump.ag"(line 87, column 33)                      _lhsOppL =+                         {-# LINE 87 "CodeSyntaxDump.ag" #-}                          []+                         {-# LINE 1032 "CodeSyntaxDump.hs" #-}                  in  ( _lhsOppL)) )
src-derived/ConcreteSyntax.hs view
@@ -2,11 +2,13 @@  -- UUAGC 0.9.14 (ConcreteSyntax.ag) module ConcreteSyntax where+{-# LINE 2 "ConcreteSyntax.ag" #-}  import UU.Scanner.Position (Pos) import Patterns   (Pattern) import Expression (Expression) import CommonTypes+{-# LINE 12 "../src-derived/ConcreteSyntax.hs" #-} -- AG ---------------------------------------------------------- {-    alternatives:@@ -177,6 +179,9 @@ -- SemDef ------------------------------------------------------ {-    alternatives:+      alternative AroundDef:+         child ident          : {Identifier}+         child rhs            : {Expression}       alternative AttrOrderBefore:          child before         : {[(Identifier,Identifier)]}          child after          : {[(Identifier,Identifier)]}@@ -196,7 +201,8 @@          child ident          : {Identifier}          child ref            : {Identifier} -}-data SemDef  = AttrOrderBefore ([(Identifier,Identifier)]) ([(Identifier,Identifier)]) +data SemDef  = AroundDef (Identifier) (Expression) +             | AttrOrderBefore ([(Identifier,Identifier)]) ([(Identifier,Identifier)])               | AugmentDef (Identifier) (Expression)               | Def (Pattern) (Expression) (Bool)               | SemPragma ([NontermIdent]) 
src-derived/DeclBlocks.hs view
@@ -2,8 +2,10 @@  -- UUAGC 0.9.14 (DeclBlocks.ag) module DeclBlocks where+{-# LINE 2 "DeclBlocks.ag" #-}  import Code (Decl,Expr)+{-# LINE 9 "../src-derived/DeclBlocks.hs" #-} -- DeclBlocks -------------------------------------------------- {-    alternatives:
src-derived/DefaultRules.hs view
@@ -2,1750 +2,2291 @@  -- UUAGC 0.9.14 (DefaultRules.ag) module DefaultRules where--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)----- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns    (Pattern(..),Patterns)-import Expression  (Expression(..))-import CommonTypes----- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)--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) -      ]-    )----	-	-	-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 (Alias f1 a1 (Underscore noPos) []) -        expr -        False -        origin---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---addAugments :: (Identifier, [Expression]) -> [Rule] -> [Rule]-addAugments (_, exprs) rules-  | null exprs = rules-addAugments (syn, exprs) rules-  = [rule] ++ funRules ++ map modify rules-  where-    rule = Rule (Alias _LHS syn (Underscore noPos) []) rhs False "augmented rule"-    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 (Alias _LOC name (Underscore noPos) []) expr False "augment function") funNames exprs--    modify (Rule pat rhs owrt origin)-      | containsSyn pat = Rule (modifyPat pat) rhs owrt origin-    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---{- -multiRule replaces-  loc.(a,b) = e-by  -  loc.tup1  = e-  loc.(a,_) = @loc.tup1-  loc.(_,b) = @loc.tup1-It needs to thread a unique number for inventing names for the tuples.--It also works for nested tuples:-  loc.(a,(b,c)) = e-becomes-  loc.tup1      = e-  loc.(a,_)     = @loc.tup1-  loc.(_,tup2)  = @loc.tup1-  loc.(b,_)     = @loc.tup2-  loc.(_,c)     = @loc.tup2--}--multiRule :: Rule -> Int -> ([Rule], Int)	-multiRule (Rule pat expr owrt origin) uniq-  =  let f :: (Pattern->Pattern) -> Expression -> Pattern -> Int -> (Pattern, ([Rule], Int))-         f 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 (us (length xs1)) freshExpr p n1-                                      in  (x2:xs1, rs2++rs1, n2)-                 (xs9,rs9,n9) = foldr g ([], [], n+1) pats-             in  ( freshPat-                 , ( Rule (w freshPat) e owrt origin : rs9-                   , n9-                   )-                 )-         f w e p n -           = ( p-             , ( [Rule (w p) e owrt origin]-               , n-               )-             )-     in snd (f id expr pat uniq)---- Child --------------------------------------------------------{--   visit 0:-      inherited attributes:-         con                  : ConstructorIdent-         cr                   : Bool-         nt                   : NontermIdent-      synthesized attributes:-         errors               : Seq Error-         field                :  (Identifier,Type,Bool) -         inherited            : Attributes-         name                 : Identifier-         output               : SELF -         synthesized          : Attributes-   alternatives:-      alternative Child:-         child name           : {Identifier}-         child tp             : {Type}-         child inh            : {Attributes}-         child syn            : {Attributes}-         child higherOrder    : {Bool}-         visit 0:-            local output      : _--}--- cata-sem_Child :: Child  ->-             T_Child -sem_Child !(Child _name _tp _inh _syn _higherOrder )  =-    (sem_Child_Child _name _tp _inh _syn _higherOrder )--- semantic domain-newtype T_Child  = T_Child (ConstructorIdent ->-                            Bool ->-                            NontermIdent ->-                            ( (Seq Error),( (Identifier,Type,Bool) ),Attributes,Identifier,Child,Attributes))-data Inh_Child  = Inh_Child {con_Inh_Child :: !(ConstructorIdent),cr_Inh_Child :: !(Bool),nt_Inh_Child :: !(NontermIdent)}-data Syn_Child  = Syn_Child {errors_Syn_Child :: !(Seq Error),field_Syn_Child :: !( (Identifier,Type,Bool) ),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 _lhsInt )  =-    (let ( !_lhsOerrors,!_lhsOfield,!_lhsOinherited,!_lhsOname,!_lhsOoutput,!_lhsOsynthesized) =-             (sem _lhsIcon _lhsIcr _lhsInt )-     in  (Syn_Child _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized ))-sem_Child_Child :: Identifier ->-                   Type ->-                   Attributes ->-                   Attributes ->-                   Bool ->-                   T_Child -sem_Child_Child !name_ !tp_ !inh_ !syn_ !higherOrder_  =-    (T_Child (\ (!_lhsIcon)-                (!_lhsIcr)-                (!_lhsInt) ->-                  (case (Seq.empty) of-                   { !_lhsOerrors ->-                   (case ((name_,tp_,higherOrder_)) of-                    { !_lhsOfield ->-                    (case (inh_) of-                     { !_lhsOinherited ->-                     (case (name_) of-                      { !_lhsOname ->-                      (case (Child name_ tp_ inh_ syn_ higherOrder_) of-                       { !_output ->-                       (case (_output) of-                        { !_lhsOoutput ->-                        (case (syn_) of-                         { !_lhsOsynthesized ->-                         ( _lhsOerrors,_lhsOfield,_lhsOinherited,_lhsOname,_lhsOoutput,_lhsOsynthesized) }) }) }) }) }) }) })) )--- Children -----------------------------------------------------{--   visit 0:-      inherited attributes:-         con                  : ConstructorIdent-         cr                   : Bool-         nt                   : NontermIdent-      synthesized attributes:-         errors               : Seq Error-         fields               : [(Identifier,Type,Bool)]-         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 ->-                                  NontermIdent ->-                                  ( (Seq Error),([(Identifier,Type,Bool)]),([(Identifier, Attributes)]),Children,([(Identifier, Attributes)])))-data Inh_Children  = Inh_Children {con_Inh_Children :: !(ConstructorIdent),cr_Inh_Children :: !(Bool),nt_Inh_Children :: !(NontermIdent)}-data Syn_Children  = Syn_Children {errors_Syn_Children :: !(Seq Error),fields_Syn_Children :: !([(Identifier,Type,Bool)]),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 _lhsInt )  =-    (let ( !_lhsOerrors,!_lhsOfields,!_lhsOinputs,!_lhsOoutput,!_lhsOoutputs) =-             (sem _lhsIcon _lhsIcr _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)-                   (!_lhsInt) ->-                     (case (_lhsInt) of-                      { !_tlOnt ->-                      (case (_lhsIcr) of-                       { !_tlOcr ->-                       (case (_lhsIcon) of-                        { !_tlOcon ->-                        (case ((tl_ _tlOcon _tlOcr _tlOnt )) of-                         { ( !_tlIerrors,!_tlIfields,!_tlIinputs,!_tlIoutput,!_tlIoutputs) ->-                         (case (_lhsInt) of-                          { !_hdOnt ->-                          (case (_lhsIcr) of-                           { !_hdOcr ->-                           (case (_lhsIcon) of-                            { !_hdOcon ->-                            (case ((hd_ _hdOcon _hdOcr _hdOnt )) of-                             { ( !_hdIerrors,!_hdIfield,!_hdIinherited,!_hdIname,!_hdIoutput,!_hdIsynthesized) ->-                             (case (_hdIerrors Seq.>< _tlIerrors) of-                              { !_lhsOerrors ->-                              (case (_hdIfield : _tlIfields) of-                               { !_lhsOfields ->-                               (case ((_hdIname, _hdIinherited) : _tlIinputs) of-                                { !_lhsOinputs ->-                                (case ((:) _hdIoutput _tlIoutput) of-                                 { !_output ->-                                 (case (_output) of-                                  { !_lhsOoutput ->-                                  (case ((_hdIname, _hdIsynthesized) : _tlIoutputs) of-                                   { !_lhsOoutputs ->-                                   ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Children_Nil :: T_Children -sem_Children_Nil  =-    (T_Children (\ (!_lhsIcon)-                   (!_lhsIcr)-                   (!_lhsInt) ->-                     (case (Seq.empty) of-                      { !_lhsOerrors ->-                      (case ([]) of-                       { !_lhsOfields ->-                       (case ([]) of-                        { !_lhsOinputs ->-                        (case ([]) of-                         { !_output ->-                         (case (_output) of-                          { !_lhsOoutput ->-                          (case ([]) 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]))}-         visit 0:-            local output      : _--}--- cata-sem_Grammar :: Grammar  ->-               T_Grammar -sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )  =-    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )--- 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]))) ->-                       T_Grammar -sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !uniqueMap_ !augmentsMap_  =-    (T_Grammar (\ (!_lhsIoptions) ->-                    (case (manualAttrOrderMap_) of-                     { !_nontsOmanualAttrOrderMap ->-                     (case (typeSyns_) of-                      { !_nontsOtypeSyns ->-                      (case (useMap_) of-                       { !_nontsOuseMap ->-                       (case (modcopy   _lhsIoptions) of-                        { !_nontsOcr ->-                        (case (rename    _lhsIoptions) of-                         { !_nontsOo_rename ->-                         (case ((nonts_ )) of-                          { ( !_nontsIcollect_nts,!T_Nonterminals_1 nonts_1) ->-                          (case (augmentsMap_) of-                           { !_nontsOaugmentsIn ->-                           (case (1) of-                            { !_nontsOuniq ->-                            (case (_nontsIcollect_nts) of-                             { !_nontsOnonterminals ->-                             (case ((nonts_1 _nontsOaugmentsIn _nontsOcr _nontsOmanualAttrOrderMap _nontsOnonterminals _nontsOo_rename _nontsOtypeSyns _nontsOuniq _nontsOuseMap )) of-                              { ( !_nontsIerrors,!_nontsIoutput,!_nontsIuniq) ->-                              (case (_nontsIerrors) of-                               { !_lhsOerrors ->-                               (case (Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_) of-                                { !_output ->-                                (case (_output) of-                                 { !_lhsOoutput ->-                                 ( _lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Nonterminal --------------------------------------------------{--   visit 0:-      synthesized attribute:-         collect_nts          : Set NontermIdent-   visit 1:-      inherited attributes:-         augmentsIn           : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))-         cr                   : Bool-         manualAttrOrderMap   : AttrOrderMap-         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 augmentsIn  : _-            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]))) ->-                                            Bool ->-                                            AttrOrderMap ->-                                            (Set NontermIdent) ->-                                            Bool ->-                                            TypeSyns ->-                                            Int ->-                                            UseMap ->-                                            ( (Seq Error),Nonterminal,Int))-data Inh_Nonterminal  = Inh_Nonterminal {augmentsIn_Inh_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),cr_Inh_Nonterminal :: !(Bool),manualAttrOrderMap_Inh_Nonterminal :: !(AttrOrderMap),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 _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap )  =-    (let ( !_lhsOcollect_nts,!T_Nonterminal_1 sem_1) =-             (sem )-         ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =-             (sem_1 _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _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 (Set.singleton nt_) of-                    { !_lhsOcollect_nts ->-                    (case ((sem_Nonterminal_Nonterminal_1 nt_ syn_ inh_ (T_Productions prods_ ) params_ )) of-                     { ( !sem_Nonterminal_1) ->-                     ( _lhsOcollect_nts,sem_Nonterminal_1) }) }) )-sem_Nonterminal_Nonterminal_1 :: NontermIdent ->-                                 Attributes ->-                                 Attributes ->-                                 T_Productions  ->-                                 ([Identifier]) ->-                                 T_Nonterminal_1 -sem_Nonterminal_Nonterminal_1 !nt_ !syn_ !inh_ !(T_Productions prods_ ) !params_  =-    (T_Nonterminal_1 (\ (!_lhsIaugmentsIn)-                        (!_lhsIcr)-                        (!_lhsImanualAttrOrderMap)-                        (!_lhsInonterminals)-                        (!_lhsIo_rename)-                        (!_lhsItypeSyns)-                        (!_lhsIuniq)-                        (!_lhsIuseMap) ->-                          (case (_lhsItypeSyns) of-                           { !_prodsOtypeSyns ->-                           (case (_lhsIo_rename) of-                            { !_prodsOo_rename ->-                            (case (_lhsImanualAttrOrderMap) of-                             { !_prodsOmanualAttrOrderMap ->-                             (case (_lhsIcr) of-                              { !_prodsOcr ->-                              (case (nt_) of-                               { !_prodsOnt ->-                               (case (Map.findWithDefault Map.empty nt_ _lhsIuseMap) of-                                { !_prodsOuseMap ->-                                (case (syn_) of-                                 { !_prodsOsyn ->-                                 (case (inh_) of-                                  { !_prodsOinh ->-                                  (case (_lhsIuniq) of-                                   { !_prodsOuniq ->-                                   (case (_lhsInonterminals) of-                                    { !_prodsOnonterminals ->-                                    (case (Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn) of-                                     { !_augmentsIn ->-                                     (case (_augmentsIn) of-                                      { !_prodsOaugmentsIn ->-                                      (case ((prods_ _prodsOaugmentsIn _prodsOcr _prodsOinh _prodsOmanualAttrOrderMap _prodsOnonterminals _prodsOnt _prodsOo_rename _prodsOsyn _prodsOtypeSyns _prodsOuniq _prodsOuseMap )) of-                                       { ( !_prodsIerrors,!_prodsIoutput,!_prodsIuniq) ->-                                       (case (_prodsIerrors) of-                                        { !_lhsOerrors ->-                                        (case (Nonterminal nt_ params_ inh_ syn_ _prodsIoutput) of-                                         { !_output ->-                                         (case (_output) of-                                          { !_lhsOoutput ->-                                          (case (_prodsIuniq) of-                                           { !_lhsOuniq ->-                                           ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Nonterminals -------------------------------------------------{--   visit 0:-      synthesized attribute:-         collect_nts          : Set NontermIdent-   visit 1:-      inherited attributes:-         augmentsIn           : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))-         cr                   : Bool-         manualAttrOrderMap   : AttrOrderMap-         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]))) ->-                                              Bool ->-                                              AttrOrderMap ->-                                              (Set NontermIdent) ->-                                              Bool ->-                                              TypeSyns ->-                                              Int ->-                                              UseMap ->-                                              ( (Seq Error),Nonterminals,Int))-data Inh_Nonterminals  = Inh_Nonterminals {augmentsIn_Inh_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),cr_Inh_Nonterminals :: !(Bool),manualAttrOrderMap_Inh_Nonterminals :: !(AttrOrderMap),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 _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap )  =-    (let ( !_lhsOcollect_nts,!T_Nonterminals_1 sem_1) =-             (sem )-         ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =-             (sem_1 _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _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 (_hdIcollect_nts `Set.union` _tlIcollect_nts) of-                       { !_lhsOcollect_nts ->-                       (case ((sem_Nonterminals_Cons_1 (T_Nonterminal_1 hd_1 ) (T_Nonterminals_1 tl_1 ) )) of-                        { ( !sem_Nonterminals_1) ->-                        ( _lhsOcollect_nts,sem_Nonterminals_1) }) }) }) }) )-sem_Nonterminals_Cons_1 :: T_Nonterminal_1  ->-                           T_Nonterminals_1  ->-                           T_Nonterminals_1 -sem_Nonterminals_Cons_1 !(T_Nonterminal_1 hd_1 ) !(T_Nonterminals_1 tl_1 )  =-    (T_Nonterminals_1 (\ (!_lhsIaugmentsIn)-                         (!_lhsIcr)-                         (!_lhsImanualAttrOrderMap)-                         (!_lhsInonterminals)-                         (!_lhsIo_rename)-                         (!_lhsItypeSyns)-                         (!_lhsIuniq)-                         (!_lhsIuseMap) ->-                           (case (_lhsIuseMap) of-                            { !_tlOuseMap ->-                            (case (_lhsItypeSyns) of-                             { !_tlOtypeSyns ->-                             (case (_lhsIo_rename) of-                              { !_tlOo_rename ->-                              (case (_lhsImanualAttrOrderMap) of-                               { !_tlOmanualAttrOrderMap ->-                               (case (_lhsIcr) of-                                { !_tlOcr ->-                                (case (_lhsIuseMap) of-                                 { !_hdOuseMap ->-                                 (case (_lhsItypeSyns) of-                                  { !_hdOtypeSyns ->-                                  (case (_lhsIo_rename) of-                                   { !_hdOo_rename ->-                                   (case (_lhsImanualAttrOrderMap) of-                                    { !_hdOmanualAttrOrderMap ->-                                    (case (_lhsIcr) of-                                     { !_hdOcr ->-                                     (case (_lhsIuniq) of-                                      { !_hdOuniq ->-                                      (case (_lhsInonterminals) of-                                       { !_hdOnonterminals ->-                                       (case (_lhsIaugmentsIn) of-                                        { !_hdOaugmentsIn ->-                                        (case ((hd_1 _hdOaugmentsIn _hdOcr _hdOmanualAttrOrderMap _hdOnonterminals _hdOo_rename _hdOtypeSyns _hdOuniq _hdOuseMap )) of-                                         { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->-                                         (case (_hdIuniq) of-                                          { !_tlOuniq ->-                                          (case (_lhsInonterminals) of-                                           { !_tlOnonterminals ->-                                           (case (_lhsIaugmentsIn) of-                                            { !_tlOaugmentsIn ->-                                            (case ((tl_1 _tlOaugmentsIn _tlOcr _tlOmanualAttrOrderMap _tlOnonterminals _tlOo_rename _tlOtypeSyns _tlOuniq _tlOuseMap )) of-                                             { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->-                                             (case (_hdIerrors Seq.>< _tlIerrors) of-                                              { !_lhsOerrors ->-                                              (case ((:) _hdIoutput _tlIoutput) of-                                               { !_output ->-                                               (case (_output) of-                                                { !_lhsOoutput ->-                                                (case (_tlIuniq) of-                                                 { !_lhsOuniq ->-                                                 ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil  =-    (T_Nonterminals (case (Set.empty) of-                     { !_lhsOcollect_nts ->-                     (case ((sem_Nonterminals_Nil_1 )) of-                      { ( !sem_Nonterminals_1) ->-                      ( _lhsOcollect_nts,sem_Nonterminals_1) }) }) )-sem_Nonterminals_Nil_1 :: T_Nonterminals_1 -sem_Nonterminals_Nil_1  =-    (T_Nonterminals_1 (\ (!_lhsIaugmentsIn)-                         (!_lhsIcr)-                         (!_lhsImanualAttrOrderMap)-                         (!_lhsInonterminals)-                         (!_lhsIo_rename)-                         (!_lhsItypeSyns)-                         (!_lhsIuniq)-                         (!_lhsIuseMap) ->-                           (case (Seq.empty) of-                            { !_lhsOerrors ->-                            (case ([]) of-                             { !_output ->-                             (case (_output) of-                              { !_lhsOoutput ->-                              (case (_lhsIuniq) of-                               { !_lhsOuniq ->-                               ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) )--- 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 (True) of-                     { !_lhsOcontainsVars ->-                     (case (_lhsInt) of-                      { !_partsOnt ->-                      (case (_lhsIcon) of-                       { !_partsOcon ->-                       (case ((parts_ _partsOcon _partsOnt )) of-                        { ( !_partsIcontainsVars,!_partsIcopy,!_partsIdefinedAttrs,!_partsIerrors,!_partsIlocals,!_partsIoutput) ->-                        (case (_lhsInt) of-                         { !_patOnt ->-                         (case (_lhsIcon) of-                          { !_patOcon ->-                          (case ((pat_ _patOcon _patOnt )) of-                           { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->-                           (case (Alias field_ attr_ _patIcopy _partsIcopy) of-                            { !_copy ->-                            (case (_copy) of-                             { !_lhsOcopy ->-                             (case (Set.insert (field_,attr_) _patIdefinedAttrs) of-                              { !_lhsOdefinedAttrs ->-                              (case (_patIerrors Seq.>< _partsIerrors) of-                               { !_lhsOerrors ->-                               (case (if field_ == _LOC-                                         then Set.insert attr_ _patIlocals-                                         else _patIlocals) of-                                { !_lhsOlocals ->-                                (case (Alias field_ attr_ _patIoutput _partsIoutput) of-                                 { !_output ->-                                 (case (_output) 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 (_lhsInt) of-                     { !_patsOnt ->-                     (case (_lhsIcon) of-                      { !_patsOcon ->-                      (case ((pats_ _patsOcon _patsOnt )) of-                       { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->-                       (case (_patsIcontainsVars) of-                        { !_lhsOcontainsVars ->-                        (case (Constr name_ _patsIcopy) of-                         { !_copy ->-                         (case (_copy) of-                          { !_lhsOcopy ->-                          (case (_patsIdefinedAttrs) of-                           { !_lhsOdefinedAttrs ->-                           (case (_patsIerrors) of-                            { !_lhsOerrors ->-                            (case (_patsIlocals) of-                             { !_lhsOlocals ->-                             (case (Constr name_ _patsIoutput) of-                              { !_output ->-                              (case (_output) 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 (_lhsInt) of-                     { !_patOnt ->-                     (case (_lhsIcon) of-                      { !_patOcon ->-                      (case ((pat_ _patOcon _patOnt )) of-                       { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->-                       (case (_patIcontainsVars) of-                        { !_lhsOcontainsVars ->-                        (case (Irrefutable _patIcopy) of-                         { !_copy ->-                         (case (_copy) of-                          { !_lhsOcopy ->-                          (case (_patIdefinedAttrs) of-                           { !_lhsOdefinedAttrs ->-                           (case (_patIerrors) of-                            { !_lhsOerrors ->-                            (case (_patIlocals) of-                             { !_lhsOlocals ->-                             (case (Irrefutable _patIoutput) of-                              { !_output ->-                              (case (_output) 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 (_lhsInt) of-                     { !_patsOnt ->-                     (case (_lhsIcon) of-                      { !_patsOcon ->-                      (case ((pats_ _patsOcon _patsOnt )) of-                       { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->-                       (case (_patsIcontainsVars) of-                        { !_lhsOcontainsVars ->-                        (case (Product pos_ _patsIcopy) of-                         { !_copy ->-                         (case (_copy) of-                          { !_lhsOcopy ->-                          (case (_patsIdefinedAttrs) of-                           { !_lhsOdefinedAttrs ->-                           (case (_patsIerrors) of-                            { !_lhsOerrors ->-                            (case (_patsIlocals) of-                             { !_lhsOlocals ->-                             (case (Product pos_ _patsIoutput) of-                              { !_output ->-                              (case (_output) of-                               { !_lhsOoutput ->-                               ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Underscore :: Pos ->-                          T_Pattern -sem_Pattern_Underscore !pos_  =-    (T_Pattern (\ (!_lhsIcon)-                  (!_lhsInt) ->-                    (case (False) of-                     { !_lhsOcontainsVars ->-                     (case (Underscore pos_) of-                      { !_copy ->-                      (case (_copy) of-                       { !_lhsOcopy ->-                       (case (Set.empty) of-                        { !_lhsOdefinedAttrs ->-                        (case (Seq.empty) of-                         { !_lhsOerrors ->-                         (case (Set.empty) of-                          { !_lhsOlocals ->-                          (case (Underscore pos_) of-                           { !_output ->-                           (case (_output) 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 (_lhsInt) of-                      { !_tlOnt ->-                      (case (_lhsIcon) of-                       { !_tlOcon ->-                       (case ((tl_ _tlOcon _tlOnt )) of-                        { ( !_tlIcontainsVars,!_tlIcopy,!_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput) ->-                        (case (_lhsInt) of-                         { !_hdOnt ->-                         (case (_lhsIcon) of-                          { !_hdOcon ->-                          (case ((hd_ _hdOcon _hdOnt )) of-                           { ( !_hdIcontainsVars,!_hdIcopy,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput) ->-                           (case (_hdIcontainsVars || _tlIcontainsVars) of-                            { !_lhsOcontainsVars ->-                            (case ((:) _hdIcopy _tlIcopy) of-                             { !_copy ->-                             (case (_copy) of-                              { !_lhsOcopy ->-                              (case (_hdIdefinedAttrs `Set.union` _tlIdefinedAttrs) of-                               { !_lhsOdefinedAttrs ->-                               (case (_hdIerrors Seq.>< _tlIerrors) of-                                { !_lhsOerrors ->-                                (case (_hdIlocals `Set.union` _tlIlocals) of-                                 { !_lhsOlocals ->-                                 (case ((:) _hdIoutput _tlIoutput) of-                                  { !_output ->-                                  (case (_output) of-                                   { !_lhsOoutput ->-                                   ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil  =-    (T_Patterns (\ (!_lhsIcon)-                   (!_lhsInt) ->-                     (case (False) of-                      { !_lhsOcontainsVars ->-                      (case ([]) of-                       { !_copy ->-                       (case (_copy) of-                        { !_lhsOcopy ->-                        (case (Set.empty) of-                         { !_lhsOdefinedAttrs ->-                         (case (Seq.empty) of-                          { !_lhsOerrors ->-                          (case (Set.empty) of-                           { !_lhsOlocals ->-                           (case ([]) of-                            { !_output ->-                            (case (_output) of-                             { !_lhsOoutput ->-                             ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })) )--- Production ---------------------------------------------------{--   visit 0:-      inherited attributes:-         augmentsIn           : Map ConstructorIdent (Map Identifier [Expression])-         cr                   : Bool-         inh                  : Attributes-         manualAttrOrderMap   : AttrOrderMap-         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 orderDeps   : _-            local orderErrs   : _-            local _tup1       : _-            local errs        : _-            local augmentsIn  : _-            local newRls      : _-            local extra       : _--}--- 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])) ->-                                      Bool ->-                                      Attributes ->-                                      AttrOrderMap ->-                                      (Set NontermIdent) ->-                                      NontermIdent ->-                                      Bool ->-                                      Attributes ->-                                      TypeSyns ->-                                      Int ->-                                      (Map Identifier (String,String,String)) ->-                                      ( (Seq Error),Production,Int))-data Inh_Production  = Inh_Production {augmentsIn_Inh_Production :: !(Map ConstructorIdent (Map Identifier [Expression])),cr_Inh_Production :: !(Bool),inh_Inh_Production :: !(Attributes),manualAttrOrderMap_Inh_Production :: !(AttrOrderMap),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 _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap )  =-    (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =-             (sem _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _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 (\ (!_lhsIaugmentsIn)-                     (!_lhsIcr)-                     (!_lhsIinh)-                     (!_lhsImanualAttrOrderMap)-                     (!_lhsInonterminals)-                     (!_lhsInt)-                     (!_lhsIo_rename)-                     (!_lhsIsyn)-                     (!_lhsItypeSyns)-                     (!_lhsIuniq)-                     (!_lhsIuseMap) ->-                       (case (Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrOrderMap) of-                        { !_orderDeps ->-                        (case (_lhsIuniq) of-                         { !_rulesOuniq ->-                         (case (_lhsInt) of-                          { !_rulesOnt ->-                          (case (con_) of-                           { !_rulesOcon ->-                           (case ((rules_ _rulesOcon _rulesOnt _rulesOuniq )) of-                            { ( !_rulesIdefinedAttrs,!_rulesIerrors,!_rulesIlocals,!_rulesIoutput,!_rulesIuniq) ->-                            (case (_lhsInt) of-                             { !_childrenOnt ->-                             (case (_lhsIcr) of-                              { !_childrenOcr ->-                              (case (con_) of-                               { !_childrenOcon ->-                               (case ((children_ _childrenOcon _childrenOcr _childrenOnt )) of-                                { ( !_childrenIerrors,!_childrenIfields,!_childrenIinputs,!_childrenIoutput,!_childrenIoutputs) ->-                                (case (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]-                                       in Seq.fromList . concat $-                                          [ isInAttribute fldA nmA ++ isOutAttribute fldB nmB-                                          | dep@(Dependency (fldA,nmA) (fldB,nmB)) <- _orderDeps-                                          ]) of-                                 { !_orderErrs ->-                                 (case (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,ho) <- _childrenIfields, not ho])-                                                 | 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-                                            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)) of-                                  { !__tup1 ->-                                  (case (__tup1) of-                                   { !(_,!_errs) ->-                                   (case (_childrenIerrors >< _errs >< _rulesIerrors >< _orderErrs) of-                                    { !_lhsOerrors ->-                                    (case (Map.findWithDefault Map.empty con_ _lhsIaugmentsIn) of-                                     { !_augmentsIn ->-                                     (case (__tup1) of-                                      { !(!_newRls,_) ->-                                      (case (foldr addAugments (_rulesIoutput ++ _newRls) (Map.assocs _augmentsIn    )) of-                                       { !_extra ->-                                       (case ((typeSigs_ )) of-                                        { ( !_typeSigsIoutput) ->-                                        (case (Production con_ _childrenIoutput _extra     _typeSigsIoutput) of-                                         { !_lhsOoutput ->-                                         (case (_rulesIuniq) of-                                          { !_lhsOuniq ->-                                          ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Productions --------------------------------------------------{--   visit 0:-      inherited attributes:-         augmentsIn           : Map ConstructorIdent (Map Identifier [Expression])-         cr                   : Bool-         inh                  : Attributes-         manualAttrOrderMap   : AttrOrderMap-         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])) ->-                                        Bool ->-                                        Attributes ->-                                        AttrOrderMap ->-                                        (Set NontermIdent) ->-                                        NontermIdent ->-                                        Bool ->-                                        Attributes ->-                                        TypeSyns ->-                                        Int ->-                                        (Map Identifier (String,String,String)) ->-                                        ( (Seq Error),Productions,Int))-data Inh_Productions  = Inh_Productions {augmentsIn_Inh_Productions :: !(Map ConstructorIdent (Map Identifier [Expression])),cr_Inh_Productions :: !(Bool),inh_Inh_Productions :: !(Attributes),manualAttrOrderMap_Inh_Productions :: !(AttrOrderMap),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 _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap )  =-    (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =-             (sem _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _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 (\ (!_lhsIaugmentsIn)-                      (!_lhsIcr)-                      (!_lhsIinh)-                      (!_lhsImanualAttrOrderMap)-                      (!_lhsInonterminals)-                      (!_lhsInt)-                      (!_lhsIo_rename)-                      (!_lhsIsyn)-                      (!_lhsItypeSyns)-                      (!_lhsIuniq)-                      (!_lhsIuseMap) ->-                        (case (_lhsIuseMap) of-                         { !_tlOuseMap ->-                         (case (_lhsItypeSyns) of-                          { !_tlOtypeSyns ->-                          (case (_lhsIsyn) of-                           { !_tlOsyn ->-                           (case (_lhsIo_rename) of-                            { !_tlOo_rename ->-                            (case (_lhsInt) of-                             { !_tlOnt ->-                             (case (_lhsImanualAttrOrderMap) of-                              { !_tlOmanualAttrOrderMap ->-                              (case (_lhsIinh) of-                               { !_tlOinh ->-                               (case (_lhsIcr) of-                                { !_tlOcr ->-                                (case (_lhsIuseMap) of-                                 { !_hdOuseMap ->-                                 (case (_lhsItypeSyns) of-                                  { !_hdOtypeSyns ->-                                  (case (_lhsIsyn) of-                                   { !_hdOsyn ->-                                   (case (_lhsIo_rename) of-                                    { !_hdOo_rename ->-                                    (case (_lhsInt) of-                                     { !_hdOnt ->-                                     (case (_lhsImanualAttrOrderMap) of-                                      { !_hdOmanualAttrOrderMap ->-                                      (case (_lhsIinh) of-                                       { !_hdOinh ->-                                       (case (_lhsIcr) of-                                        { !_hdOcr ->-                                        (case (_lhsIuniq) of-                                         { !_hdOuniq ->-                                         (case (_lhsInonterminals) of-                                          { !_hdOnonterminals ->-                                          (case (_lhsIaugmentsIn) of-                                           { !_hdOaugmentsIn ->-                                           (case ((hd_ _hdOaugmentsIn _hdOcr _hdOinh _hdOmanualAttrOrderMap _hdOnonterminals _hdOnt _hdOo_rename _hdOsyn _hdOtypeSyns _hdOuniq _hdOuseMap )) of-                                            { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->-                                            (case (_hdIuniq) of-                                             { !_tlOuniq ->-                                             (case (_lhsInonterminals) of-                                              { !_tlOnonterminals ->-                                              (case (_lhsIaugmentsIn) of-                                               { !_tlOaugmentsIn ->-                                               (case ((tl_ _tlOaugmentsIn _tlOcr _tlOinh _tlOmanualAttrOrderMap _tlOnonterminals _tlOnt _tlOo_rename _tlOsyn _tlOtypeSyns _tlOuniq _tlOuseMap )) of-                                                { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->-                                                (case (_hdIerrors Seq.>< _tlIerrors) of-                                                 { !_lhsOerrors ->-                                                 (case ((:) _hdIoutput _tlIoutput) of-                                                  { !_output ->-                                                  (case (_output) of-                                                   { !_lhsOoutput ->-                                                   (case (_tlIuniq) of-                                                    { !_lhsOuniq ->-                                                    ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil  =-    (T_Productions (\ (!_lhsIaugmentsIn)-                      (!_lhsIcr)-                      (!_lhsIinh)-                      (!_lhsImanualAttrOrderMap)-                      (!_lhsInonterminals)-                      (!_lhsInt)-                      (!_lhsIo_rename)-                      (!_lhsIsyn)-                      (!_lhsItypeSyns)-                      (!_lhsIuniq)-                      (!_lhsIuseMap) ->-                        (case (Seq.empty) of-                         { !_lhsOerrors ->-                         (case ([]) of-                          { !_output ->-                          (case (_output) of-                           { !_lhsOoutput ->-                           (case (_lhsIuniq) 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 -   alternatives:-      alternative Rule:-         child pattern        : Pattern -         child rhs            : {Expression}-         child owrt           : {Bool}-         child origin         : {String}-         visit 0:-            local output      : _-            local _tup2       : {(Rules,Int)}--}--- cata-sem_Rule :: Rule  ->-            T_Rule -sem_Rule !(Rule _pattern _rhs _owrt _origin )  =-    (sem_Rule_Rule (sem_Pattern _pattern ) _rhs _owrt _origin )--- semantic domain-newtype T_Rule  = T_Rule (ConstructorIdent ->-                          NontermIdent ->-                          Int ->-                          ( Bool,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rule,Rules,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),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,!_lhsOuniq) =-             (sem _lhsIcon _lhsInt _lhsIuniq )-     in  (Syn_Rule _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOuniq ))-sem_Rule_Rule :: T_Pattern  ->-                 Expression ->-                 Bool ->-                 String ->-                 T_Rule -sem_Rule_Rule !(T_Pattern pattern_ ) !rhs_ !owrt_ !origin_  =-    (T_Rule (\ (!_lhsIcon)-               (!_lhsInt)-               (!_lhsIuniq) ->-                 (case (_lhsInt) of-                  { !_patternOnt ->-                  (case (_lhsIcon) of-                   { !_patternOcon ->-                   (case ((pattern_ _patternOcon _patternOnt )) of-                    { ( !_patternIcontainsVars,!_patternIcopy,!_patternIdefinedAttrs,!_patternIerrors,!_patternIlocals,!_patternIoutput) ->-                    (case (_patternIcontainsVars) of-                     { !_lhsOcontainsVars ->-                     (case (_patternIdefinedAttrs) of-                      { !_lhsOdefinedAttrs ->-                      (case (_patternIerrors) of-                       { !_lhsOerrors ->-                       (case (_patternIlocals) of-                        { !_lhsOlocals ->-                        (case (Rule _patternIoutput rhs_ owrt_ origin_) of-                         { !_output ->-                         (case (_output) of-                          { !_lhsOoutput ->-                          (case (multiRule _output     _lhsIuniq) of-                           { !__tup2 ->-                           (case (__tup2) of-                            { !(!_lhsOoutputs,_) ->-                            (case (__tup2) of-                             { !(_,!_lhsOuniq) ->-                             ( _lhsOcontainsVars,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOoutputs,_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 -   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,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),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,!_lhsOuniq) =-             (sem _lhsIcon _lhsInt _lhsIuniq )-     in  (Syn_Rules _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _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 (_lhsIuniq) of-                   { !_hdOuniq ->-                   (case (_lhsInt) of-                    { !_hdOnt ->-                    (case (_lhsIcon) of-                     { !_hdOcon ->-                     (case ((hd_ _hdOcon _hdOnt _hdOuniq )) of-                      { ( !_hdIcontainsVars,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput,!_hdIoutputs,!_hdIuniq) ->-                      (case (_hdIuniq) of-                       { !_tlOuniq ->-                       (case (_lhsInt) of-                        { !_tlOnt ->-                        (case (_lhsIcon) of-                         { !_tlOcon ->-                         (case ((tl_ _tlOcon _tlOnt _tlOuniq )) of-                          { ( !_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput,!_tlIuniq) ->-                          (case (_hdIdefinedAttrs `Set.union` _tlIdefinedAttrs) of-                           { !_lhsOdefinedAttrs ->-                           (case (_hdIerrors Seq.>< _tlIerrors) of-                            { !_lhsOerrors ->-                            (case (_hdIlocals `Set.union` _tlIlocals) of-                             { !_lhsOlocals ->-                             (case (if _hdIcontainsVars then _hdIoutputs ++ _tlIoutput else _tlIoutput) of-                              { !_lhsOoutput ->-                              (case (_tlIuniq) of-                               { !_lhsOuniq ->-                               ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil  =-    (T_Rules (\ (!_lhsIcon)-                (!_lhsInt)-                (!_lhsIuniq) ->-                  (case (Set.empty) of-                   { !_lhsOdefinedAttrs ->-                   (case (Seq.empty) of-                    { !_lhsOerrors ->-                    (case (Set.empty) of-                     { !_lhsOlocals ->-                     (case ([]) of-                      { !_output ->-                      (case (_output) of-                       { !_lhsOoutput ->-                       (case (_lhsIuniq) of-                        { !_lhsOuniq ->-                        ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_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 (TypeSig name_ tp_) of-                { !_output ->-                (case (_output) 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 ((:) _hdIoutput _tlIoutput) of-                   { !_output ->-                   (case (_output) of-                    { !_lhsOoutput ->-                    ( _lhsOoutput) }) }) }) }) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil  =-    (T_TypeSigs (case ([]) of-                 { !_output ->-                 (case (_output) of+{-# 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 170 "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 (Alias f1 a1 (Underscore noPos) []) +        expr +        False +        origin+++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 242 "../src-derived/DefaultRules.hs" #-}++{-# LINE 395 "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 (Alias _LHS syn (Underscore noPos) []) rhs False "augmented rule"+    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 (Alias _LOC name (Underscore noPos) []) expr False "augment function") funNames exprs++    modify (Rule pat rhs owrt origin)+      | containsSyn pat = Rule (modifyPat pat) rhs owrt origin+    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 (Alias _LOC childLoc (Underscore noPos) []) rhs False "around rule"+    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 (Alias _LOC name (Underscore noPos) []) expr False "around function") funNames exprs+{-# LINE 292 "../src-derived/DefaultRules.hs" #-}++{-# LINE 502 "DefaultRules.ag" #-}++{- +multiRule replaces+  loc.(a,b) = e+by  +  loc.tup1  = e+  loc.(a,_) = @loc.tup1+  loc.(_,b) = @loc.tup1+It needs to thread a unique number for inventing names for the tuples.++It also works for nested tuples:+  loc.(a,(b,c)) = e+becomes+  loc.tup1      = e+  loc.(a,_)     = @loc.tup1+  loc.(_,tup2)  = @loc.tup1+  loc.(b,_)     = @loc.tup2+  loc.(_,c)     = @loc.tup2+-}++multiRule :: Rule -> Int -> ([Rule], Int)	+multiRule (Rule pat expr owrt origin) uniq+  =  let f :: (Pattern->Pattern) -> Expression -> Pattern -> Int -> (Pattern, ([Rule], Int))+         f 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 (us (length xs1)) freshExpr p n1+                                      in  (x2:xs1, rs2++rs1, n2)+                 (xs9,rs9,n9) = foldr g ([], [], n+1) pats+             in  ( freshPat+                 , ( Rule (w freshPat) e owrt origin : rs9+                   , n9+                   )+                 )+         f w e p n +           = ( p+             , ( [Rule (w p) e owrt origin]+               , n+               )+             )+     in snd (f id expr pat uniq)++{-# LINE 342 "../src-derived/DefaultRules.hs" #-}+-- Child -------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         con                  : ConstructorIdent+         cr                   : Bool+         nt                   : NontermIdent+      synthesized attributes:+         errors               : Seq Error+         field                :  (Identifier,Type,Bool) +         inherited            : Attributes+         name                 : Identifier+         output               : SELF +         synthesized          : Attributes+   alternatives:+      alternative Child:+         child name           : {Identifier}+         child tp             : {Type}+         child inh            : {Attributes}+         child syn            : {Attributes}+         child higherOrder    : {Bool}+         visit 0:+            local output      : _+-}+-- cata+sem_Child :: Child  ->+             T_Child +sem_Child !(Child _name _tp _inh _syn _higherOrder )  =+    (sem_Child_Child _name _tp _inh _syn _higherOrder )+-- semantic domain+newtype T_Child  = T_Child (ConstructorIdent ->+                            Bool ->+                            NontermIdent ->+                            ( (Seq Error),( (Identifier,Type,Bool) ),Attributes,Identifier,Child,Attributes))+data Inh_Child  = Inh_Child {con_Inh_Child :: !(ConstructorIdent),cr_Inh_Child :: !(Bool),nt_Inh_Child :: !(NontermIdent)}+data Syn_Child  = Syn_Child {errors_Syn_Child :: !(Seq Error),field_Syn_Child :: !( (Identifier,Type,Bool) ),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 _lhsInt )  =+    (let ( !_lhsOerrors,!_lhsOfield,!_lhsOinherited,!_lhsOname,!_lhsOoutput,!_lhsOsynthesized) =+             (sem _lhsIcon _lhsIcr _lhsInt )+     in  (Syn_Child _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized ))+sem_Child_Child :: Identifier ->+                   Type ->+                   Attributes ->+                   Attributes ->+                   Bool ->+                   T_Child +sem_Child_Child !name_ !tp_ !inh_ !syn_ !higherOrder_  =+    (T_Child (\ (!_lhsIcon)+                (!_lhsIcr)+                (!_lhsInt) ->+                  (case ({-# LINE 115 "DefaultRules.ag" #-}+                         Seq.empty+                         {-# LINE 398 "DefaultRules.hs" #-}) of+                   { !_lhsOerrors ->+                   (case ({-# LINE 462 "DefaultRules.ag" #-}+                          (name_,tp_,higherOrder_)+                          {-# LINE 402 "DefaultRules.hs" #-}) of+                    { !_lhsOfield ->+                    (case ({-# LINE 155 "DefaultRules.ag" #-}+                           inh_+                           {-# LINE 406 "DefaultRules.hs" #-}) of+                     { !_lhsOinherited ->+                     (case ({-# LINE 146 "DefaultRules.ag" #-}+                            name_+                            {-# LINE 410 "DefaultRules.hs" #-}) of+                      { !_lhsOname ->+                      (case ({-# LINE 483 "DefaultRules.ag" #-}+                             Child name_ tp_ inh_ syn_ higherOrder_+                             {-# LINE 414 "DefaultRules.hs" #-}) of+                       { !_output ->+                       (case ({-# LINE 483 "DefaultRules.ag" #-}+                              _output+                              {-# LINE 418 "DefaultRules.hs" #-}) of+                        { !_lhsOoutput ->+                        (case ({-# LINE 156 "DefaultRules.ag" #-}+                               syn_+                               {-# LINE 422 "DefaultRules.hs" #-}) of+                         { !_lhsOsynthesized ->+                         ( _lhsOerrors,_lhsOfield,_lhsOinherited,_lhsOname,_lhsOoutput,_lhsOsynthesized) }) }) }) }) }) }) })) )+-- Children ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         con                  : ConstructorIdent+         cr                   : Bool+         nt                   : NontermIdent+      synthesized attributes:+         errors               : Seq Error+         fields               : [(Identifier,Type,Bool)]+         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 ->+                                  NontermIdent ->+                                  ( (Seq Error),([(Identifier,Type,Bool)]),([(Identifier, Attributes)]),Children,([(Identifier, Attributes)])))+data Inh_Children  = Inh_Children {con_Inh_Children :: !(ConstructorIdent),cr_Inh_Children :: !(Bool),nt_Inh_Children :: !(NontermIdent)}+data Syn_Children  = Syn_Children {errors_Syn_Children :: !(Seq Error),fields_Syn_Children :: !([(Identifier,Type,Bool)]),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 _lhsInt )  =+    (let ( !_lhsOerrors,!_lhsOfields,!_lhsOinputs,!_lhsOoutput,!_lhsOoutputs) =+             (sem _lhsIcon _lhsIcr _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)+                   (!_lhsInt) ->+                     (case ({-# LINE 34 "DefaultRules.ag" #-}+                            _lhsInt+                            {-# LINE 476 "DefaultRules.hs" #-}) of+                      { !_tlOnt ->+                      (case ({-# LINE 47 "DefaultRules.ag" #-}+                             _lhsIcr+                             {-# LINE 480 "DefaultRules.hs" #-}) of+                       { !_tlOcr ->+                       (case ({-# LINE 35 "DefaultRules.ag" #-}+                              _lhsIcon+                              {-# LINE 484 "DefaultRules.hs" #-}) of+                        { !_tlOcon ->+                        (case ((tl_ _tlOcon _tlOcr _tlOnt )) of+                         { ( !_tlIerrors,!_tlIfields,!_tlIinputs,!_tlIoutput,!_tlIoutputs) ->+                         (case ({-# LINE 34 "DefaultRules.ag" #-}+                                _lhsInt+                                {-# LINE 490 "DefaultRules.hs" #-}) of+                          { !_hdOnt ->+                          (case ({-# LINE 47 "DefaultRules.ag" #-}+                                 _lhsIcr+                                 {-# LINE 494 "DefaultRules.hs" #-}) of+                           { !_hdOcr ->+                           (case ({-# LINE 35 "DefaultRules.ag" #-}+                                  _lhsIcon+                                  {-# LINE 498 "DefaultRules.hs" #-}) of+                            { !_hdOcon ->+                            (case ((hd_ _hdOcon _hdOcr _hdOnt )) of+                             { ( !_hdIerrors,!_hdIfield,!_hdIinherited,!_hdIname,!_hdIoutput,!_hdIsynthesized) ->+                             (case ({-# LINE 115 "DefaultRules.ag" #-}+                                    _hdIerrors Seq.>< _tlIerrors+                                    {-# LINE 504 "DefaultRules.hs" #-}) of+                              { !_lhsOerrors ->+                              (case ({-# LINE 458 "DefaultRules.ag" #-}+                                     _hdIfield : _tlIfields+                                     {-# LINE 508 "DefaultRules.hs" #-}) of+                               { !_lhsOfields ->+                               (case ({-# LINE 159 "DefaultRules.ag" #-}+                                      (_hdIname, _hdIinherited) : _tlIinputs+                                      {-# LINE 512 "DefaultRules.hs" #-}) of+                                { !_lhsOinputs ->+                                (case ({-# LINE 483 "DefaultRules.ag" #-}+                                       (:) _hdIoutput _tlIoutput+                                       {-# LINE 516 "DefaultRules.hs" #-}) of+                                 { !_output ->+                                 (case ({-# LINE 483 "DefaultRules.ag" #-}+                                        _output+                                        {-# LINE 520 "DefaultRules.hs" #-}) of+                                  { !_lhsOoutput ->+                                  (case ({-# LINE 160 "DefaultRules.ag" #-}+                                         (_hdIname, _hdIsynthesized) : _tlIoutputs+                                         {-# LINE 524 "DefaultRules.hs" #-}) of+                                   { !_lhsOoutputs ->+                                   ( _lhsOerrors,_lhsOfields,_lhsOinputs,_lhsOoutput,_lhsOoutputs) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Children_Nil :: T_Children +sem_Children_Nil  =+    (T_Children (\ (!_lhsIcon)+                   (!_lhsIcr)+                   (!_lhsInt) ->+                     (case ({-# LINE 115 "DefaultRules.ag" #-}+                            Seq.empty+                            {-# LINE 534 "DefaultRules.hs" #-}) of+                      { !_lhsOerrors ->+                      (case ({-# LINE 459 "DefaultRules.ag" #-}+                             []+                             {-# LINE 538 "DefaultRules.hs" #-}) of+                       { !_lhsOfields ->+                       (case ({-# LINE 161 "DefaultRules.ag" #-}+                              []+                              {-# LINE 542 "DefaultRules.hs" #-}) of+                        { !_lhsOinputs ->+                        (case ({-# LINE 483 "DefaultRules.ag" #-}+                               []+                               {-# LINE 546 "DefaultRules.hs" #-}) of+                         { !_output ->+                         (case ({-# LINE 483 "DefaultRules.ag" #-}+                                _output+                                {-# LINE 550 "DefaultRules.hs" #-}) of+                          { !_lhsOoutput ->+                          (case ({-# LINE 162 "DefaultRules.ag" #-}+                                 []+                                 {-# LINE 554 "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]))}+         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 )  =+    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap )+-- 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]))) ->+                       T_Grammar +sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_  =+    (T_Grammar (\ (!_lhsIoptions) ->+                    (case ({-# LINE 559 "DefaultRules.ag" #-}+                           manualAttrOrderMap_+                           {-# LINE 616 "DefaultRules.hs" #-}) of+                     { !_nontsOmanualAttrOrderMap ->+                     (case ({-# LINE 150 "DefaultRules.ag" #-}+                            typeSyns_+                            {-# LINE 620 "DefaultRules.hs" #-}) of+                      { !_nontsOtypeSyns ->+                      (case ({-# LINE 148 "DefaultRules.ag" #-}+                             useMap_+                             {-# LINE 624 "DefaultRules.hs" #-}) of+                       { !_nontsOuseMap ->+                       (case ({-# LINE 50 "DefaultRules.ag" #-}+                              modcopy   _lhsIoptions+                              {-# LINE 628 "DefaultRules.hs" #-}) of+                        { !_nontsOcr ->+                        (case ({-# LINE 49 "DefaultRules.ag" #-}+                               rename    _lhsIoptions+                               {-# LINE 632 "DefaultRules.hs" #-}) of+                         { !_nontsOo_rename ->+                         (case ((nonts_ )) of+                          { ( !_nontsIcollect_nts,!T_Nonterminals_1 nonts_1) ->+                          (case ({-# LINE 619 "DefaultRules.ag" #-}+                                 aroundsMap_+                                 {-# LINE 638 "DefaultRules.hs" #-}) of+                           { !_nontsOaroundsIn ->+                           (case ({-# LINE 612 "DefaultRules.ag" #-}+                                  augmentsMap_+                                  {-# LINE 642 "DefaultRules.hs" #-}) of+                            { !_nontsOaugmentsIn ->+                            (case ({-# LINE 479 "DefaultRules.ag" #-}+                                   1+                                   {-# LINE 646 "DefaultRules.hs" #-}) of+                             { !_nontsOuniq ->+                             (case ({-# LINE 127 "DefaultRules.ag" #-}+                                    _nontsIcollect_nts+                                    {-# LINE 650 "DefaultRules.hs" #-}) of+                              { !_nontsOnonterminals ->+                              (case ((nonts_1 _nontsOaroundsIn _nontsOaugmentsIn _nontsOcr _nontsOmanualAttrOrderMap _nontsOnonterminals _nontsOo_rename _nontsOtypeSyns _nontsOuniq _nontsOuseMap )) of+                               { ( !_nontsIerrors,!_nontsIoutput,!_nontsIuniq) ->+                               (case ({-# LINE 115 "DefaultRules.ag" #-}+                                      _nontsIerrors+                                      {-# LINE 656 "DefaultRules.hs" #-}) of+                                { !_lhsOerrors ->+                                (case ({-# LINE 483 "DefaultRules.ag" #-}+                                       Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_ aroundsMap_+                                       {-# LINE 660 "DefaultRules.hs" #-}) of+                                 { !_output ->+                                 (case ({-# LINE 483 "DefaultRules.ag" #-}+                                        _output+                                        {-# LINE 664 "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+         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 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 ->+                                            (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),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 _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap )  =+    (let ( !_lhsOcollect_nts,!T_Nonterminal_1 sem_1) =+             (sem )+         ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =+             (sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _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 736 "DefaultRules.hs" #-}) of+                    { !_lhsOcollect_nts ->+                    (case ((sem_Nonterminal_Nonterminal_1 nt_ syn_ inh_ (T_Productions prods_ ) params_ )) of+                     { ( !sem_Nonterminal_1) ->+                     ( _lhsOcollect_nts,sem_Nonterminal_1) }) }) )+sem_Nonterminal_Nonterminal_1 :: NontermIdent ->+                                 Attributes ->+                                 Attributes ->+                                 T_Productions  ->+                                 ([Identifier]) ->+                                 T_Nonterminal_1 +sem_Nonterminal_Nonterminal_1 !nt_ !syn_ !inh_ !(T_Productions prods_ ) !params_  =+    (T_Nonterminal_1 (\ (!_lhsIaroundsIn)+                        (!_lhsIaugmentsIn)+                        (!_lhsIcr)+                        (!_lhsImanualAttrOrderMap)+                        (!_lhsInonterminals)+                        (!_lhsIo_rename)+                        (!_lhsItypeSyns)+                        (!_lhsIuniq)+                        (!_lhsIuseMap) ->+                          (case ({-# LINE 55 "DefaultRules.ag" #-}+                                 _lhsItypeSyns+                                 {-# LINE 759 "DefaultRules.hs" #-}) of+                           { !_prodsOtypeSyns ->+                           (case ({-# LINE 43 "DefaultRules.ag" #-}+                                  _lhsIo_rename+                                  {-# LINE 763 "DefaultRules.hs" #-}) of+                            { !_prodsOo_rename ->+                            (case ({-# LINE 555 "DefaultRules.ag" #-}+                                   _lhsImanualAttrOrderMap+                                   {-# LINE 767 "DefaultRules.hs" #-}) of+                             { !_prodsOmanualAttrOrderMap ->+                             (case ({-# LINE 44 "DefaultRules.ag" #-}+                                    _lhsIcr+                                    {-# LINE 771 "DefaultRules.hs" #-}) of+                              { !_prodsOcr ->+                              (case ({-# LINE 152 "DefaultRules.ag" #-}+                                     nt_+                                     {-# LINE 775 "DefaultRules.hs" #-}) of+                               { !_prodsOnt ->+                               (case ({-# LINE 140 "DefaultRules.ag" #-}+                                      Map.findWithDefault Map.empty nt_ _lhsIuseMap+                                      {-# LINE 779 "DefaultRules.hs" #-}) of+                                { !_prodsOuseMap ->+                                (case ({-# LINE 139 "DefaultRules.ag" #-}+                                       syn_+                                       {-# LINE 783 "DefaultRules.hs" #-}) of+                                 { !_prodsOsyn ->+                                 (case ({-# LINE 138 "DefaultRules.ag" #-}+                                        inh_+                                        {-# LINE 787 "DefaultRules.hs" #-}) of+                                  { !_prodsOinh ->+                                  (case ({-# LINE 476 "DefaultRules.ag" #-}+                                         _lhsIuniq+                                         {-# LINE 791 "DefaultRules.hs" #-}) of+                                   { !_prodsOuniq ->+                                   (case ({-# LINE 125 "DefaultRules.ag" #-}+                                          _lhsInonterminals+                                          {-# LINE 795 "DefaultRules.hs" #-}) of+                                    { !_prodsOnonterminals ->+                                    (case ({-# LINE 613 "DefaultRules.ag" #-}+                                           Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn+                                           {-# LINE 799 "DefaultRules.hs" #-}) of+                                     { !_augmentsIn ->+                                     (case ({-# LINE 610 "DefaultRules.ag" #-}+                                            _augmentsIn+                                            {-# LINE 803 "DefaultRules.hs" #-}) of+                                      { !_prodsOaugmentsIn ->+                                      (case ({-# LINE 620 "DefaultRules.ag" #-}+                                             Map.findWithDefault Map.empty nt_ _lhsIaroundsIn+                                             {-# LINE 807 "DefaultRules.hs" #-}) of+                                       { !_aroundsIn ->+                                       (case ({-# LINE 617 "DefaultRules.ag" #-}+                                              _aroundsIn+                                              {-# LINE 811 "DefaultRules.hs" #-}) of+                                        { !_prodsOaroundsIn ->+                                        (case ((prods_ _prodsOaroundsIn _prodsOaugmentsIn _prodsOcr _prodsOinh _prodsOmanualAttrOrderMap _prodsOnonterminals _prodsOnt _prodsOo_rename _prodsOsyn _prodsOtypeSyns _prodsOuniq _prodsOuseMap )) of+                                         { ( !_prodsIerrors,!_prodsIoutput,!_prodsIuniq) ->+                                         (case ({-# LINE 115 "DefaultRules.ag" #-}+                                                _prodsIerrors+                                                {-# LINE 817 "DefaultRules.hs" #-}) of+                                          { !_lhsOerrors ->+                                          (case ({-# LINE 483 "DefaultRules.ag" #-}+                                                 Nonterminal nt_ params_ inh_ syn_ _prodsIoutput+                                                 {-# LINE 821 "DefaultRules.hs" #-}) of+                                           { !_output ->+                                           (case ({-# LINE 483 "DefaultRules.ag" #-}+                                                  _output+                                                  {-# LINE 825 "DefaultRules.hs" #-}) of+                                            { !_lhsOoutput ->+                                            (case ({-# LINE 476 "DefaultRules.ag" #-}+                                                   _prodsIuniq+                                                   {-# LINE 829 "DefaultRules.hs" #-}) of+                                             { !_lhsOuniq ->+                                             ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- 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+         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 ->+                                              (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),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 _lhsInonterminals _lhsIo_rename _lhsItypeSyns _lhsIuniq _lhsIuseMap )  =+    (let ( !_lhsOcollect_nts,!T_Nonterminals_1 sem_1) =+             (sem )+         ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =+             (sem_1 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsImanualAttrOrderMap _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 900 "DefaultRules.hs" #-}) of+                       { !_lhsOcollect_nts ->+                       (case ((sem_Nonterminals_Cons_1 (T_Nonterminal_1 hd_1 ) (T_Nonterminals_1 tl_1 ) )) of+                        { ( !sem_Nonterminals_1) ->+                        ( _lhsOcollect_nts,sem_Nonterminals_1) }) }) }) }) )+sem_Nonterminals_Cons_1 :: T_Nonterminal_1  ->+                           T_Nonterminals_1  ->+                           T_Nonterminals_1 +sem_Nonterminals_Cons_1 !(T_Nonterminal_1 hd_1 ) !(T_Nonterminals_1 tl_1 )  =+    (T_Nonterminals_1 (\ (!_lhsIaroundsIn)+                         (!_lhsIaugmentsIn)+                         (!_lhsIcr)+                         (!_lhsImanualAttrOrderMap)+                         (!_lhsInonterminals)+                         (!_lhsIo_rename)+                         (!_lhsItypeSyns)+                         (!_lhsIuniq)+                         (!_lhsIuseMap) ->+                           (case ({-# LINE 134 "DefaultRules.ag" #-}+                                  _lhsIuseMap+                                  {-# LINE 920 "DefaultRules.hs" #-}) of+                            { !_tlOuseMap ->+                            (case ({-# LINE 55 "DefaultRules.ag" #-}+                                   _lhsItypeSyns+                                   {-# LINE 924 "DefaultRules.hs" #-}) of+                             { !_tlOtypeSyns ->+                             (case ({-# LINE 43 "DefaultRules.ag" #-}+                                    _lhsIo_rename+                                    {-# LINE 928 "DefaultRules.hs" #-}) of+                              { !_tlOo_rename ->+                              (case ({-# LINE 555 "DefaultRules.ag" #-}+                                     _lhsImanualAttrOrderMap+                                     {-# LINE 932 "DefaultRules.hs" #-}) of+                               { !_tlOmanualAttrOrderMap ->+                               (case ({-# LINE 44 "DefaultRules.ag" #-}+                                      _lhsIcr+                                      {-# LINE 936 "DefaultRules.hs" #-}) of+                                { !_tlOcr ->+                                (case ({-# LINE 134 "DefaultRules.ag" #-}+                                       _lhsIuseMap+                                       {-# LINE 940 "DefaultRules.hs" #-}) of+                                 { !_hdOuseMap ->+                                 (case ({-# LINE 55 "DefaultRules.ag" #-}+                                        _lhsItypeSyns+                                        {-# LINE 944 "DefaultRules.hs" #-}) of+                                  { !_hdOtypeSyns ->+                                  (case ({-# LINE 43 "DefaultRules.ag" #-}+                                         _lhsIo_rename+                                         {-# LINE 948 "DefaultRules.hs" #-}) of+                                   { !_hdOo_rename ->+                                   (case ({-# LINE 555 "DefaultRules.ag" #-}+                                          _lhsImanualAttrOrderMap+                                          {-# LINE 952 "DefaultRules.hs" #-}) of+                                    { !_hdOmanualAttrOrderMap ->+                                    (case ({-# LINE 44 "DefaultRules.ag" #-}+                                           _lhsIcr+                                           {-# LINE 956 "DefaultRules.hs" #-}) of+                                     { !_hdOcr ->+                                     (case ({-# LINE 476 "DefaultRules.ag" #-}+                                            _lhsIuniq+                                            {-# LINE 960 "DefaultRules.hs" #-}) of+                                      { !_hdOuniq ->+                                      (case ({-# LINE 125 "DefaultRules.ag" #-}+                                             _lhsInonterminals+                                             {-# LINE 964 "DefaultRules.hs" #-}) of+                                       { !_hdOnonterminals ->+                                       (case ({-# LINE 609 "DefaultRules.ag" #-}+                                              _lhsIaugmentsIn+                                              {-# LINE 968 "DefaultRules.hs" #-}) of+                                        { !_hdOaugmentsIn ->+                                        (case ({-# LINE 616 "DefaultRules.ag" #-}+                                               _lhsIaroundsIn+                                               {-# LINE 972 "DefaultRules.hs" #-}) of+                                         { !_hdOaroundsIn ->+                                         (case ((hd_1 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOmanualAttrOrderMap _hdOnonterminals _hdOo_rename _hdOtypeSyns _hdOuniq _hdOuseMap )) of+                                          { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->+                                          (case ({-# LINE 476 "DefaultRules.ag" #-}+                                                 _hdIuniq+                                                 {-# LINE 978 "DefaultRules.hs" #-}) of+                                           { !_tlOuniq ->+                                           (case ({-# LINE 125 "DefaultRules.ag" #-}+                                                  _lhsInonterminals+                                                  {-# LINE 982 "DefaultRules.hs" #-}) of+                                            { !_tlOnonterminals ->+                                            (case ({-# LINE 609 "DefaultRules.ag" #-}+                                                   _lhsIaugmentsIn+                                                   {-# LINE 986 "DefaultRules.hs" #-}) of+                                             { !_tlOaugmentsIn ->+                                             (case ({-# LINE 616 "DefaultRules.ag" #-}+                                                    _lhsIaroundsIn+                                                    {-# LINE 990 "DefaultRules.hs" #-}) of+                                              { !_tlOaroundsIn ->+                                              (case ((tl_1 _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOmanualAttrOrderMap _tlOnonterminals _tlOo_rename _tlOtypeSyns _tlOuniq _tlOuseMap )) of+                                               { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->+                                               (case ({-# LINE 115 "DefaultRules.ag" #-}+                                                      _hdIerrors Seq.>< _tlIerrors+                                                      {-# LINE 996 "DefaultRules.hs" #-}) of+                                                { !_lhsOerrors ->+                                                (case ({-# LINE 483 "DefaultRules.ag" #-}+                                                       (:) _hdIoutput _tlIoutput+                                                       {-# LINE 1000 "DefaultRules.hs" #-}) of+                                                 { !_output ->+                                                 (case ({-# LINE 483 "DefaultRules.ag" #-}+                                                        _output+                                                        {-# LINE 1004 "DefaultRules.hs" #-}) of+                                                  { !_lhsOoutput ->+                                                  (case ({-# LINE 476 "DefaultRules.ag" #-}+                                                         _tlIuniq+                                                         {-# LINE 1008 "DefaultRules.hs" #-}) of+                                                   { !_lhsOuniq ->+                                                   ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Nonterminals_Nil :: T_Nonterminals +sem_Nonterminals_Nil  =+    (T_Nonterminals (case ({-# LINE 121 "DefaultRules.ag" #-}+                           Set.empty+                           {-# LINE 1015 "DefaultRules.hs" #-}) of+                     { !_lhsOcollect_nts ->+                     (case ((sem_Nonterminals_Nil_1 )) of+                      { ( !sem_Nonterminals_1) ->+                      ( _lhsOcollect_nts,sem_Nonterminals_1) }) }) )+sem_Nonterminals_Nil_1 :: T_Nonterminals_1 +sem_Nonterminals_Nil_1  =+    (T_Nonterminals_1 (\ (!_lhsIaroundsIn)+                         (!_lhsIaugmentsIn)+                         (!_lhsIcr)+                         (!_lhsImanualAttrOrderMap)+                         (!_lhsInonterminals)+                         (!_lhsIo_rename)+                         (!_lhsItypeSyns)+                         (!_lhsIuniq)+                         (!_lhsIuseMap) ->+                           (case ({-# LINE 115 "DefaultRules.ag" #-}+                                  Seq.empty+                                  {-# LINE 1033 "DefaultRules.hs" #-}) of+                            { !_lhsOerrors ->+                            (case ({-# LINE 483 "DefaultRules.ag" #-}+                                   []+                                   {-# LINE 1037 "DefaultRules.hs" #-}) of+                             { !_output ->+                             (case ({-# LINE 483 "DefaultRules.ag" #-}+                                    _output+                                    {-# LINE 1041 "DefaultRules.hs" #-}) of+                              { !_lhsOoutput ->+                              (case ({-# LINE 476 "DefaultRules.ag" #-}+                                     _lhsIuniq+                                     {-# LINE 1045 "DefaultRules.hs" #-}) of+                               { !_lhsOuniq ->+                               ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) )+-- 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 470 "DefaultRules.ag" #-}+                           True+                           {-# LINE 1129 "DefaultRules.hs" #-}) of+                     { !_lhsOcontainsVars ->+                     (case ({-# LINE 34 "DefaultRules.ag" #-}+                            _lhsInt+                            {-# LINE 1133 "DefaultRules.hs" #-}) of+                      { !_partsOnt ->+                      (case ({-# LINE 35 "DefaultRules.ag" #-}+                             _lhsIcon+                             {-# LINE 1137 "DefaultRules.hs" #-}) of+                       { !_partsOcon ->+                       (case ((parts_ _partsOcon _partsOnt )) of+                        { ( !_partsIcontainsVars,!_partsIcopy,!_partsIdefinedAttrs,!_partsIerrors,!_partsIlocals,!_partsIoutput) ->+                        (case ({-# LINE 34 "DefaultRules.ag" #-}+                               _lhsInt+                               {-# LINE 1143 "DefaultRules.hs" #-}) of+                         { !_patOnt ->+                         (case ({-# LINE 35 "DefaultRules.ag" #-}+                                _lhsIcon+                                {-# LINE 1147 "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 1153 "DefaultRules.hs" #-}) of+                            { !_copy ->+                            (case ({-# LINE 23 "./Patterns.ag" #-}+                                   _copy+                                   {-# LINE 1157 "DefaultRules.hs" #-}) of+                             { !_lhsOcopy ->+                             (case ({-# LINE 452 "DefaultRules.ag" #-}+                                    Set.insert (field_,attr_) _patIdefinedAttrs+                                    {-# LINE 1161 "DefaultRules.hs" #-}) of+                              { !_lhsOdefinedAttrs ->+                              (case ({-# LINE 115 "DefaultRules.ag" #-}+                                     _patIerrors Seq.>< _partsIerrors+                                     {-# LINE 1165 "DefaultRules.hs" #-}) of+                               { !_lhsOerrors ->+                               (case ({-# LINE 453 "DefaultRules.ag" #-}+                                      if field_ == _LOC+                                         then Set.insert attr_ _patIlocals+                                         else _patIlocals+                                      {-# LINE 1171 "DefaultRules.hs" #-}) of+                                { !_lhsOlocals ->+                                (case ({-# LINE 483 "DefaultRules.ag" #-}+                                       Alias field_ attr_ _patIoutput _partsIoutput+                                       {-# LINE 1175 "DefaultRules.hs" #-}) of+                                 { !_output ->+                                 (case ({-# LINE 483 "DefaultRules.ag" #-}+                                        _output+                                        {-# LINE 1179 "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 1190 "DefaultRules.hs" #-}) of+                     { !_patsOnt ->+                     (case ({-# LINE 35 "DefaultRules.ag" #-}+                            _lhsIcon+                            {-# LINE 1194 "DefaultRules.hs" #-}) of+                      { !_patsOcon ->+                      (case ((pats_ _patsOcon _patsOnt )) of+                       { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->+                       (case ({-# LINE 467 "DefaultRules.ag" #-}+                              _patsIcontainsVars+                              {-# LINE 1200 "DefaultRules.hs" #-}) of+                        { !_lhsOcontainsVars ->+                        (case ({-# LINE 23 "./Patterns.ag" #-}+                               Constr name_ _patsIcopy+                               {-# LINE 1204 "DefaultRules.hs" #-}) of+                         { !_copy ->+                         (case ({-# LINE 23 "./Patterns.ag" #-}+                                _copy+                                {-# LINE 1208 "DefaultRules.hs" #-}) of+                          { !_lhsOcopy ->+                          (case ({-# LINE 447 "DefaultRules.ag" #-}+                                 _patsIdefinedAttrs+                                 {-# LINE 1212 "DefaultRules.hs" #-}) of+                           { !_lhsOdefinedAttrs ->+                           (case ({-# LINE 115 "DefaultRules.ag" #-}+                                  _patsIerrors+                                  {-# LINE 1216 "DefaultRules.hs" #-}) of+                            { !_lhsOerrors ->+                            (case ({-# LINE 446 "DefaultRules.ag" #-}+                                   _patsIlocals+                                   {-# LINE 1220 "DefaultRules.hs" #-}) of+                             { !_lhsOlocals ->+                             (case ({-# LINE 483 "DefaultRules.ag" #-}+                                    Constr name_ _patsIoutput+                                    {-# LINE 1224 "DefaultRules.hs" #-}) of+                              { !_output ->+                              (case ({-# LINE 483 "DefaultRules.ag" #-}+                                     _output+                                     {-# LINE 1228 "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 1238 "DefaultRules.hs" #-}) of+                     { !_patOnt ->+                     (case ({-# LINE 35 "DefaultRules.ag" #-}+                            _lhsIcon+                            {-# LINE 1242 "DefaultRules.hs" #-}) of+                      { !_patOcon ->+                      (case ((pat_ _patOcon _patOnt )) of+                       { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) ->+                       (case ({-# LINE 467 "DefaultRules.ag" #-}+                              _patIcontainsVars+                              {-# LINE 1248 "DefaultRules.hs" #-}) of+                        { !_lhsOcontainsVars ->+                        (case ({-# LINE 23 "./Patterns.ag" #-}+                               Irrefutable _patIcopy+                               {-# LINE 1252 "DefaultRules.hs" #-}) of+                         { !_copy ->+                         (case ({-# LINE 23 "./Patterns.ag" #-}+                                _copy+                                {-# LINE 1256 "DefaultRules.hs" #-}) of+                          { !_lhsOcopy ->+                          (case ({-# LINE 447 "DefaultRules.ag" #-}+                                 _patIdefinedAttrs+                                 {-# LINE 1260 "DefaultRules.hs" #-}) of+                           { !_lhsOdefinedAttrs ->+                           (case ({-# LINE 115 "DefaultRules.ag" #-}+                                  _patIerrors+                                  {-# LINE 1264 "DefaultRules.hs" #-}) of+                            { !_lhsOerrors ->+                            (case ({-# LINE 446 "DefaultRules.ag" #-}+                                   _patIlocals+                                   {-# LINE 1268 "DefaultRules.hs" #-}) of+                             { !_lhsOlocals ->+                             (case ({-# LINE 483 "DefaultRules.ag" #-}+                                    Irrefutable _patIoutput+                                    {-# LINE 1272 "DefaultRules.hs" #-}) of+                              { !_output ->+                              (case ({-# LINE 483 "DefaultRules.ag" #-}+                                     _output+                                     {-# LINE 1276 "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 1287 "DefaultRules.hs" #-}) of+                     { !_patsOnt ->+                     (case ({-# LINE 35 "DefaultRules.ag" #-}+                            _lhsIcon+                            {-# LINE 1291 "DefaultRules.hs" #-}) of+                      { !_patsOcon ->+                      (case ((pats_ _patsOcon _patsOnt )) of+                       { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) ->+                       (case ({-# LINE 467 "DefaultRules.ag" #-}+                              _patsIcontainsVars+                              {-# LINE 1297 "DefaultRules.hs" #-}) of+                        { !_lhsOcontainsVars ->+                        (case ({-# LINE 23 "./Patterns.ag" #-}+                               Product pos_ _patsIcopy+                               {-# LINE 1301 "DefaultRules.hs" #-}) of+                         { !_copy ->+                         (case ({-# LINE 23 "./Patterns.ag" #-}+                                _copy+                                {-# LINE 1305 "DefaultRules.hs" #-}) of+                          { !_lhsOcopy ->+                          (case ({-# LINE 447 "DefaultRules.ag" #-}+                                 _patsIdefinedAttrs+                                 {-# LINE 1309 "DefaultRules.hs" #-}) of+                           { !_lhsOdefinedAttrs ->+                           (case ({-# LINE 115 "DefaultRules.ag" #-}+                                  _patsIerrors+                                  {-# LINE 1313 "DefaultRules.hs" #-}) of+                            { !_lhsOerrors ->+                            (case ({-# LINE 446 "DefaultRules.ag" #-}+                                   _patsIlocals+                                   {-# LINE 1317 "DefaultRules.hs" #-}) of+                             { !_lhsOlocals ->+                             (case ({-# LINE 483 "DefaultRules.ag" #-}+                                    Product pos_ _patsIoutput+                                    {-# LINE 1321 "DefaultRules.hs" #-}) of+                              { !_output ->+                              (case ({-# LINE 483 "DefaultRules.ag" #-}+                                     _output+                                     {-# LINE 1325 "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 467 "DefaultRules.ag" #-}+                           False+                           {-# LINE 1335 "DefaultRules.hs" #-}) of+                     { !_lhsOcontainsVars ->+                     (case ({-# LINE 23 "./Patterns.ag" #-}+                            Underscore pos_+                            {-# LINE 1339 "DefaultRules.hs" #-}) of+                      { !_copy ->+                      (case ({-# LINE 23 "./Patterns.ag" #-}+                             _copy+                             {-# LINE 1343 "DefaultRules.hs" #-}) of+                       { !_lhsOcopy ->+                       (case ({-# LINE 447 "DefaultRules.ag" #-}+                              Set.empty+                              {-# LINE 1347 "DefaultRules.hs" #-}) of+                        { !_lhsOdefinedAttrs ->+                        (case ({-# LINE 115 "DefaultRules.ag" #-}+                               Seq.empty+                               {-# LINE 1351 "DefaultRules.hs" #-}) of+                         { !_lhsOerrors ->+                         (case ({-# LINE 446 "DefaultRules.ag" #-}+                                Set.empty+                                {-# LINE 1355 "DefaultRules.hs" #-}) of+                          { !_lhsOlocals ->+                          (case ({-# LINE 483 "DefaultRules.ag" #-}+                                 Underscore pos_+                                 {-# LINE 1359 "DefaultRules.hs" #-}) of+                           { !_output ->+                           (case ({-# LINE 483 "DefaultRules.ag" #-}+                                  _output+                                  {-# LINE 1363 "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 1417 "DefaultRules.hs" #-}) of+                      { !_tlOnt ->+                      (case ({-# LINE 35 "DefaultRules.ag" #-}+                             _lhsIcon+                             {-# LINE 1421 "DefaultRules.hs" #-}) of+                       { !_tlOcon ->+                       (case ((tl_ _tlOcon _tlOnt )) of+                        { ( !_tlIcontainsVars,!_tlIcopy,!_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput) ->+                        (case ({-# LINE 34 "DefaultRules.ag" #-}+                               _lhsInt+                               {-# LINE 1427 "DefaultRules.hs" #-}) of+                         { !_hdOnt ->+                         (case ({-# LINE 35 "DefaultRules.ag" #-}+                                _lhsIcon+                                {-# LINE 1431 "DefaultRules.hs" #-}) of+                          { !_hdOcon ->+                          (case ((hd_ _hdOcon _hdOnt )) of+                           { ( !_hdIcontainsVars,!_hdIcopy,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput) ->+                           (case ({-# LINE 467 "DefaultRules.ag" #-}+                                  _hdIcontainsVars || _tlIcontainsVars+                                  {-# LINE 1437 "DefaultRules.hs" #-}) of+                            { !_lhsOcontainsVars ->+                            (case ({-# LINE 23 "./Patterns.ag" #-}+                                   (:) _hdIcopy _tlIcopy+                                   {-# LINE 1441 "DefaultRules.hs" #-}) of+                             { !_copy ->+                             (case ({-# LINE 23 "./Patterns.ag" #-}+                                    _copy+                                    {-# LINE 1445 "DefaultRules.hs" #-}) of+                              { !_lhsOcopy ->+                              (case ({-# LINE 447 "DefaultRules.ag" #-}+                                     _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs+                                     {-# LINE 1449 "DefaultRules.hs" #-}) of+                               { !_lhsOdefinedAttrs ->+                               (case ({-# LINE 115 "DefaultRules.ag" #-}+                                      _hdIerrors Seq.>< _tlIerrors+                                      {-# LINE 1453 "DefaultRules.hs" #-}) of+                                { !_lhsOerrors ->+                                (case ({-# LINE 446 "DefaultRules.ag" #-}+                                       _hdIlocals `Set.union` _tlIlocals+                                       {-# LINE 1457 "DefaultRules.hs" #-}) of+                                 { !_lhsOlocals ->+                                 (case ({-# LINE 483 "DefaultRules.ag" #-}+                                        (:) _hdIoutput _tlIoutput+                                        {-# LINE 1461 "DefaultRules.hs" #-}) of+                                  { !_output ->+                                  (case ({-# LINE 483 "DefaultRules.ag" #-}+                                         _output+                                         {-# LINE 1465 "DefaultRules.hs" #-}) of+                                   { !_lhsOoutput ->+                                   ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil  =+    (T_Patterns (\ (!_lhsIcon)+                   (!_lhsInt) ->+                     (case ({-# LINE 467 "DefaultRules.ag" #-}+                            False+                            {-# LINE 1474 "DefaultRules.hs" #-}) of+                      { !_lhsOcontainsVars ->+                      (case ({-# LINE 23 "./Patterns.ag" #-}+                             []+                             {-# LINE 1478 "DefaultRules.hs" #-}) of+                       { !_copy ->+                       (case ({-# LINE 23 "./Patterns.ag" #-}+                              _copy+                              {-# LINE 1482 "DefaultRules.hs" #-}) of+                        { !_lhsOcopy ->+                        (case ({-# LINE 447 "DefaultRules.ag" #-}+                               Set.empty+                               {-# LINE 1486 "DefaultRules.hs" #-}) of+                         { !_lhsOdefinedAttrs ->+                         (case ({-# LINE 115 "DefaultRules.ag" #-}+                                Seq.empty+                                {-# LINE 1490 "DefaultRules.hs" #-}) of+                          { !_lhsOerrors ->+                          (case ({-# LINE 446 "DefaultRules.ag" #-}+                                 Set.empty+                                 {-# LINE 1494 "DefaultRules.hs" #-}) of+                           { !_lhsOlocals ->+                           (case ({-# LINE 483 "DefaultRules.ag" #-}+                                  []+                                  {-# LINE 1498 "DefaultRules.hs" #-}) of+                            { !_output ->+                            (case ({-# LINE 483 "DefaultRules.ag" #-}+                                   _output+                                   {-# LINE 1502 "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+         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 orderDeps   : _+            local orderErrs   : _+            local _tup1       : _+            local errs        : _+            local aroundsIn   : _+            local augmentsIn  : _+            local newRls      : _+            local extra1      : _+            local extra2      : _+-}+-- 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 ->+                                      (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),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 _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap )  =+    (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =+             (sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _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)+                     (!_lhsInonterminals)+                     (!_lhsInt)+                     (!_lhsIo_rename)+                     (!_lhsIsyn)+                     (!_lhsItypeSyns)+                     (!_lhsIuniq)+                     (!_lhsIuseMap) ->+                       (case ({-# LINE 564 "DefaultRules.ag" #-}+                              Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrOrderMap+                              {-# LINE 1590 "DefaultRules.hs" #-}) of+                        { !_orderDeps ->+                        (case ({-# LINE 476 "DefaultRules.ag" #-}+                               _lhsIuniq+                               {-# LINE 1594 "DefaultRules.hs" #-}) of+                         { !_rulesOuniq ->+                         (case ({-# LINE 34 "DefaultRules.ag" #-}+                                _lhsInt+                                {-# LINE 1598 "DefaultRules.hs" #-}) of+                          { !_rulesOnt ->+                          (case ({-# LINE 143 "DefaultRules.ag" #-}+                                 con_+                                 {-# LINE 1602 "DefaultRules.hs" #-}) of+                           { !_rulesOcon ->+                           (case ((rules_ _rulesOcon _rulesOnt _rulesOuniq )) of+                            { ( !_rulesIdefinedAttrs,!_rulesIerrors,!_rulesIlocals,!_rulesIoutput,!_rulesIuniq) ->+                            (case ({-# LINE 34 "DefaultRules.ag" #-}+                                   _lhsInt+                                   {-# LINE 1608 "DefaultRules.hs" #-}) of+                             { !_childrenOnt ->+                             (case ({-# LINE 47 "DefaultRules.ag" #-}+                                    _lhsIcr+                                    {-# LINE 1612 "DefaultRules.hs" #-}) of+                              { !_childrenOcr ->+                              (case ({-# LINE 144 "DefaultRules.ag" #-}+                                     con_+                                     {-# LINE 1616 "DefaultRules.hs" #-}) of+                               { !_childrenOcon ->+                               (case ((children_ _childrenOcon _childrenOcr _childrenOnt )) of+                                { ( !_childrenIerrors,!_childrenIfields,!_childrenIinputs,!_childrenIoutput,!_childrenIoutputs) ->+                                (case ({-# LINE 566 "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]+                                       in Seq.fromList . concat $+                                          [ isInAttribute fldA nmA ++ isOutAttribute fldB nmB+                                          | dep@(Dependency (fldA,nmA) (fldB,nmB)) <- _orderDeps+                                          ]+                                       {-# LINE 1649 "DefaultRules.hs" #-}) of+                                 { !_orderErrs ->+                                 (case ({-# LINE 328 "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,ho) <- _childrenIfields, not ho])+                                                 | 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+                                            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 1705 "DefaultRules.hs" #-}) of+                                  { !__tup1 ->+                                  (case ({-# LINE 328 "DefaultRules.ag" #-}+                                         __tup1+                                         {-# LINE 1709 "DefaultRules.hs" #-}) of+                                   { !(_,!_errs) ->+                                   (case ({-# LINE 326 "DefaultRules.ag" #-}+                                          _childrenIerrors >< _errs >< _rulesIerrors >< _orderErrs+                                          {-# LINE 1713 "DefaultRules.hs" #-}) of+                                    { !_lhsOerrors ->+                                    (case ({-# LINE 621 "DefaultRules.ag" #-}+                                           Map.findWithDefault Map.empty con_ _lhsIaroundsIn+                                           {-# LINE 1717 "DefaultRules.hs" #-}) of+                                     { !_aroundsIn ->+                                     (case ({-# LINE 614 "DefaultRules.ag" #-}+                                            Map.findWithDefault Map.empty con_ _lhsIaugmentsIn+                                            {-# LINE 1721 "DefaultRules.hs" #-}) of+                                      { !_augmentsIn ->+                                      (case ({-# LINE 328 "DefaultRules.ag" #-}+                                             __tup1+                                             {-# LINE 1725 "DefaultRules.hs" #-}) of+                                       { !(!_newRls,_) ->+                                       (case ({-# LINE 490 "DefaultRules.ag" #-}+                                              foldr addAugments (_rulesIoutput ++ _newRls) (Map.assocs _augmentsIn    )+                                              {-# LINE 1729 "DefaultRules.hs" #-}) of+                                        { !_extra1 ->+                                        (case ({-# LINE 491 "DefaultRules.ag" #-}+                                               foldr addArounds _extra1     (Map.assocs _aroundsIn    )+                                               {-# LINE 1733 "DefaultRules.hs" #-}) of+                                         { !_extra2 ->+                                         (case ((typeSigs_ )) of+                                          { ( !_typeSigsIoutput) ->+                                          (case ({-# LINE 492 "DefaultRules.ag" #-}+                                                 Production con_ _childrenIoutput _extra2     _typeSigsIoutput+                                                 {-# LINE 1739 "DefaultRules.hs" #-}) of+                                           { !_lhsOoutput ->+                                           (case ({-# LINE 476 "DefaultRules.ag" #-}+                                                  _rulesIuniq+                                                  {-# LINE 1743 "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+         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 ->+                                        (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),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 _lhsInonterminals _lhsInt _lhsIo_rename _lhsIsyn _lhsItypeSyns _lhsIuniq _lhsIuseMap )  =+    (let ( !_lhsOerrors,!_lhsOoutput,!_lhsOuniq) =+             (sem _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsImanualAttrOrderMap _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)+                      (!_lhsInonterminals)+                      (!_lhsInt)+                      (!_lhsIo_rename)+                      (!_lhsIsyn)+                      (!_lhsItypeSyns)+                      (!_lhsIuniq)+                      (!_lhsIuseMap) ->+                        (case ({-# LINE 135 "DefaultRules.ag" #-}+                               _lhsIuseMap+                               {-# LINE 1822 "DefaultRules.hs" #-}) of+                         { !_tlOuseMap ->+                         (case ({-# LINE 55 "DefaultRules.ag" #-}+                                _lhsItypeSyns+                                {-# LINE 1826 "DefaultRules.hs" #-}) of+                          { !_tlOtypeSyns ->+                          (case ({-# LINE 135 "DefaultRules.ag" #-}+                                 _lhsIsyn+                                 {-# LINE 1830 "DefaultRules.hs" #-}) of+                           { !_tlOsyn ->+                           (case ({-# LINE 43 "DefaultRules.ag" #-}+                                  _lhsIo_rename+                                  {-# LINE 1834 "DefaultRules.hs" #-}) of+                            { !_tlOo_rename ->+                            (case ({-# LINE 34 "DefaultRules.ag" #-}+                                   _lhsInt+                                   {-# LINE 1838 "DefaultRules.hs" #-}) of+                             { !_tlOnt ->+                             (case ({-# LINE 555 "DefaultRules.ag" #-}+                                    _lhsImanualAttrOrderMap+                                    {-# LINE 1842 "DefaultRules.hs" #-}) of+                              { !_tlOmanualAttrOrderMap ->+                              (case ({-# LINE 135 "DefaultRules.ag" #-}+                                     _lhsIinh+                                     {-# LINE 1846 "DefaultRules.hs" #-}) of+                               { !_tlOinh ->+                               (case ({-# LINE 44 "DefaultRules.ag" #-}+                                      _lhsIcr+                                      {-# LINE 1850 "DefaultRules.hs" #-}) of+                                { !_tlOcr ->+                                (case ({-# LINE 135 "DefaultRules.ag" #-}+                                       _lhsIuseMap+                                       {-# LINE 1854 "DefaultRules.hs" #-}) of+                                 { !_hdOuseMap ->+                                 (case ({-# LINE 55 "DefaultRules.ag" #-}+                                        _lhsItypeSyns+                                        {-# LINE 1858 "DefaultRules.hs" #-}) of+                                  { !_hdOtypeSyns ->+                                  (case ({-# LINE 135 "DefaultRules.ag" #-}+                                         _lhsIsyn+                                         {-# LINE 1862 "DefaultRules.hs" #-}) of+                                   { !_hdOsyn ->+                                   (case ({-# LINE 43 "DefaultRules.ag" #-}+                                          _lhsIo_rename+                                          {-# LINE 1866 "DefaultRules.hs" #-}) of+                                    { !_hdOo_rename ->+                                    (case ({-# LINE 34 "DefaultRules.ag" #-}+                                           _lhsInt+                                           {-# LINE 1870 "DefaultRules.hs" #-}) of+                                     { !_hdOnt ->+                                     (case ({-# LINE 555 "DefaultRules.ag" #-}+                                            _lhsImanualAttrOrderMap+                                            {-# LINE 1874 "DefaultRules.hs" #-}) of+                                      { !_hdOmanualAttrOrderMap ->+                                      (case ({-# LINE 135 "DefaultRules.ag" #-}+                                             _lhsIinh+                                             {-# LINE 1878 "DefaultRules.hs" #-}) of+                                       { !_hdOinh ->+                                       (case ({-# LINE 44 "DefaultRules.ag" #-}+                                              _lhsIcr+                                              {-# LINE 1882 "DefaultRules.hs" #-}) of+                                        { !_hdOcr ->+                                        (case ({-# LINE 476 "DefaultRules.ag" #-}+                                               _lhsIuniq+                                               {-# LINE 1886 "DefaultRules.hs" #-}) of+                                         { !_hdOuniq ->+                                         (case ({-# LINE 125 "DefaultRules.ag" #-}+                                                _lhsInonterminals+                                                {-# LINE 1890 "DefaultRules.hs" #-}) of+                                          { !_hdOnonterminals ->+                                          (case ({-# LINE 610 "DefaultRules.ag" #-}+                                                 _lhsIaugmentsIn+                                                 {-# LINE 1894 "DefaultRules.hs" #-}) of+                                           { !_hdOaugmentsIn ->+                                           (case ({-# LINE 617 "DefaultRules.ag" #-}+                                                  _lhsIaroundsIn+                                                  {-# LINE 1898 "DefaultRules.hs" #-}) of+                                            { !_hdOaroundsIn ->+                                            (case ((hd_ _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinh _hdOmanualAttrOrderMap _hdOnonterminals _hdOnt _hdOo_rename _hdOsyn _hdOtypeSyns _hdOuniq _hdOuseMap )) of+                                             { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->+                                             (case ({-# LINE 476 "DefaultRules.ag" #-}+                                                    _hdIuniq+                                                    {-# LINE 1904 "DefaultRules.hs" #-}) of+                                              { !_tlOuniq ->+                                              (case ({-# LINE 125 "DefaultRules.ag" #-}+                                                     _lhsInonterminals+                                                     {-# LINE 1908 "DefaultRules.hs" #-}) of+                                               { !_tlOnonterminals ->+                                               (case ({-# LINE 610 "DefaultRules.ag" #-}+                                                      _lhsIaugmentsIn+                                                      {-# LINE 1912 "DefaultRules.hs" #-}) of+                                                { !_tlOaugmentsIn ->+                                                (case ({-# LINE 617 "DefaultRules.ag" #-}+                                                       _lhsIaroundsIn+                                                       {-# LINE 1916 "DefaultRules.hs" #-}) of+                                                 { !_tlOaroundsIn ->+                                                 (case ((tl_ _tlOaroundsIn _tlOaugmentsIn _tlOcr _tlOinh _tlOmanualAttrOrderMap _tlOnonterminals _tlOnt _tlOo_rename _tlOsyn _tlOtypeSyns _tlOuniq _tlOuseMap )) of+                                                  { ( !_tlIerrors,!_tlIoutput,!_tlIuniq) ->+                                                  (case ({-# LINE 115 "DefaultRules.ag" #-}+                                                         _hdIerrors Seq.>< _tlIerrors+                                                         {-# LINE 1922 "DefaultRules.hs" #-}) of+                                                   { !_lhsOerrors ->+                                                   (case ({-# LINE 483 "DefaultRules.ag" #-}+                                                          (:) _hdIoutput _tlIoutput+                                                          {-# LINE 1926 "DefaultRules.hs" #-}) of+                                                    { !_output ->+                                                    (case ({-# LINE 483 "DefaultRules.ag" #-}+                                                           _output+                                                           {-# LINE 1930 "DefaultRules.hs" #-}) of+                                                     { !_lhsOoutput ->+                                                     (case ({-# LINE 476 "DefaultRules.ag" #-}+                                                            _tlIuniq+                                                            {-# LINE 1934 "DefaultRules.hs" #-}) of+                                                      { !_lhsOuniq ->+                                                      ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Productions_Nil :: T_Productions +sem_Productions_Nil  =+    (T_Productions (\ (!_lhsIaroundsIn)+                      (!_lhsIaugmentsIn)+                      (!_lhsIcr)+                      (!_lhsIinh)+                      (!_lhsImanualAttrOrderMap)+                      (!_lhsInonterminals)+                      (!_lhsInt)+                      (!_lhsIo_rename)+                      (!_lhsIsyn)+                      (!_lhsItypeSyns)+                      (!_lhsIuniq)+                      (!_lhsIuseMap) ->+                        (case ({-# LINE 115 "DefaultRules.ag" #-}+                               Seq.empty+                               {-# LINE 1953 "DefaultRules.hs" #-}) of+                         { !_lhsOerrors ->+                         (case ({-# LINE 483 "DefaultRules.ag" #-}+                                []+                                {-# LINE 1957 "DefaultRules.hs" #-}) of+                          { !_output ->+                          (case ({-# LINE 483 "DefaultRules.ag" #-}+                                 _output+                                 {-# LINE 1961 "DefaultRules.hs" #-}) of+                           { !_lhsOoutput ->+                           (case ({-# LINE 476 "DefaultRules.ag" #-}+                                  _lhsIuniq+                                  {-# LINE 1965 "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 +   alternatives:+      alternative Rule:+         child pattern        : Pattern +         child rhs            : {Expression}+         child owrt           : {Bool}+         child origin         : {String}+         visit 0:+            local output      : _+            local _tup2       : {(Rules,Int)}+-}+-- cata+sem_Rule :: Rule  ->+            T_Rule +sem_Rule !(Rule _pattern _rhs _owrt _origin )  =+    (sem_Rule_Rule (sem_Pattern _pattern ) _rhs _owrt _origin )+-- semantic domain+newtype T_Rule  = T_Rule (ConstructorIdent ->+                          NontermIdent ->+                          Int ->+                          ( Bool,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rule,Rules,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),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,!_lhsOuniq) =+             (sem _lhsIcon _lhsInt _lhsIuniq )+     in  (Syn_Rule _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOuniq ))+sem_Rule_Rule :: T_Pattern  ->+                 Expression ->+                 Bool ->+                 String ->+                 T_Rule +sem_Rule_Rule !(T_Pattern pattern_ ) !rhs_ !owrt_ !origin_  =+    (T_Rule (\ (!_lhsIcon)+               (!_lhsInt)+               (!_lhsIuniq) ->+                 (case ({-# LINE 34 "DefaultRules.ag" #-}+                        _lhsInt+                        {-# LINE 2023 "DefaultRules.hs" #-}) of+                  { !_patternOnt ->+                  (case ({-# LINE 35 "DefaultRules.ag" #-}+                         _lhsIcon+                         {-# LINE 2027 "DefaultRules.hs" #-}) of+                   { !_patternOcon ->+                   (case ((pattern_ _patternOcon _patternOnt )) of+                    { ( !_patternIcontainsVars,!_patternIcopy,!_patternIdefinedAttrs,!_patternIerrors,!_patternIlocals,!_patternIoutput) ->+                    (case ({-# LINE 467 "DefaultRules.ag" #-}+                           _patternIcontainsVars+                           {-# LINE 2033 "DefaultRules.hs" #-}) of+                     { !_lhsOcontainsVars ->+                     (case ({-# LINE 447 "DefaultRules.ag" #-}+                            _patternIdefinedAttrs+                            {-# LINE 2037 "DefaultRules.hs" #-}) of+                      { !_lhsOdefinedAttrs ->+                      (case ({-# LINE 115 "DefaultRules.ag" #-}+                             _patternIerrors+                             {-# LINE 2041 "DefaultRules.hs" #-}) of+                       { !_lhsOerrors ->+                       (case ({-# LINE 446 "DefaultRules.ag" #-}+                              _patternIlocals+                              {-# LINE 2045 "DefaultRules.hs" #-}) of+                        { !_lhsOlocals ->+                        (case ({-# LINE 483 "DefaultRules.ag" #-}+                               Rule _patternIoutput rhs_ owrt_ origin_+                               {-# LINE 2049 "DefaultRules.hs" #-}) of+                         { !_output ->+                         (case ({-# LINE 483 "DefaultRules.ag" #-}+                                _output+                                {-# LINE 2053 "DefaultRules.hs" #-}) of+                          { !_lhsOoutput ->+                          (case ({-# LINE 499 "DefaultRules.ag" #-}+                                 multiRule _output     _lhsIuniq+                                 {-# LINE 2057 "DefaultRules.hs" #-}) of+                           { !__tup2 ->+                           (case ({-# LINE 499 "DefaultRules.ag" #-}+                                  __tup2+                                  {-# LINE 2061 "DefaultRules.hs" #-}) of+                            { !(!_lhsOoutputs,_) ->+                            (case ({-# LINE 499 "DefaultRules.ag" #-}+                                   __tup2+                                   {-# LINE 2065 "DefaultRules.hs" #-}) of+                             { !(_,!_lhsOuniq) ->+                             ( _lhsOcontainsVars,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOoutputs,_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 +   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,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),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,!_lhsOuniq) =+             (sem _lhsIcon _lhsInt _lhsIuniq )+     in  (Syn_Rules _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _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 476 "DefaultRules.ag" #-}+                         _lhsIuniq+                         {-# LINE 2117 "DefaultRules.hs" #-}) of+                   { !_hdOuniq ->+                   (case ({-# LINE 34 "DefaultRules.ag" #-}+                          _lhsInt+                          {-# LINE 2121 "DefaultRules.hs" #-}) of+                    { !_hdOnt ->+                    (case ({-# LINE 35 "DefaultRules.ag" #-}+                           _lhsIcon+                           {-# LINE 2125 "DefaultRules.hs" #-}) of+                     { !_hdOcon ->+                     (case ((hd_ _hdOcon _hdOnt _hdOuniq )) of+                      { ( !_hdIcontainsVars,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput,!_hdIoutputs,!_hdIuniq) ->+                      (case ({-# LINE 476 "DefaultRules.ag" #-}+                             _hdIuniq+                             {-# LINE 2131 "DefaultRules.hs" #-}) of+                       { !_tlOuniq ->+                       (case ({-# LINE 34 "DefaultRules.ag" #-}+                              _lhsInt+                              {-# LINE 2135 "DefaultRules.hs" #-}) of+                        { !_tlOnt ->+                        (case ({-# LINE 35 "DefaultRules.ag" #-}+                               _lhsIcon+                               {-# LINE 2139 "DefaultRules.hs" #-}) of+                         { !_tlOcon ->+                         (case ((tl_ _tlOcon _tlOnt _tlOuniq )) of+                          { ( !_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput,!_tlIuniq) ->+                          (case ({-# LINE 447 "DefaultRules.ag" #-}+                                 _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs+                                 {-# LINE 2145 "DefaultRules.hs" #-}) of+                           { !_lhsOdefinedAttrs ->+                           (case ({-# LINE 115 "DefaultRules.ag" #-}+                                  _hdIerrors Seq.>< _tlIerrors+                                  {-# LINE 2149 "DefaultRules.hs" #-}) of+                            { !_lhsOerrors ->+                            (case ({-# LINE 446 "DefaultRules.ag" #-}+                                   _hdIlocals `Set.union` _tlIlocals+                                   {-# LINE 2153 "DefaultRules.hs" #-}) of+                             { !_lhsOlocals ->+                             (case ({-# LINE 495 "DefaultRules.ag" #-}+                                    if _hdIcontainsVars then _hdIoutputs ++ _tlIoutput else _tlIoutput+                                    {-# LINE 2157 "DefaultRules.hs" #-}) of+                              { !_lhsOoutput ->+                              (case ({-# LINE 476 "DefaultRules.ag" #-}+                                     _tlIuniq+                                     {-# LINE 2161 "DefaultRules.hs" #-}) of+                               { !_lhsOuniq ->+                               ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Rules_Nil :: T_Rules +sem_Rules_Nil  =+    (T_Rules (\ (!_lhsIcon)+                (!_lhsInt)+                (!_lhsIuniq) ->+                  (case ({-# LINE 447 "DefaultRules.ag" #-}+                         Set.empty+                         {-# LINE 2171 "DefaultRules.hs" #-}) of+                   { !_lhsOdefinedAttrs ->+                   (case ({-# LINE 115 "DefaultRules.ag" #-}+                          Seq.empty+                          {-# LINE 2175 "DefaultRules.hs" #-}) of+                    { !_lhsOerrors ->+                    (case ({-# LINE 446 "DefaultRules.ag" #-}+                           Set.empty+                           {-# LINE 2179 "DefaultRules.hs" #-}) of+                     { !_lhsOlocals ->+                     (case ({-# LINE 483 "DefaultRules.ag" #-}+                            []+                            {-# LINE 2183 "DefaultRules.hs" #-}) of+                      { !_output ->+                      (case ({-# LINE 483 "DefaultRules.ag" #-}+                             _output+                             {-# LINE 2187 "DefaultRules.hs" #-}) of+                       { !_lhsOoutput ->+                       (case ({-# LINE 476 "DefaultRules.ag" #-}+                              _lhsIuniq+                              {-# LINE 2191 "DefaultRules.hs" #-}) of+                        { !_lhsOuniq ->+                        ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_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 483 "DefaultRules.ag" #-}+                      TypeSig name_ tp_+                      {-# LINE 2228 "DefaultRules.hs" #-}) of+                { !_output ->+                (case ({-# LINE 483 "DefaultRules.ag" #-}+                       _output+                       {-# LINE 2232 "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 483 "DefaultRules.ag" #-}+                         (:) _hdIoutput _tlIoutput+                         {-# LINE 2276 "DefaultRules.hs" #-}) of+                   { !_output ->+                   (case ({-# LINE 483 "DefaultRules.ag" #-}+                          _output+                          {-# LINE 2280 "DefaultRules.hs" #-}) of+                    { !_lhsOoutput ->+                    ( _lhsOoutput) }) }) }) }) )+sem_TypeSigs_Nil :: T_TypeSigs +sem_TypeSigs_Nil  =+    (T_TypeSigs (case ({-# LINE 483 "DefaultRules.ag" #-}+                       []+                       {-# LINE 2287 "DefaultRules.hs" #-}) of+                 { !_output ->+                 (case ({-# LINE 483 "DefaultRules.ag" #-}+                        _output+                        {-# LINE 2291 "DefaultRules.hs" #-}) of                   { !_lhsOoutput ->                   ( _lhsOoutput) }) }) )
src-derived/Desugar.hs view
@@ -2,1964 +2,2555 @@  -- UUAGC 0.9.14 (Desugar.ag) module Desugar where--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----- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns    (Pattern(..),Patterns)-import Expression  (Expression(..))-import CommonTypes----- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)---import UU.Scanner.Position(Pos)-import HsToken---import CommonTypes-import UU.Scanner.Position(Pos)--addl :: Int -> Pos -> Pos-addl n (Pos l c f) = Pos (l+n) c f---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---mergeAttributes :: AttrMap -> AttrMap -> AttrMap-mergeAttributes = Map.unionWith $ Map.unionWith $ Set.union---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--- 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 higherOrder    : {Bool}-         visit 0:-            local output      : _--}--- cata-sem_Child :: Child  ->-             T_Child -sem_Child !(Child _name _tp _inh _syn _higherOrder )  =-    (sem_Child_Child _name _tp _inh _syn _higherOrder )--- 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 ->-                   Bool ->-                   T_Child -sem_Child_Child !name_ !tp_ !inh_ !syn_ !higherOrder_  =-    (T_Child (case ([(i, name_) | i <- Map.keys inh_ ]) of-              { !_lhsOchildInhs ->-              (case ([(s, name_) | s <- Map.keys syn_ ]) of-               { !_lhsOchildSyns ->-               (case (Child name_ tp_ inh_ syn_ higherOrder_) of-                { !_output ->-                (case (_output) 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 (_hdIchildInhs ++ _tlIchildInhs) of-                   { !_lhsOchildInhs ->-                   (case (_hdIchildSyns ++ _tlIchildSyns) of-                    { !_lhsOchildSyns ->-                    (case ((:) _hdIoutput _tlIoutput) of-                     { !_output ->-                     (case (_output) of-                      { !_lhsOoutput ->-                      ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) }) }) )-sem_Children_Nil :: T_Children -sem_Children_Nil  =-    (T_Children (case ([]) of-                 { !_lhsOchildInhs ->-                 (case ([]) of-                  { !_lhsOchildSyns ->-                  (case ([]) of-                   { !_output ->-                   (case (_output) 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 (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)) of-                        { !__tup1 ->-                        (case (__tup1) of-                         { !(_,!_lhsOerrors) ->-                         (case (__tup1) of-                          { !(!_tks',_) ->-                          (case (Expression pos_ _tks') 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]))}--}--- cata-sem_Grammar :: Grammar  ->-               T_Grammar -sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )  =-    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )--- 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]))) ->-                       T_Grammar -sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !uniqueMap_ !augmentsMap_  =-    (T_Grammar (\ (!_lhsIforcedIrrefutables)-                  (!_lhsIoptions) ->-                    (case (_lhsIoptions) of-                     { !_nontsOoptions ->-                     (case (_lhsIforcedIrrefutables) of-                      { !_nontsOforcedIrrefutables ->-                      (case (augmentsMap_) of-                       { !_nontsOaugmentsIn ->-                       (case ((nonts_ _nontsOaugmentsIn _nontsOforcedIrrefutables _nontsOoptions )) of-                        { ( !_nontsIallAttributes,!_nontsIaugmentsOut,!_nontsIerrors,!_nontsIoutput) ->-                        (case (_nontsIallAttributes) of-                         { !_lhsOallAttributes ->-                         (case (_nontsIerrors) of-                          { !_lhsOerrors ->-                          (case (Grammar typeSyns_-                                         useMap_-                                         derivings_-                                         wrappers_-                                         _nontsIoutput-                                         pragmas_-                                         manualAttrOrderMap_-                                         paramMap_-                                         contextMap_-                                         uniqueMap_-                                         _nontsIaugmentsOut) 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 (findField field_ attr_ _lhsIchildSyns) of-                     { !_mField ->-                     (case (maybe field_ id _mField) of-                      { !_field' ->-                      (case (if _lhsIuseFieldIdent || length (getName field_) < length (getName _field'    )-                             then _lhsIaddLines + 1-                             else _lhsIaddLines) of-                       { !_lhsOaddLines ->-                       (case (maybe (Seq.singleton (UndefAttr _lhsInt _lhsIcon field_ (Ident "<ANY>" (getPos field_)) False)) (const Seq.empty) _mField) of-                        { !_lhsOerrors ->-                        (case (AGField _field'     attr_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)) of-                         { !_tks ->-                         (case (_tks) 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 (if _lhsIuseFieldIdent-                           then _lhsIaddLines + 1-                           else _lhsIaddLines) of-                     { !_lhsOaddLines ->-                     (case (Seq.empty) of-                      { !_lhsOerrors ->-                      (case (AGLocal var_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)) of-                       { !_tks ->-                       (case (_tks) 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 (_lhsIaddLines) of-                     { !_lhsOaddLines ->-                     (case (Seq.empty) of-                      { !_lhsOerrors ->-                      (case (CharToken value_ (addl _lhsIaddLines pos_)) of-                       { !_tks ->-                       (case (_tks) 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 (_lhsIaddLines) of-                     { !_lhsOaddLines ->-                     (case (Seq.empty) of-                      { !_lhsOerrors ->-                      (case (Err mesg_ (addl _lhsIaddLines pos_)) of-                       { !_tks ->-                       (case (_tks) 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 (_lhsIaddLines) of-                     { !_lhsOaddLines ->-                     (case (Seq.empty) of-                      { !_lhsOerrors ->-                      (case (HsToken value_ (addl _lhsIaddLines pos_)) of-                       { !_tks ->-                       (case (_tks) 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 (_lhsIaddLines) of-                     { !_lhsOaddLines ->-                     (case (Seq.empty) of-                      { !_lhsOerrors ->-                      (case (StrToken value_ (addl _lhsIaddLines pos_)) of-                       { !_tks ->-                       (case (_tks) 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 (_lhsIuseFieldIdent) of-                      { !_tlOuseFieldIdent ->-                      (case (_lhsIchildSyns) of-                       { !_tlOchildSyns ->-                       (case (_lhsIuseFieldIdent) of-                        { !_hdOuseFieldIdent ->-                        (case (_lhsIchildSyns) of-                         { !_hdOchildSyns ->-                         (case (_lhsIaddLines) of-                          { !_hdOaddLines ->-                          (case (_lhsIruleDescr) of-                           { !_hdOruleDescr ->-                           (case (_lhsInt) of-                            { !_hdOnt ->-                            (case (_lhsIcon) of-                             { !_hdOcon ->-                             (case (_lhsIchildInhs) of-                              { !_hdOchildInhs ->-                              (case ((hd_ _hdOaddLines _hdOchildInhs _hdOchildSyns _hdOcon _hdOnt _hdOruleDescr _hdOuseFieldIdent )) of-                               { ( !_hdIaddLines,!_hdIerrors,!_hdItks) ->-                               (case (_hdIaddLines) of-                                { !_tlOaddLines ->-                                (case (_lhsIruleDescr) of-                                 { !_tlOruleDescr ->-                                 (case (_lhsInt) of-                                  { !_tlOnt ->-                                  (case (_lhsIcon) of-                                   { !_tlOcon ->-                                   (case (_lhsIchildInhs) of-                                    { !_tlOchildInhs ->-                                    (case ((tl_ _tlOaddLines _tlOchildInhs _tlOchildSyns _tlOcon _tlOnt _tlOruleDescr _tlOuseFieldIdent )) of-                                     { ( !_tlIaddLines,!_tlIerrors,!_tlItks) ->-                                     (case (_tlIaddLines) of-                                      { !_lhsOaddLines ->-                                      (case (_hdIerrors Seq.>< _tlIerrors) of-                                       { !_lhsOerrors ->-                                       (case ((:) _hdItks _tlItks) of-                                        { !_tks ->-                                        (case (_tks) of-                                         { !_lhsOtks ->-                                         ( _lhsOaddLines,_lhsOerrors,_lhsOtks) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_HsTokens_Nil :: T_HsTokens -sem_HsTokens_Nil  =-    (T_HsTokens (\ (!_lhsIaddLines)-                   (!_lhsIchildInhs)-                   (!_lhsIchildSyns)-                   (!_lhsIcon)-                   (!_lhsInt)-                   (!_lhsIruleDescr)-                   (!_lhsIuseFieldIdent) ->-                     (case (_lhsIaddLines) of-                      { !_lhsOaddLines ->-                      (case (Seq.empty) of-                       { !_lhsOerrors ->-                       (case ([]) of-                        { !_tks ->-                        (case (_tks) 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 (_lhsInt) of-                          { !_tokensOnt ->-                          (case (_lhsIcon) of-                           { !_tokensOcon ->-                           (case (_lhsIchildSyns) of-                            { !_tokensOchildSyns ->-                            (case (_lhsIuseFieldIdent) of-                             { !_tokensOuseFieldIdent ->-                             (case (_lhsIruleDescr) of-                              { !_tokensOruleDescr ->-                              (case (_lhsIchildInhs) of-                               { !_tokensOchildInhs ->-                               (case (0) of-                                { !_tokensOaddLines ->-                                (case ((tokens_ _tokensOaddLines _tokensOchildInhs _tokensOchildSyns _tokensOcon _tokensOnt _tokensOruleDescr _tokensOuseFieldIdent )) of-                                 { ( !_tokensIaddLines,!_tokensIerrors,!_tokensItks) ->-                                 (case (_tokensIerrors) of-                                  { !_lhsOerrors ->-                                  (case (_tokensItks) 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 (nt_) of-                         { !_prodsOnt ->-                         (case (_lhsIoptions) of-                          { !_prodsOoptions ->-                          (case (_lhsIforcedIrrefutables) of-                           { !_prodsOforcedIrrefutables ->-                           (case (Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn) of-                            { !_augmentsIn ->-                            (case (_augmentsIn) of-                             { !_prodsOaugmentsIn ->-                             (case ((prods_ _prodsOaugmentsIn _prodsOforcedIrrefutables _prodsOnt _prodsOoptions )) of-                              { ( !_prodsIallAttributes,!_prodsIaugmentsOut,!_prodsIerrors,!_prodsIoutput) ->-                              (case (_prodsIallAttributes) of-                               { !_lhsOallAttributes ->-                               (case (Map.singleton nt_ _prodsIaugmentsOut) of-                                { !_augmentsOut ->-                                (case (_augmentsOut) of-                                 { !_lhsOaugmentsOut ->-                                 (case (_prodsIerrors) of-                                  { !_lhsOerrors ->-                                  (case (Nonterminal nt_ params_ inh_ syn_ _prodsIoutput) of-                                   { !_output ->-                                   (case (_output) 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 (_lhsIoptions) of-                          { !_tlOoptions ->-                          (case (_lhsIforcedIrrefutables) of-                           { !_tlOforcedIrrefutables ->-                           (case (_lhsIaugmentsIn) of-                            { !_tlOaugmentsIn ->-                            (case ((tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOoptions )) of-                             { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->-                             (case (_lhsIoptions) of-                              { !_hdOoptions ->-                              (case (_lhsIforcedIrrefutables) of-                               { !_hdOforcedIrrefutables ->-                               (case (_lhsIaugmentsIn) of-                                { !_hdOaugmentsIn ->-                                (case ((hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOoptions )) of-                                 { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->-                                 (case (_hdIallAttributes `mergeAttributes` _tlIallAttributes) of-                                  { !_lhsOallAttributes ->-                                  (case (_hdIaugmentsOut `Map.union` _tlIaugmentsOut) of-                                   { !_lhsOaugmentsOut ->-                                   (case (_hdIerrors Seq.>< _tlIerrors) of-                                    { !_lhsOerrors ->-                                    (case ((:) _hdIoutput _tlIoutput) of-                                     { !_output ->-                                     (case (_output) of-                                      { !_lhsOoutput ->-                                      ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil  =-    (T_Nonterminals (\ (!_lhsIaugmentsIn)-                       (!_lhsIforcedIrrefutables)-                       (!_lhsIoptions) ->-                         (case (Map.empty) of-                          { !_lhsOallAttributes ->-                          (case (Map.empty) of-                           { !_lhsOaugmentsOut ->-                           (case (Seq.empty) of-                            { !_lhsOerrors ->-                            (case ([]) of-                             { !_output ->-                             (case (_output) 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 (Set.singleton (field_, attr_)) of-                { !_def ->-                (case ((parts_ )) of-                 { ( !_partsIdefsCollect,!T_Patterns_1 parts_1) ->-                 (case ((pat_ )) of-                  { ( !_patIdefsCollect,!T_Pattern_1 pat_1) ->-                  (case (_def     `Set.union` _patIdefsCollect `Set.union` _partsIdefsCollect) of-                   { !_lhsOdefsCollect ->-                   (case ((sem_Pattern_Alias_1 (T_Pattern_1 pat_1 ) attr_ field_ (T_Patterns_1 parts_1 ) )) of-                    { ( !sem_Pattern_1) ->-                    ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) }) }) )-sem_Pattern_Alias_1 :: T_Pattern_1  ->-                       Identifier ->-                       Identifier ->-                       T_Patterns_1  ->-                       T_Pattern_1 -sem_Pattern_Alias_1 !(T_Pattern_1 pat_1 ) !attr_ !field_ !(T_Patterns_1 parts_1 )  =-    (T_Pattern_1 (\ (!_lhsIchildInhs)-                    (!_lhsIchildSyns)-                    (!_lhsIcon)-                    (!_lhsIdefs)-                    (!_lhsIforcedIrrefutables)-                    (!_lhsInt) ->-                      (case (_lhsInt) of-                       { !_patOnt ->-                       (case (_lhsIcon) of-                        { !_patOcon ->-                        (case (_lhsIforcedIrrefutables) of-                         { !_patOforcedIrrefutables ->-                         (case (_lhsIdefs) of-                          { !_patOdefs ->-                          (case (_lhsIchildSyns) of-                           { !_patOchildSyns ->-                           (case (_lhsIchildInhs) of-                            { !_patOchildInhs ->-                            (case ((pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt )) of-                             { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->-                             (case ((Map.singleton _lhsInt $ Map.singleton _lhsIcon $ Set.singleton (field_, attr_)) `mergeAttributes` _patIallAttributes) of-                              { !_lhsOallAttributes ->-                              (case (_lhsInt) of-                               { !_partsOnt ->-                               (case (_lhsIforcedIrrefutables) of-                                { !_partsOforcedIrrefutables ->-                                (case (_lhsIdefs) of-                                 { !_partsOdefs ->-                                 (case (_lhsIcon) of-                                  { !_partsOcon ->-                                  (case (_lhsIchildSyns) of-                                   { !_partsOchildSyns ->-                                   (case (_lhsIchildInhs) of-                                    { !_partsOchildInhs ->-                                    (case ((parts_1 _partsOchildInhs _partsOchildSyns _partsOcon _partsOdefs _partsOforcedIrrefutables _partsOnt )) of-                                     { ( !_partsIallAttributes,!_partsIcopy,!_partsIerrors,!_partsIoutput) ->-                                     (case (Alias field_ attr_ _patIcopy _partsIcopy) of-                                      { !_copy ->-                                      (case (_copy) of-                                       { !_lhsOcopy ->-                                       (case (maybeError field_ (UndefAttr _lhsInt _lhsIcon (Ident "<ANY>" (getPos field_)) attr_ True) $-                                                findField field_ attr_ _lhsIchildInhs) of-                                        { !__tup2 ->-                                        (case (__tup2) of-                                         { !(!_field',_) ->-                                         (case (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) of-                                          { !_err2 ->-                                          (case (__tup2) of-                                           { !(_,!_err1) ->-                                           (case (_err1     Seq.>< _err2     Seq.>< _patIerrors Seq.>< _partsIerrors) of-                                            { !_lhsOerrors ->-                                            (case (Alias _field'     attr_ _patIoutput _partsIoutput) of-                                             { !_output ->-                                             (case (if Set.member (field_, attr_) $ Map.findWithDefault Set.empty _lhsIcon $ Map.findWithDefault Map.empty _lhsInt $ _lhsIforcedIrrefutables-                                                    then Irrefutable _output-                                                    else _output) of-                                              { !_lhsOoutput ->-                                              ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-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 (_patsIdefsCollect) of-                 { !_lhsOdefsCollect ->-                 (case ((sem_Pattern_Constr_1 (T_Patterns_1 pats_1 ) name_ )) of-                  { ( !sem_Pattern_1) ->-                  ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )-sem_Pattern_Constr_1 :: T_Patterns_1  ->-                        ConstructorIdent ->-                        T_Pattern_1 -sem_Pattern_Constr_1 !(T_Patterns_1 pats_1 ) !name_  =-    (T_Pattern_1 (\ (!_lhsIchildInhs)-                    (!_lhsIchildSyns)-                    (!_lhsIcon)-                    (!_lhsIdefs)-                    (!_lhsIforcedIrrefutables)-                    (!_lhsInt) ->-                      (case (_lhsInt) of-                       { !_patsOnt ->-                       (case (_lhsIcon) of-                        { !_patsOcon ->-                        (case (_lhsIforcedIrrefutables) of-                         { !_patsOforcedIrrefutables ->-                         (case (_lhsIdefs) of-                          { !_patsOdefs ->-                          (case (_lhsIchildSyns) of-                           { !_patsOchildSyns ->-                           (case (_lhsIchildInhs) of-                            { !_patsOchildInhs ->-                            (case ((pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt )) of-                             { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->-                             (case (_patsIallAttributes) of-                              { !_lhsOallAttributes ->-                              (case (Constr name_ _patsIcopy) of-                               { !_copy ->-                               (case (_copy) of-                                { !_lhsOcopy ->-                                (case (_patsIerrors) of-                                 { !_lhsOerrors ->-                                 (case (Constr name_ _patsIoutput) of-                                  { !_output ->-                                  (case (_output) of-                                   { !_lhsOoutput ->-                                   ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )-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 (_patIdefsCollect) of-                 { !_lhsOdefsCollect ->-                 (case ((sem_Pattern_Irrefutable_1 (T_Pattern_1 pat_1 ) )) of-                  { ( !sem_Pattern_1) ->-                  ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )-sem_Pattern_Irrefutable_1 :: T_Pattern_1  ->-                             T_Pattern_1 -sem_Pattern_Irrefutable_1 !(T_Pattern_1 pat_1 )  =-    (T_Pattern_1 (\ (!_lhsIchildInhs)-                    (!_lhsIchildSyns)-                    (!_lhsIcon)-                    (!_lhsIdefs)-                    (!_lhsIforcedIrrefutables)-                    (!_lhsInt) ->-                      (case (Map.empty) of-                       { !_lhsOallAttributes ->-                       (case (_lhsInt) of-                        { !_patOnt ->-                        (case (_lhsIforcedIrrefutables) of-                         { !_patOforcedIrrefutables ->-                         (case (_lhsIdefs) of-                          { !_patOdefs ->-                          (case (_lhsIcon) of-                           { !_patOcon ->-                           (case (_lhsIchildSyns) of-                            { !_patOchildSyns ->-                            (case (_lhsIchildInhs) of-                             { !_patOchildInhs ->-                             (case ((pat_1 _patOchildInhs _patOchildSyns _patOcon _patOdefs _patOforcedIrrefutables _patOnt )) of-                              { ( !_patIallAttributes,!_patIcopy,!_patIerrors,!_patIoutput) ->-                              (case (Irrefutable _patIcopy) of-                               { !_copy ->-                               (case (_copy) of-                                { !_lhsOcopy ->-                                (case (_patIerrors) of-                                 { !_lhsOerrors ->-                                 (case (Irrefutable _patIoutput) of-                                  { !_output ->-                                  (case (_output) of-                                   { !_lhsOoutput ->-                                   ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )-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 (_patsIdefsCollect) of-                 { !_lhsOdefsCollect ->-                 (case ((sem_Pattern_Product_1 (T_Patterns_1 pats_1 ) pos_ )) of-                  { ( !sem_Pattern_1) ->-                  ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )-sem_Pattern_Product_1 :: T_Patterns_1  ->-                         Pos ->-                         T_Pattern_1 -sem_Pattern_Product_1 !(T_Patterns_1 pats_1 ) !pos_  =-    (T_Pattern_1 (\ (!_lhsIchildInhs)-                    (!_lhsIchildSyns)-                    (!_lhsIcon)-                    (!_lhsIdefs)-                    (!_lhsIforcedIrrefutables)-                    (!_lhsInt) ->-                      (case (_lhsInt) of-                       { !_patsOnt ->-                       (case (_lhsIcon) of-                        { !_patsOcon ->-                        (case (_lhsIforcedIrrefutables) of-                         { !_patsOforcedIrrefutables ->-                         (case (_lhsIdefs) of-                          { !_patsOdefs ->-                          (case (_lhsIchildSyns) of-                           { !_patsOchildSyns ->-                           (case (_lhsIchildInhs) of-                            { !_patsOchildInhs ->-                            (case ((pats_1 _patsOchildInhs _patsOchildSyns _patsOcon _patsOdefs _patsOforcedIrrefutables _patsOnt )) of-                             { ( !_patsIallAttributes,!_patsIcopy,!_patsIerrors,!_patsIoutput) ->-                             (case (_patsIallAttributes) of-                              { !_lhsOallAttributes ->-                              (case (Product pos_ _patsIcopy) of-                               { !_copy ->-                               (case (_copy) of-                                { !_lhsOcopy ->-                                (case (_patsIerrors) of-                                 { !_lhsOerrors ->-                                 (case (Product pos_ _patsIoutput) of-                                  { !_output ->-                                  (case (_output) of-                                   { !_lhsOoutput ->-                                   ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Underscore :: Pos ->-                          T_Pattern -sem_Pattern_Underscore !pos_  =-    (T_Pattern (case (Set.empty) of-                { !_lhsOdefsCollect ->-                (case ((sem_Pattern_Underscore_1 pos_ )) of-                 { ( !sem_Pattern_1) ->-                 ( _lhsOdefsCollect,sem_Pattern_1) }) }) )-sem_Pattern_Underscore_1 :: Pos ->-                            T_Pattern_1 -sem_Pattern_Underscore_1 !pos_  =-    (T_Pattern_1 (\ (!_lhsIchildInhs)-                    (!_lhsIchildSyns)-                    (!_lhsIcon)-                    (!_lhsIdefs)-                    (!_lhsIforcedIrrefutables)-                    (!_lhsInt) ->-                      (case (Map.empty) of-                       { !_lhsOallAttributes ->-                       (case (Underscore pos_) of-                        { !_copy ->-                        (case (_copy) of-                         { !_lhsOcopy ->-                         (case (Seq.empty) of-                          { !_lhsOerrors ->-                          (case (Underscore pos_) of-                           { !_output ->-                           (case (_output) of-                            { !_lhsOoutput ->-                            ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )--- 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 (_hdIdefsCollect `Set.union` _tlIdefsCollect) of-                   { !_lhsOdefsCollect ->-                   (case ((sem_Patterns_Cons_1 (T_Patterns_1 tl_1 ) (T_Pattern_1 hd_1 ) )) of-                    { ( !sem_Patterns_1) ->-                    ( _lhsOdefsCollect,sem_Patterns_1) }) }) }) }) )-sem_Patterns_Cons_1 :: T_Patterns_1  ->-                       T_Pattern_1  ->-                       T_Patterns_1 -sem_Patterns_Cons_1 !(T_Patterns_1 tl_1 ) !(T_Pattern_1 hd_1 )  =-    (T_Patterns_1 (\ (!_lhsIchildInhs)-                     (!_lhsIchildSyns)-                     (!_lhsIcon)-                     (!_lhsIdefs)-                     (!_lhsIforcedIrrefutables)-                     (!_lhsInt) ->-                       (case (_lhsInt) of-                        { !_tlOnt ->-                        (case (_lhsIcon) of-                         { !_tlOcon ->-                         (case (_lhsInt) of-                          { !_hdOnt ->-                          (case (_lhsIcon) of-                           { !_hdOcon ->-                           (case (_lhsIforcedIrrefutables) of-                            { !_tlOforcedIrrefutables ->-                            (case (_lhsIdefs) of-                             { !_tlOdefs ->-                             (case (_lhsIchildSyns) of-                              { !_tlOchildSyns ->-                              (case (_lhsIchildInhs) of-                               { !_tlOchildInhs ->-                               (case ((tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt )) of-                                { ( !_tlIallAttributes,!_tlIcopy,!_tlIerrors,!_tlIoutput) ->-                                (case (_lhsIforcedIrrefutables) of-                                 { !_hdOforcedIrrefutables ->-                                 (case (_lhsIdefs) of-                                  { !_hdOdefs ->-                                  (case (_lhsIchildSyns) of-                                   { !_hdOchildSyns ->-                                   (case (_lhsIchildInhs) of-                                    { !_hdOchildInhs ->-                                    (case ((hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt )) of-                                     { ( !_hdIallAttributes,!_hdIcopy,!_hdIerrors,!_hdIoutput) ->-                                     (case (_hdIallAttributes `mergeAttributes` _tlIallAttributes) of-                                      { !_lhsOallAttributes ->-                                      (case ((:) _hdIcopy _tlIcopy) of-                                       { !_copy ->-                                       (case (_copy) of-                                        { !_lhsOcopy ->-                                        (case (_hdIerrors Seq.>< _tlIerrors) of-                                         { !_lhsOerrors ->-                                         (case ((:) _hdIoutput _tlIoutput) of-                                          { !_output ->-                                          (case (_output) of-                                           { !_lhsOoutput ->-                                           ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil  =-    (T_Patterns (case (Set.empty) of-                 { !_lhsOdefsCollect ->-                 (case ((sem_Patterns_Nil_1 )) of-                  { ( !sem_Patterns_1) ->-                  ( _lhsOdefsCollect,sem_Patterns_1) }) }) )-sem_Patterns_Nil_1 :: T_Patterns_1 -sem_Patterns_Nil_1  =-    (T_Patterns_1 (\ (!_lhsIchildInhs)-                     (!_lhsIchildSyns)-                     (!_lhsIcon)-                     (!_lhsIdefs)-                     (!_lhsIforcedIrrefutables)-                     (!_lhsInt) ->-                       (case (Map.empty) of-                        { !_lhsOallAttributes ->-                        (case ([]) of-                         { !_copy ->-                         (case (_copy) of-                          { !_lhsOcopy ->-                          (case (Seq.empty) of-                           { !_lhsOerrors ->-                           (case ([]) of-                            { !_output ->-                            (case (_output) of-                             { !_lhsOoutput ->-                             ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )--- 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 (_lhsInt) of-                        { !_rulesOnt ->-                        (case (con_) of-                         { !_rulesOcon ->-                         (case ((rules_ )) of-                          { ( !_rulesIdefsCollect,!T_Rules_1 rules_1) ->-                          (case (_lhsIoptions) of-                           { !_rulesOoptions ->-                           (case (_lhsIforcedIrrefutables) of-                            { !_rulesOforcedIrrefutables ->-                            (case ((children_ )) of-                             { ( !_childrenIchildInhs,!_childrenIchildSyns,!_childrenIoutput) ->-                             (case (_childrenIchildSyns) of-                              { !_rulesOchildSyns ->-                              (case (_childrenIchildInhs) of-                               { !_rulesOchildInhs ->-                               (case (_rulesIdefsCollect) of-                                { !_rulesOdefs ->-                                (case ((rules_1 _rulesOchildInhs _rulesOchildSyns _rulesOcon _rulesOdefs _rulesOforcedIrrefutables _rulesOnt _rulesOoptions )) of-                                 { ( !_rulesIallAttributes,!_rulesIerrors,!_rulesIoutput) ->-                                 (case (_rulesIallAttributes) of-                                  { !_lhsOallAttributes ->-                                  (case (Map.findWithDefault Map.empty con_ _lhsIaugmentsIn) of-                                   { !_augmentsIn ->-                                   (case (Map.mapAccum (desugarExprs _lhsIoptions _lhsInt con_ _childrenIchildInhs _childrenIchildSyns) Seq.empty _augmentsIn) of-                                    { !__tup3 ->-                                    (case (__tup3) of-                                     { !(_,!_augmentsOut1) ->-                                     (case (Map.singleton con_ _augmentsOut1) of-                                      { !_augmentsOut ->-                                      (case (_augmentsOut) of-                                       { !_lhsOaugmentsOut ->-                                       (case (__tup3) of-                                        { !(!_augmentErrs,_) ->-                                        (case (_rulesIerrors Seq.>< _augmentErrs) of-                                         { !_lhsOerrors ->-                                         (case ((typeSigs_ )) of-                                          { ( !_typeSigsIoutput) ->-                                          (case (Production con_ _childrenIoutput _rulesIoutput _typeSigsIoutput) of-                                           { !_output ->-                                           (case (_output) 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 (_lhsInt) of-                         { !_tlOnt ->-                         (case (_lhsInt) of-                          { !_hdOnt ->-                          (case (_lhsIoptions) of-                           { !_tlOoptions ->-                           (case (_lhsIforcedIrrefutables) of-                            { !_tlOforcedIrrefutables ->-                            (case (_lhsIaugmentsIn) of-                             { !_tlOaugmentsIn ->-                             (case ((tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOnt _tlOoptions )) of-                              { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->-                              (case (_lhsIoptions) of-                               { !_hdOoptions ->-                               (case (_lhsIforcedIrrefutables) of-                                { !_hdOforcedIrrefutables ->-                                (case (_lhsIaugmentsIn) of-                                 { !_hdOaugmentsIn ->-                                 (case ((hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOnt _hdOoptions )) of-                                  { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->-                                  (case (_hdIallAttributes `mergeAttributes` _tlIallAttributes) of-                                   { !_lhsOallAttributes ->-                                   (case (_hdIaugmentsOut `Map.union` _tlIaugmentsOut) of-                                    { !_lhsOaugmentsOut ->-                                    (case (_hdIerrors Seq.>< _tlIerrors) of-                                     { !_lhsOerrors ->-                                     (case ((:) _hdIoutput _tlIoutput) of-                                      { !_output ->-                                      (case (_output) of-                                       { !_lhsOoutput ->-                                       ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil  =-    (T_Productions (\ (!_lhsIaugmentsIn)-                      (!_lhsIforcedIrrefutables)-                      (!_lhsInt)-                      (!_lhsIoptions) ->-                        (case (Map.empty) of-                         { !_lhsOallAttributes ->-                         (case (Map.empty) of-                          { !_lhsOaugmentsOut ->-                          (case (Seq.empty) of-                           { !_lhsOerrors ->-                           (case ([]) of-                            { !_output ->-                            (case (_output) 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 pattern        : Pattern -         child rhs            : Expression -         child owrt           : {Bool}-         child origin         : {String}-         visit 1:-            local ruleDescr   : _-            local output      : _--}--- cata-sem_Rule :: Rule  ->-            T_Rule -sem_Rule !(Rule _pattern _rhs _owrt _origin )  =-    (sem_Rule_Rule (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin )--- 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 :: T_Pattern  ->-                 T_Expression  ->-                 Bool ->-                 String ->-                 T_Rule -sem_Rule_Rule !(T_Pattern pattern_ ) !(T_Expression rhs_ ) !owrt_ !origin_  =-    (T_Rule (case ((pattern_ )) of-             { ( !_patternIdefsCollect,!T_Pattern_1 pattern_1) ->-             (case (_patternIdefsCollect) of-              { !_lhsOdefsCollect ->-              (case ((sem_Rule_Rule_1 (T_Pattern_1 pattern_1 ) _patternIdefsCollect (T_Expression rhs_ ) origin_ owrt_ )) of-               { ( !sem_Rule_1) ->-               ( _lhsOdefsCollect,sem_Rule_1) }) }) }) )-sem_Rule_Rule_1 :: T_Pattern_1  ->-                   (Set (Identifier, Identifier)) ->-                   T_Expression  ->-                   String ->-                   Bool ->-                   T_Rule_1 -sem_Rule_Rule_1 !(T_Pattern_1 pattern_1 ) !_patternIdefsCollect !(T_Expression rhs_ ) !origin_ !owrt_  =-    (T_Rule_1 (\ (!_lhsIchildInhs)-                 (!_lhsIchildSyns)-                 (!_lhsIcon)-                 (!_lhsIdefs)-                 (!_lhsIforcedIrrefutables)-                 (!_lhsInt)-                 (!_lhsIoptions) ->-                   (case (_lhsInt) of-                    { !_patternOnt ->-                    (case (_lhsIcon) of-                     { !_patternOcon ->-                     (case (_lhsIforcedIrrefutables) of-                      { !_patternOforcedIrrefutables ->-                      (case (_lhsIdefs) of-                       { !_patternOdefs ->-                       (case (_lhsIchildSyns) of-                        { !_patternOchildSyns ->-                        (case (_lhsIchildInhs) of-                         { !_patternOchildInhs ->-                         (case ((pattern_1 _patternOchildInhs _patternOchildSyns _patternOcon _patternOdefs _patternOforcedIrrefutables _patternOnt )) of-                          { ( !_patternIallAttributes,!_patternIcopy,!_patternIerrors,!_patternIoutput) ->-                          (case (_patternIallAttributes) of-                           { !_lhsOallAttributes ->-                           (case (show _lhsInt ++ " :: " ++ show _lhsIcon ++ " :: " ++ (concat $ intersperse "," $ map (\(f,a) -> show f ++ "." ++ show a) $ Set.toList _patternIdefsCollect)) of-                            { !_ruleDescr ->-                            (case (_ruleDescr) of-                             { !_rhsOruleDescr ->-                             (case (_lhsIoptions) of-                              { !_rhsOoptions ->-                              (case (_lhsInt) of-                               { !_rhsOnt ->-                               (case (_lhsIcon) of-                                { !_rhsOcon ->-                                (case (_lhsIchildSyns) of-                                 { !_rhsOchildSyns ->-                                 (case (_lhsIchildInhs) of-                                  { !_rhsOchildInhs ->-                                  (case ((rhs_ _rhsOchildInhs _rhsOchildSyns _rhsOcon _rhsOnt _rhsOoptions _rhsOruleDescr )) of-                                   { ( !_rhsIerrors,!_rhsIoutput) ->-                                   (case (_patternIerrors Seq.>< _rhsIerrors) of-                                    { !_lhsOerrors ->-                                    (case (Rule _patternIoutput _rhsIoutput owrt_ origin_) of-                                     { !_output ->-                                     (case (_output) of-                                      { !_lhsOoutput ->-                                      ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- 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 (_hdIdefsCollect `Set.union` _tlIdefsCollect) of-                { !_lhsOdefsCollect ->-                (case ((sem_Rules_Cons_1 (T_Rules_1 tl_1 ) (T_Rule_1 hd_1 ) )) of-                 { ( !sem_Rules_1) ->-                 ( _lhsOdefsCollect,sem_Rules_1) }) }) }) }) )-sem_Rules_Cons_1 :: T_Rules_1  ->-                    T_Rule_1  ->-                    T_Rules_1 -sem_Rules_Cons_1 !(T_Rules_1 tl_1 ) !(T_Rule_1 hd_1 )  =-    (T_Rules_1 (\ (!_lhsIchildInhs)-                  (!_lhsIchildSyns)-                  (!_lhsIcon)-                  (!_lhsIdefs)-                  (!_lhsIforcedIrrefutables)-                  (!_lhsInt)-                  (!_lhsIoptions) ->-                    (case (_lhsInt) of-                     { !_tlOnt ->-                     (case (_lhsIcon) of-                      { !_tlOcon ->-                      (case (_lhsInt) of-                       { !_hdOnt ->-                       (case (_lhsIcon) of-                        { !_hdOcon ->-                        (case (_lhsIoptions) of-                         { !_tlOoptions ->-                         (case (_lhsIforcedIrrefutables) of-                          { !_tlOforcedIrrefutables ->-                          (case (_lhsIdefs) of-                           { !_tlOdefs ->-                           (case (_lhsIchildSyns) of-                            { !_tlOchildSyns ->-                            (case (_lhsIchildInhs) of-                             { !_tlOchildInhs ->-                             (case ((tl_1 _tlOchildInhs _tlOchildSyns _tlOcon _tlOdefs _tlOforcedIrrefutables _tlOnt _tlOoptions )) of-                              { ( !_tlIallAttributes,!_tlIerrors,!_tlIoutput) ->-                              (case (_lhsIoptions) of-                               { !_hdOoptions ->-                               (case (_lhsIforcedIrrefutables) of-                                { !_hdOforcedIrrefutables ->-                                (case (_lhsIdefs) of-                                 { !_hdOdefs ->-                                 (case (_lhsIchildSyns) of-                                  { !_hdOchildSyns ->-                                  (case (_lhsIchildInhs) of-                                   { !_hdOchildInhs ->-                                   (case ((hd_1 _hdOchildInhs _hdOchildSyns _hdOcon _hdOdefs _hdOforcedIrrefutables _hdOnt _hdOoptions )) of-                                    { ( !_hdIallAttributes,!_hdIerrors,!_hdIoutput) ->-                                    (case (_hdIallAttributes `mergeAttributes` _tlIallAttributes) of-                                     { !_lhsOallAttributes ->-                                     (case (_hdIerrors Seq.>< _tlIerrors) of-                                      { !_lhsOerrors ->-                                      (case ((:) _hdIoutput _tlIoutput) of-                                       { !_output ->-                                       (case (_output) of-                                        { !_lhsOoutput ->-                                        ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil  =-    (T_Rules (case (Set.empty) of-              { !_lhsOdefsCollect ->-              (case ((sem_Rules_Nil_1 )) of-               { ( !sem_Rules_1) ->-               ( _lhsOdefsCollect,sem_Rules_1) }) }) )-sem_Rules_Nil_1 :: T_Rules_1 -sem_Rules_Nil_1  =-    (T_Rules_1 (\ (!_lhsIchildInhs)-                  (!_lhsIchildSyns)-                  (!_lhsIcon)-                  (!_lhsIdefs)-                  (!_lhsIforcedIrrefutables)-                  (!_lhsInt)-                  (!_lhsIoptions) ->-                    (case (Map.empty) of-                     { !_lhsOallAttributes ->-                     (case (Seq.empty) of-                      { !_lhsOerrors ->-                      (case ([]) of-                       { !_output ->-                       (case (_output) of-                        { !_lhsOoutput ->-                        ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) })) )--- 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 (TypeSig name_ tp_) of-                { !_output ->-                (case (_output) 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 ((:) _hdIoutput _tlIoutput) of-                   { !_output ->-                   (case (_output) of-                    { !_lhsOoutput ->-                    ( _lhsOoutput) }) }) }) }) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil  =-    (T_TypeSigs (case ([]) of-                 { !_output ->-                 (case (_output) of+{-# 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 higherOrder    : {Bool}+         visit 0:+            local output      : _+-}+-- cata+sem_Child :: Child  ->+             T_Child +sem_Child !(Child _name _tp _inh _syn _higherOrder )  =+    (sem_Child_Child _name _tp _inh _syn _higherOrder )+-- 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 ->+                   Bool ->+                   T_Child +sem_Child_Child !name_ !tp_ !inh_ !syn_ !higherOrder_  =+    (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_ higherOrder_+                      {-# 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]))}+-}+-- cata+sem_Grammar :: Grammar  ->+               T_Grammar +sem_Grammar !(Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap )  =+    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap )+-- 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]))) ->+                       T_Grammar +sem_Grammar_Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ !(T_Nonterminals nonts_ ) !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_  =+    (T_Grammar (\ (!_lhsIforcedIrrefutables)+                  (!_lhsIoptions) ->+                    (case ({-# LINE 35 "Desugar.ag" #-}+                           _lhsIoptions+                           {-# LINE 380 "Desugar.hs" #-}) of+                     { !_nontsOoptions ->+                     (case ({-# LINE 214 "Desugar.ag" #-}+                            _lhsIforcedIrrefutables+                            {-# LINE 384 "Desugar.hs" #-}) of+                      { !_nontsOforcedIrrefutables ->+                      (case ({-# LINE 234 "Desugar.ag" #-}+                             augmentsMap_+                             {-# LINE 388 "Desugar.hs" #-}) of+                       { !_nontsOaugmentsIn ->+                       (case ((nonts_ _nontsOaugmentsIn _nontsOforcedIrrefutables _nontsOoptions )) of+                        { ( !_nontsIallAttributes,!_nontsIaugmentsOut,!_nontsIerrors,!_nontsIoutput) ->+                        (case ({-# LINE 195 "Desugar.ag" #-}+                               _nontsIallAttributes+                               {-# LINE 394 "Desugar.hs" #-}) of+                         { !_lhsOallAttributes ->+                         (case ({-# LINE 37 "Desugar.ag" #-}+                                _nontsIerrors+                                {-# LINE 398 "Desugar.hs" #-}) of+                          { !_lhsOerrors ->+                          (case ({-# LINE 290 "Desugar.ag" #-}+                                 Grammar typeSyns_+                                         useMap_+                                         derivings_+                                         wrappers_+                                         _nontsIoutput+                                         pragmas_+                                         manualAttrOrderMap_+                                         paramMap_+                                         contextMap_+                                         uniqueMap_+                                         _nontsIaugmentsOut+                                         aroundsMap_+                                 {-# LINE 413 "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 516 "Desugar.hs" #-}) of+                     { !_mField ->+                     (case ({-# LINE 80 "Desugar.ag" #-}+                            maybe field_ id _mField+                            {-# LINE 520 "Desugar.hs" #-}) of+                      { !_field' ->+                      (case ({-# LINE 83 "Desugar.ag" #-}+                             if _lhsIuseFieldIdent || length (getName field_) < length (getName _field'    )+                             then _lhsIaddLines + 1+                             else _lhsIaddLines+                             {-# LINE 526 "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 530 "Desugar.hs" #-}) of+                        { !_lhsOerrors ->+                        (case ({-# LINE 87 "Desugar.ag" #-}+                               AGField _field'     attr_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)+                               {-# LINE 534 "Desugar.hs" #-}) of+                         { !_tks ->+                         (case ({-# LINE 69 "Desugar.ag" #-}+                                _tks+                                {-# LINE 538 "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 557 "Desugar.hs" #-}) of+                     { !_lhsOaddLines ->+                     (case ({-# LINE 37 "Desugar.ag" #-}+                            Seq.empty+                            {-# LINE 561 "Desugar.hs" #-}) of+                      { !_lhsOerrors ->+                      (case ({-# LINE 76 "Desugar.ag" #-}+                             AGLocal var_ (addl _lhsIaddLines pos_) (if _lhsIuseFieldIdent then Just _lhsIruleDescr else Nothing)+                             {-# LINE 565 "Desugar.hs" #-}) of+                       { !_tks ->+                       (case ({-# LINE 69 "Desugar.ag" #-}+                              _tks+                              {-# LINE 569 "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 585 "Desugar.hs" #-}) of+                     { !_lhsOaddLines ->+                     (case ({-# LINE 37 "Desugar.ag" #-}+                            Seq.empty+                            {-# LINE 589 "Desugar.hs" #-}) of+                      { !_lhsOerrors ->+                      (case ({-# LINE 91 "Desugar.ag" #-}+                             CharToken value_ (addl _lhsIaddLines pos_)+                             {-# LINE 593 "Desugar.hs" #-}) of+                       { !_tks ->+                       (case ({-# LINE 69 "Desugar.ag" #-}+                              _tks+                              {-# LINE 597 "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 613 "Desugar.hs" #-}) of+                     { !_lhsOaddLines ->+                     (case ({-# LINE 37 "Desugar.ag" #-}+                            Seq.empty+                            {-# LINE 617 "Desugar.hs" #-}) of+                      { !_lhsOerrors ->+                      (case ({-# LINE 95 "Desugar.ag" #-}+                             Err mesg_ (addl _lhsIaddLines pos_)+                             {-# LINE 621 "Desugar.hs" #-}) of+                       { !_tks ->+                       (case ({-# LINE 69 "Desugar.ag" #-}+                              _tks+                              {-# LINE 625 "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 641 "Desugar.hs" #-}) of+                     { !_lhsOaddLines ->+                     (case ({-# LINE 37 "Desugar.ag" #-}+                            Seq.empty+                            {-# LINE 645 "Desugar.hs" #-}) of+                      { !_lhsOerrors ->+                      (case ({-# LINE 89 "Desugar.ag" #-}+                             HsToken value_ (addl _lhsIaddLines pos_)+                             {-# LINE 649 "Desugar.hs" #-}) of+                       { !_tks ->+                       (case ({-# LINE 69 "Desugar.ag" #-}+                              _tks+                              {-# LINE 653 "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 669 "Desugar.hs" #-}) of+                     { !_lhsOaddLines ->+                     (case ({-# LINE 37 "Desugar.ag" #-}+                            Seq.empty+                            {-# LINE 673 "Desugar.hs" #-}) of+                      { !_lhsOerrors ->+                      (case ({-# LINE 93 "Desugar.ag" #-}+                             StrToken value_ (addl _lhsIaddLines pos_)+                             {-# LINE 677 "Desugar.hs" #-}) of+                       { !_tks ->+                       (case ({-# LINE 69 "Desugar.ag" #-}+                              _tks+                              {-# LINE 681 "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 745 "Desugar.hs" #-}) of+                      { !_tlOuseFieldIdent ->+                      (case ({-# LINE 125 "Desugar.ag" #-}+                             _lhsIchildSyns+                             {-# LINE 749 "Desugar.hs" #-}) of+                       { !_tlOchildSyns ->+                       (case ({-# LINE 61 "Desugar.ag" #-}+                              _lhsIuseFieldIdent+                              {-# LINE 753 "Desugar.hs" #-}) of+                        { !_hdOuseFieldIdent ->+                        (case ({-# LINE 125 "Desugar.ag" #-}+                               _lhsIchildSyns+                               {-# LINE 757 "Desugar.hs" #-}) of+                         { !_hdOchildSyns ->+                         (case ({-# LINE 63 "Desugar.ag" #-}+                                _lhsIaddLines+                                {-# LINE 761 "Desugar.hs" #-}) of+                          { !_hdOaddLines ->+                          (case ({-# LINE 167 "Desugar.ag" #-}+                                 _lhsIruleDescr+                                 {-# LINE 765 "Desugar.hs" #-}) of+                           { !_hdOruleDescr ->+                           (case ({-# LINE 151 "Desugar.ag" #-}+                                  _lhsInt+                                  {-# LINE 769 "Desugar.hs" #-}) of+                            { !_hdOnt ->+                            (case ({-# LINE 152 "Desugar.ag" #-}+                                   _lhsIcon+                                   {-# LINE 773 "Desugar.hs" #-}) of+                             { !_hdOcon ->+                             (case ({-# LINE 125 "Desugar.ag" #-}+                                    _lhsIchildInhs+                                    {-# LINE 777 "Desugar.hs" #-}) of+                              { !_hdOchildInhs ->+                              (case ((hd_ _hdOaddLines _hdOchildInhs _hdOchildSyns _hdOcon _hdOnt _hdOruleDescr _hdOuseFieldIdent )) of+                               { ( !_hdIaddLines,!_hdIerrors,!_hdItks) ->+                               (case ({-# LINE 63 "Desugar.ag" #-}+                                      _hdIaddLines+                                      {-# LINE 783 "Desugar.hs" #-}) of+                                { !_tlOaddLines ->+                                (case ({-# LINE 167 "Desugar.ag" #-}+                                       _lhsIruleDescr+                                       {-# LINE 787 "Desugar.hs" #-}) of+                                 { !_tlOruleDescr ->+                                 (case ({-# LINE 151 "Desugar.ag" #-}+                                        _lhsInt+                                        {-# LINE 791 "Desugar.hs" #-}) of+                                  { !_tlOnt ->+                                  (case ({-# LINE 152 "Desugar.ag" #-}+                                         _lhsIcon+                                         {-# LINE 795 "Desugar.hs" #-}) of+                                   { !_tlOcon ->+                                   (case ({-# LINE 125 "Desugar.ag" #-}+                                          _lhsIchildInhs+                                          {-# LINE 799 "Desugar.hs" #-}) of+                                    { !_tlOchildInhs ->+                                    (case ((tl_ _tlOaddLines _tlOchildInhs _tlOchildSyns _tlOcon _tlOnt _tlOruleDescr _tlOuseFieldIdent )) of+                                     { ( !_tlIaddLines,!_tlIerrors,!_tlItks) ->+                                     (case ({-# LINE 63 "Desugar.ag" #-}+                                            _tlIaddLines+                                            {-# LINE 805 "Desugar.hs" #-}) of+                                      { !_lhsOaddLines ->+                                      (case ({-# LINE 37 "Desugar.ag" #-}+                                             _hdIerrors Seq.>< _tlIerrors+                                             {-# LINE 809 "Desugar.hs" #-}) of+                                       { !_lhsOerrors ->+                                       (case ({-# LINE 69 "Desugar.ag" #-}+                                              (:) _hdItks _tlItks+                                              {-# LINE 813 "Desugar.hs" #-}) of+                                        { !_tks ->+                                        (case ({-# LINE 69 "Desugar.ag" #-}+                                               _tks+                                               {-# LINE 817 "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 831 "Desugar.hs" #-}) of+                      { !_lhsOaddLines ->+                      (case ({-# LINE 37 "Desugar.ag" #-}+                             Seq.empty+                             {-# LINE 835 "Desugar.hs" #-}) of+                       { !_lhsOerrors ->+                       (case ({-# LINE 69 "Desugar.ag" #-}+                              []+                              {-# LINE 839 "Desugar.hs" #-}) of+                        { !_tks ->+                        (case ({-# LINE 69 "Desugar.ag" #-}+                               _tks+                               {-# LINE 843 "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 896 "Desugar.hs" #-}) of+                          { !_tokensOnt ->+                          (case ({-# LINE 152 "Desugar.ag" #-}+                                 _lhsIcon+                                 {-# LINE 900 "Desugar.hs" #-}) of+                           { !_tokensOcon ->+                           (case ({-# LINE 125 "Desugar.ag" #-}+                                  _lhsIchildSyns+                                  {-# LINE 904 "Desugar.hs" #-}) of+                            { !_tokensOchildSyns ->+                            (case ({-# LINE 61 "Desugar.ag" #-}+                                   _lhsIuseFieldIdent+                                   {-# LINE 908 "Desugar.hs" #-}) of+                             { !_tokensOuseFieldIdent ->+                             (case ({-# LINE 167 "Desugar.ag" #-}+                                    _lhsIruleDescr+                                    {-# LINE 912 "Desugar.hs" #-}) of+                              { !_tokensOruleDescr ->+                              (case ({-# LINE 125 "Desugar.ag" #-}+                                     _lhsIchildInhs+                                     {-# LINE 916 "Desugar.hs" #-}) of+                               { !_tokensOchildInhs ->+                               (case ({-# LINE 66 "Desugar.ag" #-}+                                      0+                                      {-# LINE 920 "Desugar.hs" #-}) of+                                { !_tokensOaddLines ->+                                (case ((tokens_ _tokensOaddLines _tokensOchildInhs _tokensOchildSyns _tokensOcon _tokensOnt _tokensOruleDescr _tokensOuseFieldIdent )) of+                                 { ( !_tokensIaddLines,!_tokensIerrors,!_tokensItks) ->+                                 (case ({-# LINE 37 "Desugar.ag" #-}+                                        _tokensIerrors+                                        {-# LINE 926 "Desugar.hs" #-}) of+                                  { !_lhsOerrors ->+                                  (case ({-# LINE 68 "Desugar.ag" #-}+                                         _tokensItks+                                         {-# LINE 930 "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 988 "Desugar.hs" #-}) of+                         { !_prodsOnt ->+                         (case ({-# LINE 35 "Desugar.ag" #-}+                                _lhsIoptions+                                {-# LINE 992 "Desugar.hs" #-}) of+                          { !_prodsOoptions ->+                          (case ({-# LINE 214 "Desugar.ag" #-}+                                 _lhsIforcedIrrefutables+                                 {-# LINE 996 "Desugar.hs" #-}) of+                           { !_prodsOforcedIrrefutables ->+                           (case ({-# LINE 238 "Desugar.ag" #-}+                                  Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn+                                  {-# LINE 1000 "Desugar.hs" #-}) of+                            { !_augmentsIn ->+                            (case ({-# LINE 229 "Desugar.ag" #-}+                                   _augmentsIn+                                   {-# LINE 1004 "Desugar.hs" #-}) of+                             { !_prodsOaugmentsIn ->+                             (case ((prods_ _prodsOaugmentsIn _prodsOforcedIrrefutables _prodsOnt _prodsOoptions )) of+                              { ( !_prodsIallAttributes,!_prodsIaugmentsOut,!_prodsIerrors,!_prodsIoutput) ->+                              (case ({-# LINE 195 "Desugar.ag" #-}+                                     _prodsIallAttributes+                                     {-# LINE 1010 "Desugar.hs" #-}) of+                               { !_lhsOallAttributes ->+                               (case ({-# LINE 239 "Desugar.ag" #-}+                                      Map.singleton nt_ _prodsIaugmentsOut+                                      {-# LINE 1014 "Desugar.hs" #-}) of+                                { !_augmentsOut ->+                                (case ({-# LINE 228 "Desugar.ag" #-}+                                       _augmentsOut+                                       {-# LINE 1018 "Desugar.hs" #-}) of+                                 { !_lhsOaugmentsOut ->+                                 (case ({-# LINE 37 "Desugar.ag" #-}+                                        _prodsIerrors+                                        {-# LINE 1022 "Desugar.hs" #-}) of+                                  { !_lhsOerrors ->+                                  (case ({-# LINE 39 "Desugar.ag" #-}+                                         Nonterminal nt_ params_ inh_ syn_ _prodsIoutput+                                         {-# LINE 1026 "Desugar.hs" #-}) of+                                   { !_output ->+                                   (case ({-# LINE 39 "Desugar.ag" #-}+                                          _output+                                          {-# LINE 1030 "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 1083 "Desugar.hs" #-}) of+                          { !_tlOoptions ->+                          (case ({-# LINE 214 "Desugar.ag" #-}+                                 _lhsIforcedIrrefutables+                                 {-# LINE 1087 "Desugar.hs" #-}) of+                           { !_tlOforcedIrrefutables ->+                           (case ({-# LINE 227 "Desugar.ag" #-}+                                  _lhsIaugmentsIn+                                  {-# LINE 1091 "Desugar.hs" #-}) of+                            { !_tlOaugmentsIn ->+                            (case ((tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOoptions )) of+                             { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->+                             (case ({-# LINE 35 "Desugar.ag" #-}+                                    _lhsIoptions+                                    {-# LINE 1097 "Desugar.hs" #-}) of+                              { !_hdOoptions ->+                              (case ({-# LINE 214 "Desugar.ag" #-}+                                     _lhsIforcedIrrefutables+                                     {-# LINE 1101 "Desugar.hs" #-}) of+                               { !_hdOforcedIrrefutables ->+                               (case ({-# LINE 227 "Desugar.ag" #-}+                                      _lhsIaugmentsIn+                                      {-# LINE 1105 "Desugar.hs" #-}) of+                                { !_hdOaugmentsIn ->+                                (case ((hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOoptions )) of+                                 { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->+                                 (case ({-# LINE 195 "Desugar.ag" #-}+                                        _hdIallAttributes `mergeAttributes` _tlIallAttributes+                                        {-# LINE 1111 "Desugar.hs" #-}) of+                                  { !_lhsOallAttributes ->+                                  (case ({-# LINE 228 "Desugar.ag" #-}+                                         _hdIaugmentsOut `Map.union` _tlIaugmentsOut+                                         {-# LINE 1115 "Desugar.hs" #-}) of+                                   { !_lhsOaugmentsOut ->+                                   (case ({-# LINE 37 "Desugar.ag" #-}+                                          _hdIerrors Seq.>< _tlIerrors+                                          {-# LINE 1119 "Desugar.hs" #-}) of+                                    { !_lhsOerrors ->+                                    (case ({-# LINE 39 "Desugar.ag" #-}+                                           (:) _hdIoutput _tlIoutput+                                           {-# LINE 1123 "Desugar.hs" #-}) of+                                     { !_output ->+                                     (case ({-# LINE 39 "Desugar.ag" #-}+                                            _output+                                            {-# LINE 1127 "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 1137 "Desugar.hs" #-}) of+                          { !_lhsOallAttributes ->+                          (case ({-# LINE 228 "Desugar.ag" #-}+                                 Map.empty+                                 {-# LINE 1141 "Desugar.hs" #-}) of+                           { !_lhsOaugmentsOut ->+                           (case ({-# LINE 37 "Desugar.ag" #-}+                                  Seq.empty+                                  {-# LINE 1145 "Desugar.hs" #-}) of+                            { !_lhsOerrors ->+                            (case ({-# LINE 39 "Desugar.ag" #-}+                                   []+                                   {-# LINE 1149 "Desugar.hs" #-}) of+                             { !_output ->+                             (case ({-# LINE 39 "Desugar.ag" #-}+                                    _output+                                    {-# LINE 1153 "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 1253 "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 1261 "Desugar.hs" #-}) of+                   { !_lhsOdefsCollect ->+                   (case ((sem_Pattern_Alias_1 (T_Pattern_1 pat_1 ) attr_ field_ (T_Patterns_1 parts_1 ) )) of+                    { ( !sem_Pattern_1) ->+                    ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) }) }) )+sem_Pattern_Alias_1 :: T_Pattern_1  ->+                       Identifier ->+                       Identifier ->+                       T_Patterns_1  ->+                       T_Pattern_1 +sem_Pattern_Alias_1 !(T_Pattern_1 pat_1 ) !attr_ !field_ !(T_Patterns_1 parts_1 )  =+    (T_Pattern_1 (\ (!_lhsIchildInhs)+                    (!_lhsIchildSyns)+                    (!_lhsIcon)+                    (!_lhsIdefs)+                    (!_lhsIforcedIrrefutables)+                    (!_lhsInt) ->+                      (case ({-# LINE 151 "Desugar.ag" #-}+                             _lhsInt+                             {-# LINE 1280 "Desugar.hs" #-}) of+                       { !_patOnt ->+                       (case ({-# LINE 152 "Desugar.ag" #-}+                              _lhsIcon+                              {-# LINE 1284 "Desugar.hs" #-}) of+                        { !_patOcon ->+                        (case ({-# LINE 214 "Desugar.ag" #-}+                               _lhsIforcedIrrefutables+                               {-# LINE 1288 "Desugar.hs" #-}) of+                         { !_patOforcedIrrefutables ->+                         (case ({-# LINE 184 "Desugar.ag" #-}+                                _lhsIdefs+                                {-# LINE 1292 "Desugar.hs" #-}) of+                          { !_patOdefs ->+                          (case ({-# LINE 125 "Desugar.ag" #-}+                                 _lhsIchildSyns+                                 {-# LINE 1296 "Desugar.hs" #-}) of+                           { !_patOchildSyns ->+                           (case ({-# LINE 125 "Desugar.ag" #-}+                                  _lhsIchildInhs+                                  {-# LINE 1300 "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 1306 "Desugar.hs" #-}) of+                              { !_lhsOallAttributes ->+                              (case ({-# LINE 151 "Desugar.ag" #-}+                                     _lhsInt+                                     {-# LINE 1310 "Desugar.hs" #-}) of+                               { !_partsOnt ->+                               (case ({-# LINE 214 "Desugar.ag" #-}+                                      _lhsIforcedIrrefutables+                                      {-# LINE 1314 "Desugar.hs" #-}) of+                                { !_partsOforcedIrrefutables ->+                                (case ({-# LINE 184 "Desugar.ag" #-}+                                       _lhsIdefs+                                       {-# LINE 1318 "Desugar.hs" #-}) of+                                 { !_partsOdefs ->+                                 (case ({-# LINE 152 "Desugar.ag" #-}+                                        _lhsIcon+                                        {-# LINE 1322 "Desugar.hs" #-}) of+                                  { !_partsOcon ->+                                  (case ({-# LINE 125 "Desugar.ag" #-}+                                         _lhsIchildSyns+                                         {-# LINE 1326 "Desugar.hs" #-}) of+                                   { !_partsOchildSyns ->+                                   (case ({-# LINE 125 "Desugar.ag" #-}+                                          _lhsIchildInhs+                                          {-# LINE 1330 "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 1336 "Desugar.hs" #-}) of+                                      { !_copy ->+                                      (case ({-# LINE 23 "./Patterns.ag" #-}+                                             _copy+                                             {-# LINE 1340 "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 1345 "Desugar.hs" #-}) of+                                        { !__tup2 ->+                                        (case ({-# LINE 109 "Desugar.ag" #-}+                                               __tup2+                                               {-# LINE 1349 "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 1357 "Desugar.hs" #-}) of+                                          { !_err2 ->+                                          (case ({-# LINE 109 "Desugar.ag" #-}+                                                 __tup2+                                                 {-# LINE 1361 "Desugar.hs" #-}) of+                                           { !(_,!_err1) ->+                                           (case ({-# LINE 116 "Desugar.ag" #-}+                                                  _err1     Seq.>< _err2     Seq.>< _patIerrors Seq.>< _partsIerrors+                                                  {-# LINE 1365 "Desugar.hs" #-}) of+                                            { !_lhsOerrors ->+                                            (case ({-# LINE 117 "Desugar.ag" #-}+                                                   Alias _field'     attr_ _patIoutput _partsIoutput+                                                   {-# LINE 1369 "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 1375 "Desugar.hs" #-}) of+                                              { !_lhsOoutput ->+                                              ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+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 1386 "Desugar.hs" #-}) of+                 { !_lhsOdefsCollect ->+                 (case ((sem_Pattern_Constr_1 (T_Patterns_1 pats_1 ) name_ )) of+                  { ( !sem_Pattern_1) ->+                  ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )+sem_Pattern_Constr_1 :: T_Patterns_1  ->+                        ConstructorIdent ->+                        T_Pattern_1 +sem_Pattern_Constr_1 !(T_Patterns_1 pats_1 ) !name_  =+    (T_Pattern_1 (\ (!_lhsIchildInhs)+                    (!_lhsIchildSyns)+                    (!_lhsIcon)+                    (!_lhsIdefs)+                    (!_lhsIforcedIrrefutables)+                    (!_lhsInt) ->+                      (case ({-# LINE 151 "Desugar.ag" #-}+                             _lhsInt+                             {-# LINE 1403 "Desugar.hs" #-}) of+                       { !_patsOnt ->+                       (case ({-# LINE 152 "Desugar.ag" #-}+                              _lhsIcon+                              {-# LINE 1407 "Desugar.hs" #-}) of+                        { !_patsOcon ->+                        (case ({-# LINE 214 "Desugar.ag" #-}+                               _lhsIforcedIrrefutables+                               {-# LINE 1411 "Desugar.hs" #-}) of+                         { !_patsOforcedIrrefutables ->+                         (case ({-# LINE 184 "Desugar.ag" #-}+                                _lhsIdefs+                                {-# LINE 1415 "Desugar.hs" #-}) of+                          { !_patsOdefs ->+                          (case ({-# LINE 125 "Desugar.ag" #-}+                                 _lhsIchildSyns+                                 {-# LINE 1419 "Desugar.hs" #-}) of+                           { !_patsOchildSyns ->+                           (case ({-# LINE 125 "Desugar.ag" #-}+                                  _lhsIchildInhs+                                  {-# LINE 1423 "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 1429 "Desugar.hs" #-}) of+                              { !_lhsOallAttributes ->+                              (case ({-# LINE 23 "./Patterns.ag" #-}+                                     Constr name_ _patsIcopy+                                     {-# LINE 1433 "Desugar.hs" #-}) of+                               { !_copy ->+                               (case ({-# LINE 23 "./Patterns.ag" #-}+                                      _copy+                                      {-# LINE 1437 "Desugar.hs" #-}) of+                                { !_lhsOcopy ->+                                (case ({-# LINE 37 "Desugar.ag" #-}+                                       _patsIerrors+                                       {-# LINE 1441 "Desugar.hs" #-}) of+                                 { !_lhsOerrors ->+                                 (case ({-# LINE 39 "Desugar.ag" #-}+                                        Constr name_ _patsIoutput+                                        {-# LINE 1445 "Desugar.hs" #-}) of+                                  { !_output ->+                                  (case ({-# LINE 39 "Desugar.ag" #-}+                                         _output+                                         {-# LINE 1449 "Desugar.hs" #-}) of+                                   { !_lhsOoutput ->+                                   ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+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 1459 "Desugar.hs" #-}) of+                 { !_lhsOdefsCollect ->+                 (case ((sem_Pattern_Irrefutable_1 (T_Pattern_1 pat_1 ) )) of+                  { ( !sem_Pattern_1) ->+                  ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )+sem_Pattern_Irrefutable_1 :: T_Pattern_1  ->+                             T_Pattern_1 +sem_Pattern_Irrefutable_1 !(T_Pattern_1 pat_1 )  =+    (T_Pattern_1 (\ (!_lhsIchildInhs)+                    (!_lhsIchildSyns)+                    (!_lhsIcon)+                    (!_lhsIdefs)+                    (!_lhsIforcedIrrefutables)+                    (!_lhsInt) ->+                      (case ({-# LINE 201 "Desugar.ag" #-}+                             Map.empty+                             {-# LINE 1475 "Desugar.hs" #-}) of+                       { !_lhsOallAttributes ->+                       (case ({-# LINE 151 "Desugar.ag" #-}+                              _lhsInt+                              {-# LINE 1479 "Desugar.hs" #-}) of+                        { !_patOnt ->+                        (case ({-# LINE 214 "Desugar.ag" #-}+                               _lhsIforcedIrrefutables+                               {-# LINE 1483 "Desugar.hs" #-}) of+                         { !_patOforcedIrrefutables ->+                         (case ({-# LINE 184 "Desugar.ag" #-}+                                _lhsIdefs+                                {-# LINE 1487 "Desugar.hs" #-}) of+                          { !_patOdefs ->+                          (case ({-# LINE 152 "Desugar.ag" #-}+                                 _lhsIcon+                                 {-# LINE 1491 "Desugar.hs" #-}) of+                           { !_patOcon ->+                           (case ({-# LINE 125 "Desugar.ag" #-}+                                  _lhsIchildSyns+                                  {-# LINE 1495 "Desugar.hs" #-}) of+                            { !_patOchildSyns ->+                            (case ({-# LINE 125 "Desugar.ag" #-}+                                   _lhsIchildInhs+                                   {-# LINE 1499 "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 1505 "Desugar.hs" #-}) of+                               { !_copy ->+                               (case ({-# LINE 23 "./Patterns.ag" #-}+                                      _copy+                                      {-# LINE 1509 "Desugar.hs" #-}) of+                                { !_lhsOcopy ->+                                (case ({-# LINE 37 "Desugar.ag" #-}+                                       _patIerrors+                                       {-# LINE 1513 "Desugar.hs" #-}) of+                                 { !_lhsOerrors ->+                                 (case ({-# LINE 39 "Desugar.ag" #-}+                                        Irrefutable _patIoutput+                                        {-# LINE 1517 "Desugar.hs" #-}) of+                                  { !_output ->+                                  (case ({-# LINE 39 "Desugar.ag" #-}+                                         _output+                                         {-# LINE 1521 "Desugar.hs" #-}) of+                                   { !_lhsOoutput ->+                                   ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+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 1532 "Desugar.hs" #-}) of+                 { !_lhsOdefsCollect ->+                 (case ((sem_Pattern_Product_1 (T_Patterns_1 pats_1 ) pos_ )) of+                  { ( !sem_Pattern_1) ->+                  ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )+sem_Pattern_Product_1 :: T_Patterns_1  ->+                         Pos ->+                         T_Pattern_1 +sem_Pattern_Product_1 !(T_Patterns_1 pats_1 ) !pos_  =+    (T_Pattern_1 (\ (!_lhsIchildInhs)+                    (!_lhsIchildSyns)+                    (!_lhsIcon)+                    (!_lhsIdefs)+                    (!_lhsIforcedIrrefutables)+                    (!_lhsInt) ->+                      (case ({-# LINE 151 "Desugar.ag" #-}+                             _lhsInt+                             {-# LINE 1549 "Desugar.hs" #-}) of+                       { !_patsOnt ->+                       (case ({-# LINE 152 "Desugar.ag" #-}+                              _lhsIcon+                              {-# LINE 1553 "Desugar.hs" #-}) of+                        { !_patsOcon ->+                        (case ({-# LINE 214 "Desugar.ag" #-}+                               _lhsIforcedIrrefutables+                               {-# LINE 1557 "Desugar.hs" #-}) of+                         { !_patsOforcedIrrefutables ->+                         (case ({-# LINE 184 "Desugar.ag" #-}+                                _lhsIdefs+                                {-# LINE 1561 "Desugar.hs" #-}) of+                          { !_patsOdefs ->+                          (case ({-# LINE 125 "Desugar.ag" #-}+                                 _lhsIchildSyns+                                 {-# LINE 1565 "Desugar.hs" #-}) of+                           { !_patsOchildSyns ->+                           (case ({-# LINE 125 "Desugar.ag" #-}+                                  _lhsIchildInhs+                                  {-# LINE 1569 "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 1575 "Desugar.hs" #-}) of+                              { !_lhsOallAttributes ->+                              (case ({-# LINE 23 "./Patterns.ag" #-}+                                     Product pos_ _patsIcopy+                                     {-# LINE 1579 "Desugar.hs" #-}) of+                               { !_copy ->+                               (case ({-# LINE 23 "./Patterns.ag" #-}+                                      _copy+                                      {-# LINE 1583 "Desugar.hs" #-}) of+                                { !_lhsOcopy ->+                                (case ({-# LINE 37 "Desugar.ag" #-}+                                       _patsIerrors+                                       {-# LINE 1587 "Desugar.hs" #-}) of+                                 { !_lhsOerrors ->+                                 (case ({-# LINE 39 "Desugar.ag" #-}+                                        Product pos_ _patsIoutput+                                        {-# LINE 1591 "Desugar.hs" #-}) of+                                  { !_output ->+                                  (case ({-# LINE 39 "Desugar.ag" #-}+                                         _output+                                         {-# LINE 1595 "Desugar.hs" #-}) of+                                   { !_lhsOoutput ->+                                   ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Pattern_Underscore :: Pos ->+                          T_Pattern +sem_Pattern_Underscore !pos_  =+    (T_Pattern (case ({-# LINE 178 "Desugar.ag" #-}+                      Set.empty+                      {-# LINE 1603 "Desugar.hs" #-}) of+                { !_lhsOdefsCollect ->+                (case ((sem_Pattern_Underscore_1 pos_ )) of+                 { ( !sem_Pattern_1) ->+                 ( _lhsOdefsCollect,sem_Pattern_1) }) }) )+sem_Pattern_Underscore_1 :: Pos ->+                            T_Pattern_1 +sem_Pattern_Underscore_1 !pos_  =+    (T_Pattern_1 (\ (!_lhsIchildInhs)+                    (!_lhsIchildSyns)+                    (!_lhsIcon)+                    (!_lhsIdefs)+                    (!_lhsIforcedIrrefutables)+                    (!_lhsInt) ->+                      (case ({-# LINE 195 "Desugar.ag" #-}+                             Map.empty+                             {-# LINE 1619 "Desugar.hs" #-}) of+                       { !_lhsOallAttributes ->+                       (case ({-# LINE 23 "./Patterns.ag" #-}+                              Underscore pos_+                              {-# LINE 1623 "Desugar.hs" #-}) of+                        { !_copy ->+                        (case ({-# LINE 23 "./Patterns.ag" #-}+                               _copy+                               {-# LINE 1627 "Desugar.hs" #-}) of+                         { !_lhsOcopy ->+                         (case ({-# LINE 37 "Desugar.ag" #-}+                                Seq.empty+                                {-# LINE 1631 "Desugar.hs" #-}) of+                          { !_lhsOerrors ->+                          (case ({-# LINE 39 "Desugar.ag" #-}+                                 Underscore pos_+                                 {-# LINE 1635 "Desugar.hs" #-}) of+                           { !_output ->+                           (case ({-# LINE 39 "Desugar.ag" #-}+                                  _output+                                  {-# LINE 1639 "Desugar.hs" #-}) of+                            { !_lhsOoutput ->+                            ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )+-- 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 1707 "Desugar.hs" #-}) of+                   { !_lhsOdefsCollect ->+                   (case ((sem_Patterns_Cons_1 (T_Patterns_1 tl_1 ) (T_Pattern_1 hd_1 ) )) of+                    { ( !sem_Patterns_1) ->+                    ( _lhsOdefsCollect,sem_Patterns_1) }) }) }) }) )+sem_Patterns_Cons_1 :: T_Patterns_1  ->+                       T_Pattern_1  ->+                       T_Patterns_1 +sem_Patterns_Cons_1 !(T_Patterns_1 tl_1 ) !(T_Pattern_1 hd_1 )  =+    (T_Patterns_1 (\ (!_lhsIchildInhs)+                     (!_lhsIchildSyns)+                     (!_lhsIcon)+                     (!_lhsIdefs)+                     (!_lhsIforcedIrrefutables)+                     (!_lhsInt) ->+                       (case ({-# LINE 151 "Desugar.ag" #-}+                              _lhsInt+                              {-# LINE 1724 "Desugar.hs" #-}) of+                        { !_tlOnt ->+                        (case ({-# LINE 152 "Desugar.ag" #-}+                               _lhsIcon+                               {-# LINE 1728 "Desugar.hs" #-}) of+                         { !_tlOcon ->+                         (case ({-# LINE 151 "Desugar.ag" #-}+                                _lhsInt+                                {-# LINE 1732 "Desugar.hs" #-}) of+                          { !_hdOnt ->+                          (case ({-# LINE 152 "Desugar.ag" #-}+                                 _lhsIcon+                                 {-# LINE 1736 "Desugar.hs" #-}) of+                           { !_hdOcon ->+                           (case ({-# LINE 214 "Desugar.ag" #-}+                                  _lhsIforcedIrrefutables+                                  {-# LINE 1740 "Desugar.hs" #-}) of+                            { !_tlOforcedIrrefutables ->+                            (case ({-# LINE 184 "Desugar.ag" #-}+                                   _lhsIdefs+                                   {-# LINE 1744 "Desugar.hs" #-}) of+                             { !_tlOdefs ->+                             (case ({-# LINE 125 "Desugar.ag" #-}+                                    _lhsIchildSyns+                                    {-# LINE 1748 "Desugar.hs" #-}) of+                              { !_tlOchildSyns ->+                              (case ({-# LINE 125 "Desugar.ag" #-}+                                     _lhsIchildInhs+                                     {-# LINE 1752 "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 1758 "Desugar.hs" #-}) of+                                 { !_hdOforcedIrrefutables ->+                                 (case ({-# LINE 184 "Desugar.ag" #-}+                                        _lhsIdefs+                                        {-# LINE 1762 "Desugar.hs" #-}) of+                                  { !_hdOdefs ->+                                  (case ({-# LINE 125 "Desugar.ag" #-}+                                         _lhsIchildSyns+                                         {-# LINE 1766 "Desugar.hs" #-}) of+                                   { !_hdOchildSyns ->+                                   (case ({-# LINE 125 "Desugar.ag" #-}+                                          _lhsIchildInhs+                                          {-# LINE 1770 "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 1776 "Desugar.hs" #-}) of+                                      { !_lhsOallAttributes ->+                                      (case ({-# LINE 23 "./Patterns.ag" #-}+                                             (:) _hdIcopy _tlIcopy+                                             {-# LINE 1780 "Desugar.hs" #-}) of+                                       { !_copy ->+                                       (case ({-# LINE 23 "./Patterns.ag" #-}+                                              _copy+                                              {-# LINE 1784 "Desugar.hs" #-}) of+                                        { !_lhsOcopy ->+                                        (case ({-# LINE 37 "Desugar.ag" #-}+                                               _hdIerrors Seq.>< _tlIerrors+                                               {-# LINE 1788 "Desugar.hs" #-}) of+                                         { !_lhsOerrors ->+                                         (case ({-# LINE 39 "Desugar.ag" #-}+                                                (:) _hdIoutput _tlIoutput+                                                {-# LINE 1792 "Desugar.hs" #-}) of+                                          { !_output ->+                                          (case ({-# LINE 39 "Desugar.ag" #-}+                                                 _output+                                                 {-# LINE 1796 "Desugar.hs" #-}) of+                                           { !_lhsOoutput ->+                                           ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil  =+    (T_Patterns (case ({-# LINE 178 "Desugar.ag" #-}+                       Set.empty+                       {-# LINE 1803 "Desugar.hs" #-}) of+                 { !_lhsOdefsCollect ->+                 (case ((sem_Patterns_Nil_1 )) of+                  { ( !sem_Patterns_1) ->+                  ( _lhsOdefsCollect,sem_Patterns_1) }) }) )+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 1818 "Desugar.hs" #-}) of+                        { !_lhsOallAttributes ->+                        (case ({-# LINE 23 "./Patterns.ag" #-}+                               []+                               {-# LINE 1822 "Desugar.hs" #-}) of+                         { !_copy ->+                         (case ({-# LINE 23 "./Patterns.ag" #-}+                                _copy+                                {-# LINE 1826 "Desugar.hs" #-}) of+                          { !_lhsOcopy ->+                          (case ({-# LINE 37 "Desugar.ag" #-}+                                 Seq.empty+                                 {-# LINE 1830 "Desugar.hs" #-}) of+                           { !_lhsOerrors ->+                           (case ({-# LINE 39 "Desugar.ag" #-}+                                  []+                                  {-# LINE 1834 "Desugar.hs" #-}) of+                            { !_output ->+                            (case ({-# LINE 39 "Desugar.ag" #-}+                                   _output+                                   {-# LINE 1838 "Desugar.hs" #-}) of+                             { !_lhsOoutput ->+                             ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )+-- 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 1900 "Desugar.hs" #-}) of+                        { !_rulesOnt ->+                        (case ({-# LINE 160 "Desugar.ag" #-}+                               con_+                               {-# LINE 1904 "Desugar.hs" #-}) of+                         { !_rulesOcon ->+                         (case ((rules_ )) of+                          { ( !_rulesIdefsCollect,!T_Rules_1 rules_1) ->+                          (case ({-# LINE 35 "Desugar.ag" #-}+                                 _lhsIoptions+                                 {-# LINE 1910 "Desugar.hs" #-}) of+                           { !_rulesOoptions ->+                           (case ({-# LINE 214 "Desugar.ag" #-}+                                  _lhsIforcedIrrefutables+                                  {-# LINE 1914 "Desugar.hs" #-}) of+                            { !_rulesOforcedIrrefutables ->+                            (case ((children_ )) of+                             { ( !_childrenIchildInhs,!_childrenIchildSyns,!_childrenIoutput) ->+                             (case ({-# LINE 125 "Desugar.ag" #-}+                                    _childrenIchildSyns+                                    {-# LINE 1920 "Desugar.hs" #-}) of+                              { !_rulesOchildSyns ->+                              (case ({-# LINE 125 "Desugar.ag" #-}+                                     _childrenIchildInhs+                                     {-# LINE 1924 "Desugar.hs" #-}) of+                               { !_rulesOchildInhs ->+                               (case ({-# LINE 187 "Desugar.ag" #-}+                                      _rulesIdefsCollect+                                      {-# LINE 1928 "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 1934 "Desugar.hs" #-}) of+                                  { !_lhsOallAttributes ->+                                  (case ({-# LINE 243 "Desugar.ag" #-}+                                         Map.findWithDefault Map.empty con_ _lhsIaugmentsIn+                                         {-# LINE 1938 "Desugar.hs" #-}) of+                                   { !_augmentsIn ->+                                   (case ({-# LINE 246 "Desugar.ag" #-}+                                          Map.mapAccum (desugarExprs _lhsIoptions _lhsInt con_ _childrenIchildInhs _childrenIchildSyns) Seq.empty _augmentsIn+                                          {-# LINE 1942 "Desugar.hs" #-}) of+                                    { !__tup3 ->+                                    (case ({-# LINE 246 "Desugar.ag" #-}+                                           __tup3+                                           {-# LINE 1946 "Desugar.hs" #-}) of+                                     { !(_,!_augmentsOut1) ->+                                     (case ({-# LINE 244 "Desugar.ag" #-}+                                            Map.singleton con_ _augmentsOut1+                                            {-# LINE 1950 "Desugar.hs" #-}) of+                                      { !_augmentsOut ->+                                      (case ({-# LINE 230 "Desugar.ag" #-}+                                             _augmentsOut+                                             {-# LINE 1954 "Desugar.hs" #-}) of+                                       { !_lhsOaugmentsOut ->+                                       (case ({-# LINE 246 "Desugar.ag" #-}+                                              __tup3+                                              {-# LINE 1958 "Desugar.hs" #-}) of+                                        { !(!_augmentErrs,_) ->+                                        (case ({-# LINE 282 "Desugar.ag" #-}+                                               _rulesIerrors Seq.>< _augmentErrs+                                               {-# LINE 1962 "Desugar.hs" #-}) of+                                         { !_lhsOerrors ->+                                         (case ((typeSigs_ )) of+                                          { ( !_typeSigsIoutput) ->+                                          (case ({-# LINE 39 "Desugar.ag" #-}+                                                 Production con_ _childrenIoutput _rulesIoutput _typeSigsIoutput+                                                 {-# LINE 1968 "Desugar.hs" #-}) of+                                           { !_output ->+                                           (case ({-# LINE 39 "Desugar.ag" #-}+                                                  _output+                                                  {-# LINE 1972 "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 2028 "Desugar.hs" #-}) of+                         { !_tlOnt ->+                         (case ({-# LINE 151 "Desugar.ag" #-}+                                _lhsInt+                                {-# LINE 2032 "Desugar.hs" #-}) of+                          { !_hdOnt ->+                          (case ({-# LINE 35 "Desugar.ag" #-}+                                 _lhsIoptions+                                 {-# LINE 2036 "Desugar.hs" #-}) of+                           { !_tlOoptions ->+                           (case ({-# LINE 214 "Desugar.ag" #-}+                                  _lhsIforcedIrrefutables+                                  {-# LINE 2040 "Desugar.hs" #-}) of+                            { !_tlOforcedIrrefutables ->+                            (case ({-# LINE 229 "Desugar.ag" #-}+                                   _lhsIaugmentsIn+                                   {-# LINE 2044 "Desugar.hs" #-}) of+                             { !_tlOaugmentsIn ->+                             (case ((tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOnt _tlOoptions )) of+                              { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->+                              (case ({-# LINE 35 "Desugar.ag" #-}+                                     _lhsIoptions+                                     {-# LINE 2050 "Desugar.hs" #-}) of+                               { !_hdOoptions ->+                               (case ({-# LINE 214 "Desugar.ag" #-}+                                      _lhsIforcedIrrefutables+                                      {-# LINE 2054 "Desugar.hs" #-}) of+                                { !_hdOforcedIrrefutables ->+                                (case ({-# LINE 229 "Desugar.ag" #-}+                                       _lhsIaugmentsIn+                                       {-# LINE 2058 "Desugar.hs" #-}) of+                                 { !_hdOaugmentsIn ->+                                 (case ((hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOnt _hdOoptions )) of+                                  { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->+                                  (case ({-# LINE 195 "Desugar.ag" #-}+                                         _hdIallAttributes `mergeAttributes` _tlIallAttributes+                                         {-# LINE 2064 "Desugar.hs" #-}) of+                                   { !_lhsOallAttributes ->+                                   (case ({-# LINE 230 "Desugar.ag" #-}+                                          _hdIaugmentsOut `Map.union` _tlIaugmentsOut+                                          {-# LINE 2068 "Desugar.hs" #-}) of+                                    { !_lhsOaugmentsOut ->+                                    (case ({-# LINE 37 "Desugar.ag" #-}+                                           _hdIerrors Seq.>< _tlIerrors+                                           {-# LINE 2072 "Desugar.hs" #-}) of+                                     { !_lhsOerrors ->+                                     (case ({-# LINE 39 "Desugar.ag" #-}+                                            (:) _hdIoutput _tlIoutput+                                            {-# LINE 2076 "Desugar.hs" #-}) of+                                      { !_output ->+                                      (case ({-# LINE 39 "Desugar.ag" #-}+                                             _output+                                             {-# LINE 2080 "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 2091 "Desugar.hs" #-}) of+                         { !_lhsOallAttributes ->+                         (case ({-# LINE 230 "Desugar.ag" #-}+                                Map.empty+                                {-# LINE 2095 "Desugar.hs" #-}) of+                          { !_lhsOaugmentsOut ->+                          (case ({-# LINE 37 "Desugar.ag" #-}+                                 Seq.empty+                                 {-# LINE 2099 "Desugar.hs" #-}) of+                           { !_lhsOerrors ->+                           (case ({-# LINE 39 "Desugar.ag" #-}+                                  []+                                  {-# LINE 2103 "Desugar.hs" #-}) of+                            { !_output ->+                            (case ({-# LINE 39 "Desugar.ag" #-}+                                   _output+                                   {-# LINE 2107 "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 pattern        : Pattern +         child rhs            : Expression +         child owrt           : {Bool}+         child origin         : {String}+         visit 1:+            local ruleDescr   : _+            local output      : _+-}+-- cata+sem_Rule :: Rule  ->+            T_Rule +sem_Rule !(Rule _pattern _rhs _owrt _origin )  =+    (sem_Rule_Rule (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin )+-- 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 :: T_Pattern  ->+                 T_Expression  ->+                 Bool ->+                 String ->+                 T_Rule +sem_Rule_Rule !(T_Pattern pattern_ ) !(T_Expression rhs_ ) !owrt_ !origin_  =+    (T_Rule (case ((pattern_ )) of+             { ( !_patternIdefsCollect,!T_Pattern_1 pattern_1) ->+             (case ({-# LINE 178 "Desugar.ag" #-}+                    _patternIdefsCollect+                    {-# LINE 2174 "Desugar.hs" #-}) of+              { !_lhsOdefsCollect ->+              (case ((sem_Rule_Rule_1 (T_Pattern_1 pattern_1 ) _patternIdefsCollect (T_Expression rhs_ ) origin_ owrt_ )) of+               { ( !sem_Rule_1) ->+               ( _lhsOdefsCollect,sem_Rule_1) }) }) }) )+sem_Rule_Rule_1 :: T_Pattern_1  ->+                   (Set (Identifier, Identifier)) ->+                   T_Expression  ->+                   String ->+                   Bool ->+                   T_Rule_1 +sem_Rule_Rule_1 !(T_Pattern_1 pattern_1 ) !_patternIdefsCollect !(T_Expression rhs_ ) !origin_ !owrt_  =+    (T_Rule_1 (\ (!_lhsIchildInhs)+                 (!_lhsIchildSyns)+                 (!_lhsIcon)+                 (!_lhsIdefs)+                 (!_lhsIforcedIrrefutables)+                 (!_lhsInt)+                 (!_lhsIoptions) ->+                   (case ({-# LINE 151 "Desugar.ag" #-}+                          _lhsInt+                          {-# LINE 2195 "Desugar.hs" #-}) of+                    { !_patternOnt ->+                    (case ({-# LINE 152 "Desugar.ag" #-}+                           _lhsIcon+                           {-# LINE 2199 "Desugar.hs" #-}) of+                     { !_patternOcon ->+                     (case ({-# LINE 214 "Desugar.ag" #-}+                            _lhsIforcedIrrefutables+                            {-# LINE 2203 "Desugar.hs" #-}) of+                      { !_patternOforcedIrrefutables ->+                      (case ({-# LINE 184 "Desugar.ag" #-}+                             _lhsIdefs+                             {-# LINE 2207 "Desugar.hs" #-}) of+                       { !_patternOdefs ->+                       (case ({-# LINE 125 "Desugar.ag" #-}+                              _lhsIchildSyns+                              {-# LINE 2211 "Desugar.hs" #-}) of+                        { !_patternOchildSyns ->+                        (case ({-# LINE 125 "Desugar.ag" #-}+                               _lhsIchildInhs+                               {-# LINE 2215 "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 2221 "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 2225 "Desugar.hs" #-}) of+                            { !_ruleDescr ->+                            (case ({-# LINE 167 "Desugar.ag" #-}+                                   _ruleDescr+                                   {-# LINE 2229 "Desugar.hs" #-}) of+                             { !_rhsOruleDescr ->+                             (case ({-# LINE 35 "Desugar.ag" #-}+                                    _lhsIoptions+                                    {-# LINE 2233 "Desugar.hs" #-}) of+                              { !_rhsOoptions ->+                              (case ({-# LINE 151 "Desugar.ag" #-}+                                     _lhsInt+                                     {-# LINE 2237 "Desugar.hs" #-}) of+                               { !_rhsOnt ->+                               (case ({-# LINE 152 "Desugar.ag" #-}+                                      _lhsIcon+                                      {-# LINE 2241 "Desugar.hs" #-}) of+                                { !_rhsOcon ->+                                (case ({-# LINE 125 "Desugar.ag" #-}+                                       _lhsIchildSyns+                                       {-# LINE 2245 "Desugar.hs" #-}) of+                                 { !_rhsOchildSyns ->+                                 (case ({-# LINE 125 "Desugar.ag" #-}+                                        _lhsIchildInhs+                                        {-# LINE 2249 "Desugar.hs" #-}) of+                                  { !_rhsOchildInhs ->+                                  (case ((rhs_ _rhsOchildInhs _rhsOchildSyns _rhsOcon _rhsOnt _rhsOoptions _rhsOruleDescr )) of+                                   { ( !_rhsIerrors,!_rhsIoutput) ->+                                   (case ({-# LINE 37 "Desugar.ag" #-}+                                          _patternIerrors Seq.>< _rhsIerrors+                                          {-# LINE 2255 "Desugar.hs" #-}) of+                                    { !_lhsOerrors ->+                                    (case ({-# LINE 39 "Desugar.ag" #-}+                                           Rule _patternIoutput _rhsIoutput owrt_ origin_+                                           {-# LINE 2259 "Desugar.hs" #-}) of+                                     { !_output ->+                                     (case ({-# LINE 39 "Desugar.ag" #-}+                                            _output+                                            {-# LINE 2263 "Desugar.hs" #-}) of+                                      { !_lhsOoutput ->+                                      ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- 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 2330 "Desugar.hs" #-}) of+                { !_lhsOdefsCollect ->+                (case ((sem_Rules_Cons_1 (T_Rules_1 tl_1 ) (T_Rule_1 hd_1 ) )) of+                 { ( !sem_Rules_1) ->+                 ( _lhsOdefsCollect,sem_Rules_1) }) }) }) }) )+sem_Rules_Cons_1 :: T_Rules_1  ->+                    T_Rule_1  ->+                    T_Rules_1 +sem_Rules_Cons_1 !(T_Rules_1 tl_1 ) !(T_Rule_1 hd_1 )  =+    (T_Rules_1 (\ (!_lhsIchildInhs)+                  (!_lhsIchildSyns)+                  (!_lhsIcon)+                  (!_lhsIdefs)+                  (!_lhsIforcedIrrefutables)+                  (!_lhsInt)+                  (!_lhsIoptions) ->+                    (case ({-# LINE 151 "Desugar.ag" #-}+                           _lhsInt+                           {-# LINE 2348 "Desugar.hs" #-}) of+                     { !_tlOnt ->+                     (case ({-# LINE 152 "Desugar.ag" #-}+                            _lhsIcon+                            {-# LINE 2352 "Desugar.hs" #-}) of+                      { !_tlOcon ->+                      (case ({-# LINE 151 "Desugar.ag" #-}+                             _lhsInt+                             {-# LINE 2356 "Desugar.hs" #-}) of+                       { !_hdOnt ->+                       (case ({-# LINE 152 "Desugar.ag" #-}+                              _lhsIcon+                              {-# LINE 2360 "Desugar.hs" #-}) of+                        { !_hdOcon ->+                        (case ({-# LINE 35 "Desugar.ag" #-}+                               _lhsIoptions+                               {-# LINE 2364 "Desugar.hs" #-}) of+                         { !_tlOoptions ->+                         (case ({-# LINE 214 "Desugar.ag" #-}+                                _lhsIforcedIrrefutables+                                {-# LINE 2368 "Desugar.hs" #-}) of+                          { !_tlOforcedIrrefutables ->+                          (case ({-# LINE 184 "Desugar.ag" #-}+                                 _lhsIdefs+                                 {-# LINE 2372 "Desugar.hs" #-}) of+                           { !_tlOdefs ->+                           (case ({-# LINE 125 "Desugar.ag" #-}+                                  _lhsIchildSyns+                                  {-# LINE 2376 "Desugar.hs" #-}) of+                            { !_tlOchildSyns ->+                            (case ({-# LINE 125 "Desugar.ag" #-}+                                   _lhsIchildInhs+                                   {-# LINE 2380 "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 2386 "Desugar.hs" #-}) of+                               { !_hdOoptions ->+                               (case ({-# LINE 214 "Desugar.ag" #-}+                                      _lhsIforcedIrrefutables+                                      {-# LINE 2390 "Desugar.hs" #-}) of+                                { !_hdOforcedIrrefutables ->+                                (case ({-# LINE 184 "Desugar.ag" #-}+                                       _lhsIdefs+                                       {-# LINE 2394 "Desugar.hs" #-}) of+                                 { !_hdOdefs ->+                                 (case ({-# LINE 125 "Desugar.ag" #-}+                                        _lhsIchildSyns+                                        {-# LINE 2398 "Desugar.hs" #-}) of+                                  { !_hdOchildSyns ->+                                  (case ({-# LINE 125 "Desugar.ag" #-}+                                         _lhsIchildInhs+                                         {-# LINE 2402 "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 2408 "Desugar.hs" #-}) of+                                     { !_lhsOallAttributes ->+                                     (case ({-# LINE 37 "Desugar.ag" #-}+                                            _hdIerrors Seq.>< _tlIerrors+                                            {-# LINE 2412 "Desugar.hs" #-}) of+                                      { !_lhsOerrors ->+                                      (case ({-# LINE 39 "Desugar.ag" #-}+                                             (:) _hdIoutput _tlIoutput+                                             {-# LINE 2416 "Desugar.hs" #-}) of+                                       { !_output ->+                                       (case ({-# LINE 39 "Desugar.ag" #-}+                                              _output+                                              {-# LINE 2420 "Desugar.hs" #-}) of+                                        { !_lhsOoutput ->+                                        ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Rules_Nil :: T_Rules +sem_Rules_Nil  =+    (T_Rules (case ({-# LINE 178 "Desugar.ag" #-}+                    Set.empty+                    {-# LINE 2427 "Desugar.hs" #-}) of+              { !_lhsOdefsCollect ->+              (case ((sem_Rules_Nil_1 )) of+               { ( !sem_Rules_1) ->+               ( _lhsOdefsCollect,sem_Rules_1) }) }) )+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 2443 "Desugar.hs" #-}) of+                     { !_lhsOallAttributes ->+                     (case ({-# LINE 37 "Desugar.ag" #-}+                            Seq.empty+                            {-# LINE 2447 "Desugar.hs" #-}) of+                      { !_lhsOerrors ->+                      (case ({-# LINE 39 "Desugar.ag" #-}+                             []+                             {-# LINE 2451 "Desugar.hs" #-}) of+                       { !_output ->+                       (case ({-# LINE 39 "Desugar.ag" #-}+                              _output+                              {-# LINE 2455 "Desugar.hs" #-}) of+                        { !_lhsOoutput ->+                        ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) })) )+-- 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 2492 "Desugar.hs" #-}) of+                { !_output ->+                (case ({-# LINE 39 "Desugar.ag" #-}+                       _output+                       {-# LINE 2496 "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 2540 "Desugar.hs" #-}) of+                   { !_output ->+                   (case ({-# LINE 39 "Desugar.ag" #-}+                          _output+                          {-# LINE 2544 "Desugar.hs" #-}) of+                    { !_lhsOoutput ->+                    ( _lhsOoutput) }) }) }) }) )+sem_TypeSigs_Nil :: T_TypeSigs +sem_TypeSigs_Nil  =+    (T_TypeSigs (case ({-# LINE 39 "Desugar.ag" #-}+                       []+                       {-# LINE 2551 "Desugar.hs" #-}) of+                 { !_output ->+                 (case ({-# LINE 39 "Desugar.ag" #-}+                        _output+                        {-# LINE 2555 "Desugar.hs" #-}) of                   { !_lhsOoutput ->                   ( _lhsOoutput) }) }) )
src-derived/ErrorMessages.hs view
@@ -2,12 +2,14 @@  -- UUAGC 0.9.14 (ErrorMessages.ag) module ErrorMessages where+{-# LINE 2 "ErrorMessages.ag" #-}  import UU.Scanner.Position(Pos) import Pretty import DepTypes(Trace) import CodeSyntax import CommonTypes+{-# LINE 13 "../src-derived/ErrorMessages.hs" #-} -- Error ------------------------------------------------------- {-    alternatives:
src-derived/Expression.hs view
@@ -2,9 +2,11 @@  -- UUAGC 0.9.14 (Expression.ag) module Expression where+{-# LINE 2 "Expression.ag" #-}  import UU.Scanner.Position(Pos) import HsToken+{-# LINE 10 "../src-derived/Expression.hs" #-} -- Expression -------------------------------------------------- {-    alternatives:
src-derived/GenerateCode.hs view
@@ -2,5273 +2,6823 @@  -- UUAGC 0.9.14 (GenerateCode.ag) module GenerateCode where--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 Patterns-import CommonTypes-import Data.Map(Map)-import Data.Set(Set)----- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)---import Code (Decl,Expr)---- remove possible @v references in the types of a data type.-cleanupArg :: String -> String-cleanupArg s-  = case idEvalType (SimpleType s) of-      SimpleType s' -> s'---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---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"---substSelf nt tp = case tp of-                    NT t tps | t == _SELF -> Haskell (getName nt ++ " " ++ unwords tps)-                    _                     -> tp---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--typeAppStrs nm params = TypeApp (SimpleType nm) (map SimpleType params)----- dead code - replaced by mkPartitionedFunction-{--localCpsToExpr :: Bool -> [Decl] -> DeclBlocks -> Expr-localCpsToExpr o_case nextVisitDecl-  = r-  where-    r cps-      = case cps of-          DeclTerminator decls expr-            -> mkLet o_case (decls ++ nextVisitDecl) expr-          DeclBlock decls (Decl lhs rhs _ _) remainder-            -> let inDecls = [ PragmaDecl ("NOINLINE " ++ internalCpsName)-                             , Decl (Fun internalCpsName [SimpleExpr internalCpsVarName])-                                    (mkLet o_case [Decl lhs (SimpleExpr internalCpsVarName) Set.empty Set.empty] (rec remainder))-                                    Set.empty Set.empty-                             ]-                   inBody = App "head" [App "(:)" [App internalCpsName [rhs], App "(:)" [App internalCpsName [rhs], SimpleExpr "[]"]]]-                   outerBody = Let inDecls inBody-                   block = mkLet o_case decls outerBody-               in block--internalCpsName :: String-internalCpsName = "internalCps_"--internalCpsVarName :: String-internalCpsVarName = "internalCps_var_"--}--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)---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---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'--    replaceTok t-      = case t of-          AGLocal v p _ -> HsToken (replf $ getName v) p-          _             -> t--idEvalType :: Code.Type -> Code.Type-idEvalType = evalType id---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 )------ Lets or nested Cases?-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 _                   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--- 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}-         visit 0:-            local unfoldSemDom : _--}--- cata-sem_CGrammar :: CGrammar  ->-                T_CGrammar -sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap )  =-    (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts ) _pragmas _paramMap _contextMap )--- 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 ->-                         T_CGrammar -sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_  =-    (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-                          _nontsOallPragmas :: PragmaMap-                          _nontsOparamMap :: ParamMap-                          _nontsOcontextMap :: ContextMap-                          _nontsOallNts :: (Set NontermIdent)-                          _nontsOwith_sig :: Bool-                          _nontsOerrors :: (Seq Error)-                          _lhsOoutput :: Program-                          _nontsOtypeSyns :: TypeSyns-                          _nontsOderivings :: Derivings-                          _nontsOwrappers :: (Set NontermIdent)-                          _lhsOerrors :: (Seq Error)-                          _nontsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                          _nontsIallTpsFound :: Bool-                          _nontsIchunks :: Chunks-                          _nontsIerrors :: (Seq Error)-                          _nontsIgathNts :: (Set NontermIdent)-                          _nontsIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_sig =-                              typeSigs      _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_cata =-                              folds         _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_sem =-                              semfuns       _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_newtypes =-                              newtypes      _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_unbox =-                              unbox         _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_case =-                              cases         _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_pretty =-                              attrInfo      _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_rename =-                              rename        _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_strictwrap =-                              strictWrap    _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_splitsems =-                              splitSems     _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_data =-                              if dataTypes _lhsIoptions then Just (strictData _lhsIoptions) else Nothing-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOprefix =-                              prefix        _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_traces =-                              genTraces     _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_costcentre =-                              genCostCentres _lhsIoptions-                          -- "GenerateCode.ag"(line 50, column 17)-                          _nontsOo_linePragmas =-                              genLinePragmas _lhsIoptions-                          -- "GenerateCode.ag"(line 69, column 15)-                          _nontsOallPragmas =-                              pragmas_-                          -- "GenerateCode.ag"(line 91, column 14)-                          _nontsOparamMap =-                              paramMap_-                          -- "GenerateCode.ag"(line 112, column 7)-                          _nontsOcontextMap =-                              contextMap_-                          -- "GenerateCode.ag"(line 124, column 7)-                          _nontsOallNts =-                              _nontsIgathNts-                          -- "GenerateCode.ag"(line 631, column 7)-                          _unfoldSemDom =-                              \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-                          -- "GenerateCode.ag"(line 724, column 14)-                          _nontsOwith_sig =-                              typeSigs _lhsIoptions && _nontsIallTpsFound-                          -- "GenerateCode.ag"(line 731, column 15)-                          _nontsOerrors =-                              Seq.empty-                          -- "GenerateCode.ag"(line 795, column 17)-                          _lhsOoutput =-                              Program _nontsIchunks-                          -- "GenerateCode.ag"(line 848, column 14)-                          _nontsOtypeSyns =-                              typeSyns_-                          -- "GenerateCode.ag"(line 848, column 14)-                          _nontsOderivings =-                              derivings_-                          -- "GenerateCode.ag"(line 848, column 14)-                          _nontsOwrappers =-                              wrappers_-                          -- copy rule (up)-                          _lhsOerrors =-                              _nontsIerrors-                          -- copy rule (from local)-                          _nontsOunfoldSemDom =-                              _unfoldSemDom-                          ( _nontsIallTpsFound,_nontsIchunks,_nontsIerrors,_nontsIgathNts,_nontsIsemDomUnfoldGath) =-                              (nonts_ _nontsOallNts _nontsOallPragmas _nontsOcontextMap _nontsOderivings _nontsOerrors _nontsOo_case _nontsOo_cata _nontsOo_costcentre _nontsOo_data _nontsOo_linePragmas _nontsOo_newtypes _nontsOo_pretty _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_splitsems _nontsOo_strictwrap _nontsOo_traces _nontsOo_unbox _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_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-         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 ->-                                      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_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),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_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn )  =-    (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) =-             (sem _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _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_newtypes-                     _lhsIo_pretty-                     _lhsIo_rename-                     _lhsIo_sem-                     _lhsIo_sig-                     _lhsIo_splitsems-                     _lhsIo_strictwrap-                     _lhsIo_traces-                     _lhsIo_unbox-                     _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_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-                            _segOparamMap :: ParamMap-                            _segOprefix :: String-                            _segOsyn :: Attributes-                            _segIcomments :: ([String])-                            _segIisNil :: Bool-                            _segIsemDom :: ([Decl])-                            _segIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                            _segIwrapDecls :: Decls-                            -- "GenerateCode.ag"(line 228, column 17)-                            _segOnr =-                                0-                            -- "GenerateCode.ag"(line 604, column 18)-                            _lhsOsemDom =-                                Comment "semantic domain" : _segIsemDom-                            -- use rule "GenerateCode.ag"(line 748, column 52)-                            _lhsOcomments =-                                _segIcomments-                            -- use rule "GenerateCode.ag"(line 621, column 86)-                            _lhsOsemDomUnfoldGath =-                                _segIsemDomUnfoldGath-                            -- use rule "GenerateCode.ag"(line 697, column 52)-                            _lhsOwrapDecls =-                                _segIwrapDecls-                            -- copy rule (down)-                            _segOinh =-                                _lhsIinh-                            -- copy rule (down)-                            _segOnt =-                                _lhsInt-                            -- copy rule (down)-                            _segOo_case =-                                _lhsIo_case-                            -- copy rule (down)-                            _segOo_cata =-                                _lhsIo_cata-                            -- copy rule (down)-                            _segOo_costcentre =-                                _lhsIo_costcentre-                            -- copy rule (down)-                            _segOo_data =-                                _lhsIo_data-                            -- copy rule (down)-                            _segOo_linePragmas =-                                _lhsIo_linePragmas-                            -- copy rule (down)-                            _segOo_newtypes =-                                _lhsIo_newtypes-                            -- copy rule (down)-                            _segOo_pretty =-                                _lhsIo_pretty-                            -- copy rule (down)-                            _segOo_rename =-                                _lhsIo_rename-                            -- copy rule (down)-                            _segOo_sem =-                                _lhsIo_sem-                            -- copy rule (down)-                            _segOo_sig =-                                _lhsIo_sig-                            -- copy rule (down)-                            _segOo_splitsems =-                                _lhsIo_splitsems-                            -- copy rule (down)-                            _segOo_strictwrap =-                                _lhsIo_strictwrap-                            -- copy rule (down)-                            _segOo_traces =-                                _lhsIo_traces-                            -- copy rule (down)-                            _segOo_unbox =-                                _lhsIo_unbox-                            -- copy rule (down)-                            _segOparamMap =-                                _lhsIparamMap-                            -- copy rule (down)-                            _segOprefix =-                                _lhsIprefix-                            -- copy rule (down)-                            _segOsyn =-                                _lhsIsyn-                            ( _segIcomments,_segIisNil,_segIsemDom,_segIsemDomUnfoldGath,_segIwrapDecls) =-                                (seg_ _segOinh _segOnr _segOnt _segOo_case _segOo_cata _segOo_costcentre _segOo_data _segOo_linePragmas _segOo_newtypes _segOo_pretty _segOo_rename _segOo_sem _segOo_sig _segOo_splitsems _segOo_strictwrap _segOo_traces _segOo_unbox _segOparamMap _segOprefix _segOsyn )-                        in  ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )--- CNonterminal -------------------------------------------------{--   visit 0:-      inherited attributes:-         allNts               : Set NontermIdent-         allPragmas           : PragmaMap-         contextMap           : ContextMap-         derivings            : Derivings-         o_case               : Bool-         o_cata               : Bool-         o_costcentre         : Bool-         o_data               : Maybe Bool-         o_linePragmas        : 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-         paramMap             : ParamMap-         prefix               : String-         typeSyns             : TypeSyns-         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type-         with_sig             : Bool-         wrappers             : Set NontermIdent-      chained attribute:-         errors               : Seq Error-      synthesized attributes:-         allTpsFound          : Bool-         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 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 ->-                                          ContextMap ->-                                          Derivings ->-                                          (Seq Error) ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          (Maybe Bool) ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          ParamMap ->-                                          String ->-                                          TypeSyns ->-                                          (NontermIdent -> Int -> [String] -> Code.Type) ->-                                          Bool ->-                                          (Set NontermIdent) ->-                                          ( Bool,Chunks,(Seq Error),(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))-data Inh_CNonterminal  = Inh_CNonterminal {allNts_Inh_CNonterminal :: !(Set NontermIdent),allPragmas_Inh_CNonterminal :: !(PragmaMap),contextMap_Inh_CNonterminal :: !(ContextMap),derivings_Inh_CNonterminal :: !(Derivings),errors_Inh_CNonterminal :: !(Seq Error),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_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),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 {allTpsFound_Syn_CNonterminal :: !(Bool),chunks_Syn_CNonterminal :: !(Chunks),errors_Syn_CNonterminal :: !(Seq Error),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 _lhsIcontextMap _lhsIderivings _lhsIerrors _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )  =-    (let ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath) =-             (sem _lhsIallNts _lhsIallPragmas _lhsIcontextMap _lhsIderivings _lhsIerrors _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )-     in  (Syn_CNonterminal _lhsOallTpsFound _lhsOchunks _lhsOerrors _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-                       _lhsIcontextMap-                       _lhsIderivings-                       _lhsIerrors-                       _lhsIo_case-                       _lhsIo_cata-                       _lhsIo_costcentre-                       _lhsIo_data-                       _lhsIo_linePragmas-                       _lhsIo_newtypes-                       _lhsIo_pretty-                       _lhsIo_rename-                       _lhsIo_sem-                       _lhsIo_sig-                       _lhsIo_splitsems-                       _lhsIo_strictwrap-                       _lhsIo_traces-                       _lhsIo_unbox-                       _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-                              _lhsOallTpsFound :: Bool-                              _lhsOerrors :: (Seq Error)-                              _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                              _prodsOallNts :: (Set NontermIdent)-                              _prodsOallPragmas :: PragmaMap-                              _prodsOcontextMap :: ContextMap-                              _prodsOerrors :: (Seq Error)-                              _prodsOo_case :: Bool-                              _prodsOo_cata :: Bool-                              _prodsOo_costcentre :: Bool-                              _prodsOo_data :: (Maybe Bool)-                              _prodsOo_linePragmas :: 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-                              _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_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-                              _interOparamMap :: ParamMap-                              _interOprefix :: String-                              _prodsIallTpsFound :: Bool-                              _prodsIcataAlts :: Decls-                              _prodsIcomments :: ([String])-                              _prodsIdataAlts :: DataAlts-                              _prodsIdecls :: Decls-                              _prodsIerrors :: (Seq Error)-                              _prodsIsemNames :: ([String])-                              _interIcomments :: ([String])-                              _interIsemDom :: ([Decl])-                              _interIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                              _interIwrapDecls :: Decls-                              -- "GenerateCode.ag"(line 79, column 26)-                              __tup1 =-                                  (inh_,syn_,nt_)-                              -- "GenerateCode.ag"(line 79, column 26)-                              (_interOinh,_,_) =-                                  __tup1-                              -- "GenerateCode.ag"(line 79, column 26)-                              (_,_interOsyn,_) =-                                  __tup1-                              -- "GenerateCode.ag"(line 79, column 26)-                              (_,_,_interOnt) =-                                  __tup1-                              -- "GenerateCode.ag"(line 80, column 25)-                              __tup2 =-                                  (inh_,syn_,nt_)-                              -- "GenerateCode.ag"(line 80, column 25)-                              (_prodsOinh,_,_) =-                                  __tup2-                              -- "GenerateCode.ag"(line 80, column 25)-                              (_,_prodsOsyn,_) =-                                  __tup2-                              -- "GenerateCode.ag"(line 80, column 25)-                              (_,_,_prodsOnt) =-                                  __tup2-                              -- "GenerateCode.ag"(line 130, column 7)-                              _lhsOgathNts =-                                  Set.singleton nt_-                              -- "GenerateCode.ag"(line 669, column 18)-                              _semWrapper =-                                  let params' = map getName params_-                                      inhAttrs = Map.toList inh_-                                      synAttrs = Map.toList syn_-                                      inhVars = [ SimpleExpr (attrname True _LHS a) | (a,_) <- inhAttrs ]-                                      synVars = [ SimpleExpr (attrname False _LHS a) | (a,_) <- synAttrs ]-                                      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-                                      evalTpCommon t | null params' = t-                                                     | otherwise    = case (evalTp (SimpleType t)) of SimpleType t' -> t'-                                      appParams nm = TypeApp (SimpleType nm) (map SimpleType params')-                                      typeSig = TSig wrapNT (evalTp $ appParams (sdtype nt_) `Arr` (appParams inhNT `Arr` appParams synNT))-                                      mkstrict = if _lhsIo_strictwrap then (\x -> "!(" ++ x ++ ")") else id-                                      mkdata n attrs = Data n params' [Record n [(getName f++"_"++n,mkstrict $ evalTpCommon $ typeToHaskellString (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-                                              ]-                              -- "GenerateCode.ag"(line 744, column 18)-                              _comment =-                                  Comment . unlines . map ind $ ( _interIcomments ++ ("alternatives:" : map ind _prodsIcomments) )-                              -- "GenerateCode.ag"(line 798, column 19)-                              _lhsOchunks =-                                  [ 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 [])-                                  ]-                              -- "GenerateCode.ag"(line 853, column 18)-                              _dataDef =-                                  let params' = map getName params_-                                      typeSyn tp = let theType =-                                                         case tp of-                                                           CommonTypes.Maybe t      -> SimpleType ("Maybe (" ++ typeToHaskellString (Just nt_) params' t ++")")-                                                           CommonTypes.Either t1 t2 -> SimpleType ("Either (" ++ typeToHaskellString (Just nt_) params' t1 ++") ("-                                                                                                              ++ typeToHaskellString (Just nt_) params' t2 ++")")-                                                           CommonTypes.Map t1 t2    -> SimpleType ("Map (" ++ typeToHaskellString (Just nt_) params' t1 ++") ("-                                                                                                           ++ typeToHaskellString (Just nt_) params' t2 ++")")-                                                           CommonTypes.IntMap t     -> SimpleType ("IntMap (" ++ typeToHaskellString (Just nt_) params' t ++")")-                                                           CommonTypes.List t       -> Code.List $ SimpleType (typeToHaskellString (Just nt_) params' t)-                                                           CommonTypes.Tuple ts     -> Code.TupleType [SimpleType (typeToHaskellString (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-                              -- "GenerateCode.ag"(line 887, column 18)-                              _cataFun =-                                  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)-                              -- use rule "GenerateCode.ag"(line 716, column 39)-                              _lhsOallTpsFound =-                                  _prodsIallTpsFound-                              -- use rule "GenerateCode.ag"(line 729, column 32)-                              _lhsOerrors =-                                  _prodsIerrors-                              -- use rule "GenerateCode.ag"(line 621, column 86)-                              _lhsOsemDomUnfoldGath =-                                  _interIsemDomUnfoldGath-                              -- copy rule (down)-                              _prodsOallNts =-                                  _lhsIallNts-                              -- copy rule (down)-                              _prodsOallPragmas =-                                  _lhsIallPragmas-                              -- copy rule (down)-                              _prodsOcontextMap =-                                  _lhsIcontextMap-                              -- copy rule (down)-                              _prodsOerrors =-                                  _lhsIerrors-                              -- copy rule (down)-                              _prodsOo_case =-                                  _lhsIo_case-                              -- copy rule (down)-                              _prodsOo_cata =-                                  _lhsIo_cata-                              -- copy rule (down)-                              _prodsOo_costcentre =-                                  _lhsIo_costcentre-                              -- copy rule (down)-                              _prodsOo_data =-                                  _lhsIo_data-                              -- copy rule (down)-                              _prodsOo_linePragmas =-                                  _lhsIo_linePragmas-                              -- copy rule (down)-                              _prodsOo_newtypes =-                                  _lhsIo_newtypes-                              -- copy rule (down)-                              _prodsOo_pretty =-                                  _lhsIo_pretty-                              -- copy rule (down)-                              _prodsOo_rename =-                                  _lhsIo_rename-                              -- copy rule (down)-                              _prodsOo_sem =-                                  _lhsIo_sem-                              -- copy rule (down)-                              _prodsOo_sig =-                                  _lhsIo_sig-                              -- copy rule (down)-                              _prodsOo_splitsems =-                                  _lhsIo_splitsems-                              -- copy rule (down)-                              _prodsOo_strictwrap =-                                  _lhsIo_strictwrap-                              -- copy rule (down)-                              _prodsOo_traces =-                                  _lhsIo_traces-                              -- copy rule (down)-                              _prodsOo_unbox =-                                  _lhsIo_unbox-                              -- copy rule (down)-                              _prodsOparamMap =-                                  _lhsIparamMap-                              -- copy rule (down)-                              _prodsOprefix =-                                  _lhsIprefix-                              -- copy rule (down)-                              _prodsOunfoldSemDom =-                                  _lhsIunfoldSemDom-                              -- copy rule (down)-                              _prodsOwith_sig =-                                  _lhsIwith_sig-                              -- copy rule (down)-                              _interOo_case =-                                  _lhsIo_case-                              -- copy rule (down)-                              _interOo_cata =-                                  _lhsIo_cata-                              -- copy rule (down)-                              _interOo_costcentre =-                                  _lhsIo_costcentre-                              -- copy rule (down)-                              _interOo_data =-                                  _lhsIo_data-                              -- copy rule (down)-                              _interOo_linePragmas =-                                  _lhsIo_linePragmas-                              -- copy rule (down)-                              _interOo_newtypes =-                                  _lhsIo_newtypes-                              -- copy rule (down)-                              _interOo_pretty =-                                  _lhsIo_pretty-                              -- copy rule (down)-                              _interOo_rename =-                                  _lhsIo_rename-                              -- copy rule (down)-                              _interOo_sem =-                                  _lhsIo_sem-                              -- copy rule (down)-                              _interOo_sig =-                                  _lhsIo_sig-                              -- copy rule (down)-                              _interOo_splitsems =-                                  _lhsIo_splitsems-                              -- copy rule (down)-                              _interOo_strictwrap =-                                  _lhsIo_strictwrap-                              -- copy rule (down)-                              _interOo_traces =-                                  _lhsIo_traces-                              -- copy rule (down)-                              _interOo_unbox =-                                  _lhsIo_unbox-                              -- copy rule (down)-                              _interOparamMap =-                                  _lhsIparamMap-                              -- copy rule (down)-                              _interOprefix =-                                  _lhsIprefix-                              ( _prodsIallTpsFound,_prodsIcataAlts,_prodsIcomments,_prodsIdataAlts,_prodsIdecls,_prodsIerrors,_prodsIsemNames) =-                                  (prods_ _prodsOallNts _prodsOallPragmas _prodsOcontextMap _prodsOerrors _prodsOinh _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_costcentre _prodsOo_data _prodsOo_linePragmas _prodsOo_newtypes _prodsOo_pretty _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_splitsems _prodsOo_strictwrap _prodsOo_traces _prodsOo_unbox _prodsOparamMap _prodsOprefix _prodsOsyn _prodsOunfoldSemDom _prodsOwith_sig )-                              ( _interIcomments,_interIsemDom,_interIsemDomUnfoldGath,_interIwrapDecls) =-                                  (inter_ _interOinh _interOnt _interOo_case _interOo_cata _interOo_costcentre _interOo_data _interOo_linePragmas _interOo_newtypes _interOo_pretty _interOo_rename _interOo_sem _interOo_sig _interOo_splitsems _interOo_strictwrap _interOo_traces _interOo_unbox _interOparamMap _interOprefix _interOsyn )-                          in  ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )--- CNonterminals ------------------------------------------------{--   visit 0:-      inherited attributes:-         allNts               : Set NontermIdent-         allPragmas           : PragmaMap-         contextMap           : ContextMap-         derivings            : Derivings-         o_case               : Bool-         o_cata               : Bool-         o_costcentre         : Bool-         o_data               : Maybe Bool-         o_linePragmas        : 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-         paramMap             : ParamMap-         prefix               : String-         typeSyns             : TypeSyns-         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type-         with_sig             : Bool-         wrappers             : Set NontermIdent-      chained attribute:-         errors               : Seq Error-      synthesized attributes:-         allTpsFound          : Bool-         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 ->-                                            ContextMap ->-                                            Derivings ->-                                            (Seq Error) ->-                                            Bool ->-                                            Bool ->-                                            Bool ->-                                            (Maybe Bool) ->-                                            Bool ->-                                            Bool ->-                                            Bool ->-                                            Bool ->-                                            Bool ->-                                            Bool ->-                                            Bool ->-                                            Bool ->-                                            Bool ->-                                            Bool ->-                                            ParamMap ->-                                            String ->-                                            TypeSyns ->-                                            (NontermIdent -> Int -> [String] -> Code.Type) ->-                                            Bool ->-                                            (Set NontermIdent) ->-                                            ( Bool,Chunks,(Seq Error),(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))-data Inh_CNonterminals  = Inh_CNonterminals {allNts_Inh_CNonterminals :: !(Set NontermIdent),allPragmas_Inh_CNonterminals :: !(PragmaMap),contextMap_Inh_CNonterminals :: !(ContextMap),derivings_Inh_CNonterminals :: !(Derivings),errors_Inh_CNonterminals :: !(Seq Error),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_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),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 {allTpsFound_Syn_CNonterminals :: !(Bool),chunks_Syn_CNonterminals :: !(Chunks),errors_Syn_CNonterminals :: !(Seq Error),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 _lhsIcontextMap _lhsIderivings _lhsIerrors _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )  =-    (let ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath) =-             (sem _lhsIallNts _lhsIallPragmas _lhsIcontextMap _lhsIderivings _lhsIerrors _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )-     in  (Syn_CNonterminals _lhsOallTpsFound _lhsOchunks _lhsOerrors _lhsOgathNts _lhsOsemDomUnfoldGath ))-sem_CNonterminals_Cons :: T_CNonterminal  ->-                          T_CNonterminals  ->-                          T_CNonterminals -sem_CNonterminals_Cons (T_CNonterminal hd_ ) (T_CNonterminals tl_ )  =-    (T_CNonterminals (\ _lhsIallNts-                        _lhsIallPragmas-                        _lhsIcontextMap-                        _lhsIderivings-                        _lhsIerrors-                        _lhsIo_case-                        _lhsIo_cata-                        _lhsIo_costcentre-                        _lhsIo_data-                        _lhsIo_linePragmas-                        _lhsIo_newtypes-                        _lhsIo_pretty-                        _lhsIo_rename-                        _lhsIo_sem-                        _lhsIo_sig-                        _lhsIo_splitsems-                        _lhsIo_strictwrap-                        _lhsIo_traces-                        _lhsIo_unbox-                        _lhsIparamMap-                        _lhsIprefix-                        _lhsItypeSyns-                        _lhsIunfoldSemDom-                        _lhsIwith_sig-                        _lhsIwrappers ->-                          (let _lhsOallTpsFound :: Bool-                               _lhsOchunks :: Chunks-                               _lhsOerrors :: (Seq Error)-                               _lhsOgathNts :: (Set NontermIdent)-                               _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                               _hdOallNts :: (Set NontermIdent)-                               _hdOallPragmas :: PragmaMap-                               _hdOcontextMap :: ContextMap-                               _hdOderivings :: Derivings-                               _hdOerrors :: (Seq Error)-                               _hdOo_case :: Bool-                               _hdOo_cata :: Bool-                               _hdOo_costcentre :: Bool-                               _hdOo_data :: (Maybe Bool)-                               _hdOo_linePragmas :: 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-                               _hdOparamMap :: ParamMap-                               _hdOprefix :: String-                               _hdOtypeSyns :: TypeSyns-                               _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                               _hdOwith_sig :: Bool-                               _hdOwrappers :: (Set NontermIdent)-                               _tlOallNts :: (Set NontermIdent)-                               _tlOallPragmas :: PragmaMap-                               _tlOcontextMap :: ContextMap-                               _tlOderivings :: Derivings-                               _tlOerrors :: (Seq Error)-                               _tlOo_case :: Bool-                               _tlOo_cata :: Bool-                               _tlOo_costcentre :: Bool-                               _tlOo_data :: (Maybe Bool)-                               _tlOo_linePragmas :: 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-                               _tlOparamMap :: ParamMap-                               _tlOprefix :: String-                               _tlOtypeSyns :: TypeSyns-                               _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                               _tlOwith_sig :: Bool-                               _tlOwrappers :: (Set NontermIdent)-                               _hdIallTpsFound :: Bool-                               _hdIchunks :: Chunks-                               _hdIerrors :: (Seq Error)-                               _hdIgathNts :: (Set NontermIdent)-                               _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                               _tlIallTpsFound :: Bool-                               _tlIchunks :: Chunks-                               _tlIerrors :: (Seq Error)-                               _tlIgathNts :: (Set NontermIdent)-                               _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                               -- use rule "GenerateCode.ag"(line 716, column 39)-                               _lhsOallTpsFound =-                                   _hdIallTpsFound && _tlIallTpsFound-                               -- use rule "GenerateCode.ag"(line 790, column 49)-                               _lhsOchunks =-                                   _hdIchunks ++ _tlIchunks-                               -- use rule "GenerateCode.ag"(line 729, column 32)-                               _lhsOerrors =-                                   _hdIerrors Seq.>< _tlIerrors-                               -- use rule "GenerateCode.ag"(line 126, column 47)-                               _lhsOgathNts =-                                   _hdIgathNts `Set.union` _tlIgathNts-                               -- use rule "GenerateCode.ag"(line 621, column 86)-                               _lhsOsemDomUnfoldGath =-                                   _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath-                               -- copy rule (down)-                               _hdOallNts =-                                   _lhsIallNts-                               -- copy rule (down)-                               _hdOallPragmas =-                                   _lhsIallPragmas-                               -- copy rule (down)-                               _hdOcontextMap =-                                   _lhsIcontextMap-                               -- copy rule (down)-                               _hdOderivings =-                                   _lhsIderivings-                               -- copy rule (down)-                               _hdOerrors =-                                   _lhsIerrors-                               -- copy rule (down)-                               _hdOo_case =-                                   _lhsIo_case-                               -- copy rule (down)-                               _hdOo_cata =-                                   _lhsIo_cata-                               -- copy rule (down)-                               _hdOo_costcentre =-                                   _lhsIo_costcentre-                               -- copy rule (down)-                               _hdOo_data =-                                   _lhsIo_data-                               -- copy rule (down)-                               _hdOo_linePragmas =-                                   _lhsIo_linePragmas-                               -- copy rule (down)-                               _hdOo_newtypes =-                                   _lhsIo_newtypes-                               -- copy rule (down)-                               _hdOo_pretty =-                                   _lhsIo_pretty-                               -- copy rule (down)-                               _hdOo_rename =-                                   _lhsIo_rename-                               -- copy rule (down)-                               _hdOo_sem =-                                   _lhsIo_sem-                               -- copy rule (down)-                               _hdOo_sig =-                                   _lhsIo_sig-                               -- copy rule (down)-                               _hdOo_splitsems =-                                   _lhsIo_splitsems-                               -- copy rule (down)-                               _hdOo_strictwrap =-                                   _lhsIo_strictwrap-                               -- copy rule (down)-                               _hdOo_traces =-                                   _lhsIo_traces-                               -- copy rule (down)-                               _hdOo_unbox =-                                   _lhsIo_unbox-                               -- copy rule (down)-                               _hdOparamMap =-                                   _lhsIparamMap-                               -- copy rule (down)-                               _hdOprefix =-                                   _lhsIprefix-                               -- copy rule (down)-                               _hdOtypeSyns =-                                   _lhsItypeSyns-                               -- copy rule (down)-                               _hdOunfoldSemDom =-                                   _lhsIunfoldSemDom-                               -- copy rule (down)-                               _hdOwith_sig =-                                   _lhsIwith_sig-                               -- copy rule (down)-                               _hdOwrappers =-                                   _lhsIwrappers-                               -- copy rule (down)-                               _tlOallNts =-                                   _lhsIallNts-                               -- copy rule (down)-                               _tlOallPragmas =-                                   _lhsIallPragmas-                               -- copy rule (down)-                               _tlOcontextMap =-                                   _lhsIcontextMap-                               -- copy rule (down)-                               _tlOderivings =-                                   _lhsIderivings-                               -- copy rule (chain)-                               _tlOerrors =-                                   _hdIerrors-                               -- copy rule (down)-                               _tlOo_case =-                                   _lhsIo_case-                               -- copy rule (down)-                               _tlOo_cata =-                                   _lhsIo_cata-                               -- copy rule (down)-                               _tlOo_costcentre =-                                   _lhsIo_costcentre-                               -- copy rule (down)-                               _tlOo_data =-                                   _lhsIo_data-                               -- copy rule (down)-                               _tlOo_linePragmas =-                                   _lhsIo_linePragmas-                               -- copy rule (down)-                               _tlOo_newtypes =-                                   _lhsIo_newtypes-                               -- copy rule (down)-                               _tlOo_pretty =-                                   _lhsIo_pretty-                               -- copy rule (down)-                               _tlOo_rename =-                                   _lhsIo_rename-                               -- copy rule (down)-                               _tlOo_sem =-                                   _lhsIo_sem-                               -- copy rule (down)-                               _tlOo_sig =-                                   _lhsIo_sig-                               -- copy rule (down)-                               _tlOo_splitsems =-                                   _lhsIo_splitsems-                               -- copy rule (down)-                               _tlOo_strictwrap =-                                   _lhsIo_strictwrap-                               -- copy rule (down)-                               _tlOo_traces =-                                   _lhsIo_traces-                               -- copy rule (down)-                               _tlOo_unbox =-                                   _lhsIo_unbox-                               -- copy rule (down)-                               _tlOparamMap =-                                   _lhsIparamMap-                               -- copy rule (down)-                               _tlOprefix =-                                   _lhsIprefix-                               -- copy rule (down)-                               _tlOtypeSyns =-                                   _lhsItypeSyns-                               -- copy rule (down)-                               _tlOunfoldSemDom =-                                   _lhsIunfoldSemDom-                               -- copy rule (down)-                               _tlOwith_sig =-                                   _lhsIwith_sig-                               -- copy rule (down)-                               _tlOwrappers =-                                   _lhsIwrappers-                               ( _hdIallTpsFound,_hdIchunks,_hdIerrors,_hdIgathNts,_hdIsemDomUnfoldGath) =-                                   (hd_ _hdOallNts _hdOallPragmas _hdOcontextMap _hdOderivings _hdOerrors _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamMap _hdOprefix _hdOtypeSyns _hdOunfoldSemDom _hdOwith_sig _hdOwrappers )-                               ( _tlIallTpsFound,_tlIchunks,_tlIerrors,_tlIgathNts,_tlIsemDomUnfoldGath) =-                                   (tl_ _tlOallNts _tlOallPragmas _tlOcontextMap _tlOderivings _tlOerrors _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOparamMap _tlOprefix _tlOtypeSyns _tlOunfoldSemDom _tlOwith_sig _tlOwrappers )-                           in  ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )-sem_CNonterminals_Nil :: T_CNonterminals -sem_CNonterminals_Nil  =-    (T_CNonterminals (\ _lhsIallNts-                        _lhsIallPragmas-                        _lhsIcontextMap-                        _lhsIderivings-                        _lhsIerrors-                        _lhsIo_case-                        _lhsIo_cata-                        _lhsIo_costcentre-                        _lhsIo_data-                        _lhsIo_linePragmas-                        _lhsIo_newtypes-                        _lhsIo_pretty-                        _lhsIo_rename-                        _lhsIo_sem-                        _lhsIo_sig-                        _lhsIo_splitsems-                        _lhsIo_strictwrap-                        _lhsIo_traces-                        _lhsIo_unbox-                        _lhsIparamMap-                        _lhsIprefix-                        _lhsItypeSyns-                        _lhsIunfoldSemDom-                        _lhsIwith_sig-                        _lhsIwrappers ->-                          (let _lhsOallTpsFound :: Bool-                               _lhsOchunks :: Chunks-                               _lhsOerrors :: (Seq Error)-                               _lhsOgathNts :: (Set NontermIdent)-                               _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                               -- use rule "GenerateCode.ag"(line 716, column 39)-                               _lhsOallTpsFound =-                                   True-                               -- use rule "GenerateCode.ag"(line 790, column 49)-                               _lhsOchunks =-                                   []-                               -- use rule "GenerateCode.ag"(line 729, column 32)-                               _lhsOerrors =-                                   Seq.empty-                               -- use rule "GenerateCode.ag"(line 126, column 47)-                               _lhsOgathNts =-                                   Set.empty-                               -- use rule "GenerateCode.ag"(line 621, column 86)-                               _lhsOsemDomUnfoldGath =-                                   Map.empty-                           in  ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )--- CProduction --------------------------------------------------{--   visit 0:-      inherited attributes:-         allNts               : Set NontermIdent-         allPragmas           : PragmaMap-         contextMap           : ContextMap-         inh                  : Attributes-         nt                   : NontermIdent-         o_case               : Bool-         o_cata               : Bool-         o_costcentre         : Bool-         o_data               : Maybe Bool-         o_linePragmas        : 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-         paramMap             : ParamMap-         prefix               : String-         syn                  : Attributes-         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type-         with_sig             : Bool-      chained attribute:-         errors               : Seq Error-      synthesized attributes:-         allTpsFound          : Bool-         cataAlt              : Decl-         comments             : [String]-         dataAlt              : DataAlt-         decls                : Decls-         semNames             : [String]-   alternatives:-      alternative CProduction:-         child con            : {ConstructorIdent}-         child visits         : CVisits -         child children       : {[(Identifier,Type,Bool)]}-         child terminals      : {[Identifier]}-         visit 0:-            local paramInstMap : _-            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 ->-                                        ContextMap ->-                                        (Seq Error) ->-                                        Attributes ->-                                        NontermIdent ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        (Maybe Bool) ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        ParamMap ->-                                        String ->-                                        Attributes ->-                                        (NontermIdent -> Int -> [String] -> Code.Type) ->-                                        Bool ->-                                        ( Bool,Decl,([String]),DataAlt,Decls,(Seq Error),([String])))-data Inh_CProduction  = Inh_CProduction {allNts_Inh_CProduction :: !(Set NontermIdent),allPragmas_Inh_CProduction :: !(PragmaMap),contextMap_Inh_CProduction :: !(ContextMap),errors_Inh_CProduction :: !(Seq Error),inh_Inh_CProduction :: !(Attributes),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_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),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 {allTpsFound_Syn_CProduction :: !(Bool),cataAlt_Syn_CProduction :: !(Decl),comments_Syn_CProduction :: !([String]),dataAlt_Syn_CProduction :: !(DataAlt),decls_Syn_CProduction :: !(Decls),errors_Syn_CProduction :: !(Seq Error),semNames_Syn_CProduction :: !([String])}-wrap_CProduction :: T_CProduction  ->-                    Inh_CProduction  ->-                    Syn_CProduction -wrap_CProduction (T_CProduction sem ) (Inh_CProduction _lhsIallNts _lhsIallPragmas _lhsIcontextMap _lhsIerrors _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )  =-    (let ( _lhsOallTpsFound,_lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOerrors,_lhsOsemNames) =-             (sem _lhsIallNts _lhsIallPragmas _lhsIcontextMap _lhsIerrors _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )-     in  (Syn_CProduction _lhsOallTpsFound _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOerrors _lhsOsemNames ))-sem_CProduction_CProduction :: ConstructorIdent ->-                               T_CVisits  ->-                               ([(Identifier,Type,Bool)]) ->-                               ([Identifier]) ->-                               T_CProduction -sem_CProduction_CProduction con_ (T_CVisits visits_ ) children_ terminals_  =-    (T_CProduction (\ _lhsIallNts-                      _lhsIallPragmas-                      _lhsIcontextMap-                      _lhsIerrors-                      _lhsIinh-                      _lhsInt-                      _lhsIo_case-                      _lhsIo_cata-                      _lhsIo_costcentre-                      _lhsIo_data-                      _lhsIo_linePragmas-                      _lhsIo_newtypes-                      _lhsIo_pretty-                      _lhsIo_rename-                      _lhsIo_sem-                      _lhsIo_sig-                      _lhsIo_splitsems-                      _lhsIo_strictwrap-                      _lhsIo_traces-                      _lhsIo_unbox-                      _lhsIparamMap-                      _lhsIprefix-                      _lhsIsyn-                      _lhsIunfoldSemDom-                      _lhsIwith_sig ->-                        (let _visitsOcon :: ConstructorIdent-                             _visitsOterminals :: ([Identifier])-                             _visitsOnr :: Int-                             _visitsOchildren :: ([(Identifier,Type,Bool)])-                             _visitsOinstVisitNrs :: (Map Identifier Int)-                             _lhsOcomments :: ([String])-                             _lhsOdataAlt :: DataAlt-                             _lhsOcataAlt :: Decl-                             _lhsOallTpsFound :: Bool-                             _lhsOdecls :: Decls-                             _lhsOerrors :: (Seq Error)-                             _lhsOsemNames :: ([String])-                             _visitsOallNts :: (Set NontermIdent)-                             _visitsOallPragmas :: PragmaMap-                             _visitsOcontextMap :: ContextMap-                             _visitsOerrors :: (Seq Error)-                             _visitsOinh :: Attributes-                             _visitsOnt :: NontermIdent-                             _visitsOo_case :: Bool-                             _visitsOo_cata :: Bool-                             _visitsOo_costcentre :: Bool-                             _visitsOo_data :: (Maybe Bool)-                             _visitsOo_linePragmas :: 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-                             _visitsOparamInstMap :: (Map Identifier (NontermIdent, [String]))-                             _visitsOparamMap :: ParamMap-                             _visitsOprefix :: String-                             _visitsOsyn :: Attributes-                             _visitsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                             _visitsOwith_sig :: Bool-                             _visitsIallTpsFound :: Bool-                             _visitsIcomments :: ([String])-                             _visitsIdecls :: Decls-                             _visitsIerrors :: (Seq Error)-                             _visitsIgatherInstVisitNrs :: (Map Identifier Int)-                             _visitsIintra :: Exprs-                             _visitsIintraVars :: (Set String)-                             _visitsIisNil :: Bool-                             _visitsIsemNames :: ([String])-                             -- "GenerateCode.ag"(line 85, column 19)-                             _visitsOcon =-                                 con_-                             -- "GenerateCode.ag"(line 86, column 20)-                             _visitsOterminals =-                                 terminals_-                             -- "GenerateCode.ag"(line 98, column 7)-                             _paramInstMap =-                                 Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- children_, let tps = map cleanupArg $ nontermArgs tp, not (null tps) ]-                             -- "GenerateCode.ag"(line 224, column 18)-                             _visitsOnr =-                                 0-                             -- "GenerateCode.ag"(line 350, column 18)-                             _visitsOchildren =-                                 children_-                             -- "GenerateCode.ag"(line 460, column 7)-                             _visitsOinstVisitNrs =-                                 _visitsIgatherInstVisitNrs-                             -- "GenerateCode.ag"(line 759, column 17)-                             _firstOrderChildren =-                                 filter (\(_,_,ho) -> not ho) children_-                             -- "GenerateCode.ag"(line 760, column 18)-                             _lhsOcomments =-                                 ("alternative " ++ getName con_ ++ ":")-                                 : map ind (  map (\(x,y,_) -> makeLocalComment 14 "child" x (Just y)) _firstOrderChildren-                                           ++ _visitsIcomments-                                           )-                             -- "GenerateCode.ag"(line 879, column 17)-                             _params =-                                 map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap-                             -- "GenerateCode.ag"(line 880, column 17)-                             _lhsOdataAlt =-                                 DataAlt (conname _lhsIo_rename _lhsInt con_) (map (\(_,t,_) -> typeToHaskellString (Just _lhsInt) _params     t) _firstOrderChildren    )-                             -- "GenerateCode.ag"(line 979, column 17)-                             _lhsOcataAlt =-                                 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-                             -- use rule "GenerateCode.ag"(line 716, column 39)-                             _lhsOallTpsFound =-                                 _visitsIallTpsFound-                             -- use rule "GenerateCode.ag"(line 791, column 44)-                             _lhsOdecls =-                                 _visitsIdecls-                             -- use rule "GenerateCode.ag"(line 729, column 32)-                             _lhsOerrors =-                                 _visitsIerrors-                             -- use rule "GenerateCode.ag"(line 995, column 61)-                             _lhsOsemNames =-                                 _visitsIsemNames-                             -- copy rule (down)-                             _visitsOallNts =-                                 _lhsIallNts-                             -- copy rule (down)-                             _visitsOallPragmas =-                                 _lhsIallPragmas-                             -- copy rule (down)-                             _visitsOcontextMap =-                                 _lhsIcontextMap-                             -- copy rule (down)-                             _visitsOerrors =-                                 _lhsIerrors-                             -- copy rule (down)-                             _visitsOinh =-                                 _lhsIinh-                             -- copy rule (down)-                             _visitsOnt =-                                 _lhsInt-                             -- copy rule (down)-                             _visitsOo_case =-                                 _lhsIo_case-                             -- copy rule (down)-                             _visitsOo_cata =-                                 _lhsIo_cata-                             -- copy rule (down)-                             _visitsOo_costcentre =-                                 _lhsIo_costcentre-                             -- copy rule (down)-                             _visitsOo_data =-                                 _lhsIo_data-                             -- copy rule (down)-                             _visitsOo_linePragmas =-                                 _lhsIo_linePragmas-                             -- copy rule (down)-                             _visitsOo_newtypes =-                                 _lhsIo_newtypes-                             -- copy rule (down)-                             _visitsOo_pretty =-                                 _lhsIo_pretty-                             -- copy rule (down)-                             _visitsOo_rename =-                                 _lhsIo_rename-                             -- copy rule (down)-                             _visitsOo_sem =-                                 _lhsIo_sem-                             -- copy rule (down)-                             _visitsOo_sig =-                                 _lhsIo_sig-                             -- copy rule (down)-                             _visitsOo_splitsems =-                                 _lhsIo_splitsems-                             -- copy rule (down)-                             _visitsOo_strictwrap =-                                 _lhsIo_strictwrap-                             -- copy rule (down)-                             _visitsOo_traces =-                                 _lhsIo_traces-                             -- copy rule (down)-                             _visitsOo_unbox =-                                 _lhsIo_unbox-                             -- copy rule (from local)-                             _visitsOparamInstMap =-                                 _paramInstMap-                             -- copy rule (down)-                             _visitsOparamMap =-                                 _lhsIparamMap-                             -- copy rule (down)-                             _visitsOprefix =-                                 _lhsIprefix-                             -- copy rule (down)-                             _visitsOsyn =-                                 _lhsIsyn-                             -- copy rule (down)-                             _visitsOunfoldSemDom =-                                 _lhsIunfoldSemDom-                             -- copy rule (down)-                             _visitsOwith_sig =-                                 _lhsIwith_sig-                             ( _visitsIallTpsFound,_visitsIcomments,_visitsIdecls,_visitsIerrors,_visitsIgatherInstVisitNrs,_visitsIintra,_visitsIintraVars,_visitsIisNil,_visitsIsemNames) =-                                 (visits_ _visitsOallNts _visitsOallPragmas _visitsOchildren _visitsOcon _visitsOcontextMap _visitsOerrors _visitsOinh _visitsOinstVisitNrs _visitsOnr _visitsOnt _visitsOo_case _visitsOo_cata _visitsOo_costcentre _visitsOo_data _visitsOo_linePragmas _visitsOo_newtypes _visitsOo_pretty _visitsOo_rename _visitsOo_sem _visitsOo_sig _visitsOo_splitsems _visitsOo_strictwrap _visitsOo_traces _visitsOo_unbox _visitsOparamInstMap _visitsOparamMap _visitsOprefix _visitsOsyn _visitsOterminals _visitsOunfoldSemDom _visitsOwith_sig )-                         in  ( _lhsOallTpsFound,_lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOerrors,_lhsOsemNames))) )--- CProductions -------------------------------------------------{--   visit 0:-      inherited attributes:-         allNts               : Set NontermIdent-         allPragmas           : PragmaMap-         contextMap           : ContextMap-         inh                  : Attributes-         nt                   : NontermIdent-         o_case               : Bool-         o_cata               : Bool-         o_costcentre         : Bool-         o_data               : Maybe Bool-         o_linePragmas        : 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-         paramMap             : ParamMap-         prefix               : String-         syn                  : Attributes-         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type-         with_sig             : Bool-      chained attribute:-         errors               : Seq Error-      synthesized attributes:-         allTpsFound          : Bool-         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 ->-                                          ContextMap ->-                                          (Seq Error) ->-                                          Attributes ->-                                          NontermIdent ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          (Maybe Bool) ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          ParamMap ->-                                          String ->-                                          Attributes ->-                                          (NontermIdent -> Int -> [String] -> Code.Type) ->-                                          Bool ->-                                          ( Bool,Decls,([String]),DataAlts,Decls,(Seq Error),([String])))-data Inh_CProductions  = Inh_CProductions {allNts_Inh_CProductions :: !(Set NontermIdent),allPragmas_Inh_CProductions :: !(PragmaMap),contextMap_Inh_CProductions :: !(ContextMap),errors_Inh_CProductions :: !(Seq Error),inh_Inh_CProductions :: !(Attributes),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_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),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 {allTpsFound_Syn_CProductions :: !(Bool),cataAlts_Syn_CProductions :: !(Decls),comments_Syn_CProductions :: !([String]),dataAlts_Syn_CProductions :: !(DataAlts),decls_Syn_CProductions :: !(Decls),errors_Syn_CProductions :: !(Seq Error),semNames_Syn_CProductions :: !([String])}-wrap_CProductions :: T_CProductions  ->-                     Inh_CProductions  ->-                     Syn_CProductions -wrap_CProductions (T_CProductions sem ) (Inh_CProductions _lhsIallNts _lhsIallPragmas _lhsIcontextMap _lhsIerrors _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )  =-    (let ( _lhsOallTpsFound,_lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOerrors,_lhsOsemNames) =-             (sem _lhsIallNts _lhsIallPragmas _lhsIcontextMap _lhsIerrors _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )-     in  (Syn_CProductions _lhsOallTpsFound _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOerrors _lhsOsemNames ))-sem_CProductions_Cons :: T_CProduction  ->-                         T_CProductions  ->-                         T_CProductions -sem_CProductions_Cons (T_CProduction hd_ ) (T_CProductions tl_ )  =-    (T_CProductions (\ _lhsIallNts-                       _lhsIallPragmas-                       _lhsIcontextMap-                       _lhsIerrors-                       _lhsIinh-                       _lhsInt-                       _lhsIo_case-                       _lhsIo_cata-                       _lhsIo_costcentre-                       _lhsIo_data-                       _lhsIo_linePragmas-                       _lhsIo_newtypes-                       _lhsIo_pretty-                       _lhsIo_rename-                       _lhsIo_sem-                       _lhsIo_sig-                       _lhsIo_splitsems-                       _lhsIo_strictwrap-                       _lhsIo_traces-                       _lhsIo_unbox-                       _lhsIparamMap-                       _lhsIprefix-                       _lhsIsyn-                       _lhsIunfoldSemDom-                       _lhsIwith_sig ->-                         (let _lhsOdataAlts :: DataAlts-                              _lhsOcataAlts :: Decls-                              _lhsOallTpsFound :: Bool-                              _lhsOcomments :: ([String])-                              _lhsOdecls :: Decls-                              _lhsOerrors :: (Seq Error)-                              _lhsOsemNames :: ([String])-                              _hdOallNts :: (Set NontermIdent)-                              _hdOallPragmas :: PragmaMap-                              _hdOcontextMap :: ContextMap-                              _hdOerrors :: (Seq Error)-                              _hdOinh :: Attributes-                              _hdOnt :: NontermIdent-                              _hdOo_case :: Bool-                              _hdOo_cata :: Bool-                              _hdOo_costcentre :: Bool-                              _hdOo_data :: (Maybe Bool)-                              _hdOo_linePragmas :: 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-                              _hdOparamMap :: ParamMap-                              _hdOprefix :: String-                              _hdOsyn :: Attributes-                              _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                              _hdOwith_sig :: Bool-                              _tlOallNts :: (Set NontermIdent)-                              _tlOallPragmas :: PragmaMap-                              _tlOcontextMap :: ContextMap-                              _tlOerrors :: (Seq Error)-                              _tlOinh :: Attributes-                              _tlOnt :: NontermIdent-                              _tlOo_case :: Bool-                              _tlOo_cata :: Bool-                              _tlOo_costcentre :: Bool-                              _tlOo_data :: (Maybe Bool)-                              _tlOo_linePragmas :: 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-                              _tlOparamMap :: ParamMap-                              _tlOprefix :: String-                              _tlOsyn :: Attributes-                              _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                              _tlOwith_sig :: Bool-                              _hdIallTpsFound :: Bool-                              _hdIcataAlt :: Decl-                              _hdIcomments :: ([String])-                              _hdIdataAlt :: DataAlt-                              _hdIdecls :: Decls-                              _hdIerrors :: (Seq Error)-                              _hdIsemNames :: ([String])-                              _tlIallTpsFound :: Bool-                              _tlIcataAlts :: Decls-                              _tlIcomments :: ([String])-                              _tlIdataAlts :: DataAlts-                              _tlIdecls :: Decls-                              _tlIerrors :: (Seq Error)-                              _tlIsemNames :: ([String])-                              -- "GenerateCode.ag"(line 875, column 17)-                              _lhsOdataAlts =-                                  _hdIdataAlt : _tlIdataAlts-                              -- "GenerateCode.ag"(line 975, column 10)-                              _lhsOcataAlts =-                                  _hdIcataAlt : _tlIcataAlts-                              -- use rule "GenerateCode.ag"(line 716, column 39)-                              _lhsOallTpsFound =-                                  _hdIallTpsFound && _tlIallTpsFound-                              -- use rule "GenerateCode.ag"(line 748, column 52)-                              _lhsOcomments =-                                  _hdIcomments ++ _tlIcomments-                              -- use rule "GenerateCode.ag"(line 791, column 44)-                              _lhsOdecls =-                                  _hdIdecls ++ _tlIdecls-                              -- use rule "GenerateCode.ag"(line 729, column 32)-                              _lhsOerrors =-                                  _hdIerrors Seq.>< _tlIerrors-                              -- use rule "GenerateCode.ag"(line 995, column 61)-                              _lhsOsemNames =-                                  _hdIsemNames ++ _tlIsemNames-                              -- copy rule (down)-                              _hdOallNts =-                                  _lhsIallNts-                              -- copy rule (down)-                              _hdOallPragmas =-                                  _lhsIallPragmas-                              -- copy rule (down)-                              _hdOcontextMap =-                                  _lhsIcontextMap-                              -- copy rule (down)-                              _hdOerrors =-                                  _lhsIerrors-                              -- copy rule (down)-                              _hdOinh =-                                  _lhsIinh-                              -- copy rule (down)-                              _hdOnt =-                                  _lhsInt-                              -- copy rule (down)-                              _hdOo_case =-                                  _lhsIo_case-                              -- copy rule (down)-                              _hdOo_cata =-                                  _lhsIo_cata-                              -- copy rule (down)-                              _hdOo_costcentre =-                                  _lhsIo_costcentre-                              -- copy rule (down)-                              _hdOo_data =-                                  _lhsIo_data-                              -- copy rule (down)-                              _hdOo_linePragmas =-                                  _lhsIo_linePragmas-                              -- copy rule (down)-                              _hdOo_newtypes =-                                  _lhsIo_newtypes-                              -- copy rule (down)-                              _hdOo_pretty =-                                  _lhsIo_pretty-                              -- copy rule (down)-                              _hdOo_rename =-                                  _lhsIo_rename-                              -- copy rule (down)-                              _hdOo_sem =-                                  _lhsIo_sem-                              -- copy rule (down)-                              _hdOo_sig =-                                  _lhsIo_sig-                              -- copy rule (down)-                              _hdOo_splitsems =-                                  _lhsIo_splitsems-                              -- copy rule (down)-                              _hdOo_strictwrap =-                                  _lhsIo_strictwrap-                              -- copy rule (down)-                              _hdOo_traces =-                                  _lhsIo_traces-                              -- copy rule (down)-                              _hdOo_unbox =-                                  _lhsIo_unbox-                              -- copy rule (down)-                              _hdOparamMap =-                                  _lhsIparamMap-                              -- copy rule (down)-                              _hdOprefix =-                                  _lhsIprefix-                              -- copy rule (down)-                              _hdOsyn =-                                  _lhsIsyn-                              -- copy rule (down)-                              _hdOunfoldSemDom =-                                  _lhsIunfoldSemDom-                              -- copy rule (down)-                              _hdOwith_sig =-                                  _lhsIwith_sig-                              -- copy rule (down)-                              _tlOallNts =-                                  _lhsIallNts-                              -- copy rule (down)-                              _tlOallPragmas =-                                  _lhsIallPragmas-                              -- copy rule (down)-                              _tlOcontextMap =-                                  _lhsIcontextMap-                              -- copy rule (chain)-                              _tlOerrors =-                                  _hdIerrors-                              -- copy rule (down)-                              _tlOinh =-                                  _lhsIinh-                              -- copy rule (down)-                              _tlOnt =-                                  _lhsInt-                              -- copy rule (down)-                              _tlOo_case =-                                  _lhsIo_case-                              -- copy rule (down)-                              _tlOo_cata =-                                  _lhsIo_cata-                              -- copy rule (down)-                              _tlOo_costcentre =-                                  _lhsIo_costcentre-                              -- copy rule (down)-                              _tlOo_data =-                                  _lhsIo_data-                              -- copy rule (down)-                              _tlOo_linePragmas =-                                  _lhsIo_linePragmas-                              -- copy rule (down)-                              _tlOo_newtypes =-                                  _lhsIo_newtypes-                              -- copy rule (down)-                              _tlOo_pretty =-                                  _lhsIo_pretty-                              -- copy rule (down)-                              _tlOo_rename =-                                  _lhsIo_rename-                              -- copy rule (down)-                              _tlOo_sem =-                                  _lhsIo_sem-                              -- copy rule (down)-                              _tlOo_sig =-                                  _lhsIo_sig-                              -- copy rule (down)-                              _tlOo_splitsems =-                                  _lhsIo_splitsems-                              -- copy rule (down)-                              _tlOo_strictwrap =-                                  _lhsIo_strictwrap-                              -- copy rule (down)-                              _tlOo_traces =-                                  _lhsIo_traces-                              -- copy rule (down)-                              _tlOo_unbox =-                                  _lhsIo_unbox-                              -- copy rule (down)-                              _tlOparamMap =-                                  _lhsIparamMap-                              -- copy rule (down)-                              _tlOprefix =-                                  _lhsIprefix-                              -- copy rule (down)-                              _tlOsyn =-                                  _lhsIsyn-                              -- copy rule (down)-                              _tlOunfoldSemDom =-                                  _lhsIunfoldSemDom-                              -- copy rule (down)-                              _tlOwith_sig =-                                  _lhsIwith_sig-                              ( _hdIallTpsFound,_hdIcataAlt,_hdIcomments,_hdIdataAlt,_hdIdecls,_hdIerrors,_hdIsemNames) =-                                  (hd_ _hdOallNts _hdOallPragmas _hdOcontextMap _hdOerrors _hdOinh _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamMap _hdOprefix _hdOsyn _hdOunfoldSemDom _hdOwith_sig )-                              ( _tlIallTpsFound,_tlIcataAlts,_tlIcomments,_tlIdataAlts,_tlIdecls,_tlIerrors,_tlIsemNames) =-                                  (tl_ _tlOallNts _tlOallPragmas _tlOcontextMap _tlOerrors _tlOinh _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOparamMap _tlOprefix _tlOsyn _tlOunfoldSemDom _tlOwith_sig )-                          in  ( _lhsOallTpsFound,_lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOerrors,_lhsOsemNames))) )-sem_CProductions_Nil :: T_CProductions -sem_CProductions_Nil  =-    (T_CProductions (\ _lhsIallNts-                       _lhsIallPragmas-                       _lhsIcontextMap-                       _lhsIerrors-                       _lhsIinh-                       _lhsInt-                       _lhsIo_case-                       _lhsIo_cata-                       _lhsIo_costcentre-                       _lhsIo_data-                       _lhsIo_linePragmas-                       _lhsIo_newtypes-                       _lhsIo_pretty-                       _lhsIo_rename-                       _lhsIo_sem-                       _lhsIo_sig-                       _lhsIo_splitsems-                       _lhsIo_strictwrap-                       _lhsIo_traces-                       _lhsIo_unbox-                       _lhsIparamMap-                       _lhsIprefix-                       _lhsIsyn-                       _lhsIunfoldSemDom-                       _lhsIwith_sig ->-                         (let _lhsOdataAlts :: DataAlts-                              _lhsOcataAlts :: Decls-                              _lhsOallTpsFound :: Bool-                              _lhsOcomments :: ([String])-                              _lhsOdecls :: Decls-                              _lhsOerrors :: (Seq Error)-                              _lhsOsemNames :: ([String])-                              -- "GenerateCode.ag"(line 876, column 17)-                              _lhsOdataAlts =-                                  []-                              -- "GenerateCode.ag"(line 976, column 10)-                              _lhsOcataAlts =-                                  []-                              -- use rule "GenerateCode.ag"(line 716, column 39)-                              _lhsOallTpsFound =-                                  True-                              -- use rule "GenerateCode.ag"(line 748, column 52)-                              _lhsOcomments =-                                  []-                              -- use rule "GenerateCode.ag"(line 791, column 44)-                              _lhsOdecls =-                                  []-                              -- use rule "GenerateCode.ag"(line 729, column 32)-                              _lhsOerrors =-                                  Seq.empty-                              -- use rule "GenerateCode.ag"(line 995, column 61)-                              _lhsOsemNames =-                                  []-                          in  ( _lhsOallTpsFound,_lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOerrors,_lhsOsemNames))) )--- CRule --------------------------------------------------------{--   visit 0:-      inherited attributes:-         allNts               : Set NontermIdent-         children             : [(Identifier,Type,Bool)]-         con                  : ConstructorIdent-         higherOrderChildren  : [(Identifier,Type,Bool)]-         inh                  : Attributes-         instVisitNrs         : Map Identifier Int-         nr                   : Int-         nt                   : NontermIdent-         o_case               : Bool-         o_cata               : Bool-         o_costcentre         : Bool-         o_data               : Maybe Bool-         o_linePragmas        : 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-         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]-         errors               : Seq Error-      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 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)}-         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 )  =-    (sem_CRule_CRule _name _isIn _hasCode _nt _con _field _childnt _tp (sem_Pattern _pattern ) _rhs _defines _owrt _origin _uses )--- semantic domain-newtype T_CRule  = T_CRule ((Set NontermIdent) ->-                            ([(Identifier,Type,Bool)]) ->-                            ConstructorIdent ->-                            ([Decl]) ->-                            (Seq Error) ->-                            ([(Identifier,Type,Bool)]) ->-                            Attributes ->-                            (Map Identifier Int) ->-                            Int ->-                            NontermIdent ->-                            Bool ->-                            Bool ->-                            Bool ->-                            (Maybe Bool) ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            (Map Identifier (NontermIdent, [String])) ->-                            ParamMap ->-                            String ->-                            Attributes ->-                            ([Identifier]) ->-                            (NontermIdent -> Int -> [String] -> Code.Type) ->-                            String ->-                            ( Bool,(DeclBlocks -> DeclBlocks),([String]),Decls,([Decl]),([Identifier]),(Seq Error),Exprs,([Decl]),([Type]),(Set String)))-data Inh_CRule  = Inh_CRule {allNts_Inh_CRule :: !(Set NontermIdent),children_Inh_CRule :: !([(Identifier,Type,Bool)]),con_Inh_CRule :: !(ConstructorIdent),declsAbove_Inh_CRule :: !([Decl]),errors_Inh_CRule :: !(Seq Error),higherOrderChildren_Inh_CRule :: !([(Identifier,Type,Bool)]),inh_Inh_CRule :: !(Attributes),instVisitNrs_Inh_CRule :: !(Map Identifier Int),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_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),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),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]),errors_Syn_CRule :: !(Seq Error),exprs_Syn_CRule :: !(Exprs),tSigs_Syn_CRule :: !([Decl]),tps_Syn_CRule :: !([Type]),usedVars_Syn_CRule :: !(Set String)}-wrap_CRule :: T_CRule  ->-              Inh_CRule  ->-              Syn_CRule -wrap_CRule (T_CRule sem ) (Inh_CRule _lhsIallNts _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIerrors _lhsIhigherOrderChildren _lhsIinh _lhsIinstVisitNrs _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwhat )  =-    (let ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars) =-             (sem _lhsIallNts _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIerrors _lhsIhigherOrderChildren _lhsIinh _lhsIinstVisitNrs _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwhat )-     in  (Syn_CRule _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOerrors _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars ))-sem_CRule_CChildVisit :: Identifier ->-                         NontermIdent ->-                         Int ->-                         Attributes ->-                         Attributes ->-                         Bool ->-                         T_CRule -sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_  =-    (T_CRule (\ _lhsIallNts-                _lhsIchildren-                _lhsIcon-                _lhsIdeclsAbove-                _lhsIerrors-                _lhsIhigherOrderChildren-                _lhsIinh-                _lhsIinstVisitNrs-                _lhsInr-                _lhsInt-                _lhsIo_case-                _lhsIo_cata-                _lhsIo_costcentre-                _lhsIo_data-                _lhsIo_linePragmas-                _lhsIo_newtypes-                _lhsIo_pretty-                _lhsIo_rename-                _lhsIo_sem-                _lhsIo_sig-                _lhsIo_splitsems-                _lhsIo_strictwrap-                _lhsIo_traces-                _lhsIo_unbox-                _lhsIparamInstMap-                _lhsIparamMap-                _lhsIprefix-                _lhsIsyn-                _lhsIterminals-                _lhsIunfoldSemDom-                _lhsIwhat ->-                  (let _lhsOexprs :: Exprs-                       _lhsOusedVars :: (Set String)-                       _lhsOtSigs :: ([Decl])-                       _lhsOtps :: ([Type])-                       _lhsOdeclsAbove :: ([Decl])-                       _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)-                       _lhsOallTpsFound :: Bool-                       _lhsOcomments :: ([String])-                       _lhsOdecls :: Decls-                       _lhsOdefinedInsts :: ([Identifier])-                       _lhsOerrors :: (Seq Error)-                       -- "GenerateCode.ag"(line 182, column 18)-                       _costCentreDescr =-                           show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show name_ ++ ":" ++ show nt_ ++ ":" ++ show nr_-                       -- "GenerateCode.ag"(line 183, column 18)-                       _addCostCentre =-                           \v -> if _lhsIo_costcentre-                                 then PragmaExpr True False ("SCC \"" ++ _costCentreDescr     ++ "\"") v-                                 else v-                       -- "GenerateCode.ag"(line 186, column 18)-                       _decls =-                           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 = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars-                                rhs = _addCostCentre     $ App (funname name_ nr_) (map SimpleExpr rhsVars)-                           in [Decl tuple rhs (Set.fromList lhsVars) (Set.fromList (funname name_ nr_ : rhsVars))]-                       -- "GenerateCode.ag"(line 271, column 7)-                       _isSuperfluousHigherOrderIntra =-                           _lhsInr <= Map.findWithDefault (-1) name_ _lhsIinstVisitNrs-                       -- "GenerateCode.ag"(line 285, column 8)-                       _names =-                           if _isSuperfluousHigherOrderIntra-                           then []-                           else [funname name_ (nr_+1)]-                       -- "GenerateCode.ag"(line 289, column 8)-                       _lhsOexprs =-                           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-                       -- "GenerateCode.ag"(line 301, column 7)-                       _lhsOusedVars =-                           Set.fromList _names-                       -- "GenerateCode.ag"(line 325, column 19)-                       _mkTp =-                           _evalTp     . SimpleType . typeToHaskellString (Just nt_) _orgParams-                       -- "GenerateCode.ag"(line 326, column 19)-                       _definedTps =-                           [ TSig (attrname True name_ a) (_mkTp tp) |  (a,tp) <- Map.toList syn_ ]-                       -- "GenerateCode.ag"(line 327, column 19)-                       _nextTp =-                           typeName nt_ (nr_+1)-                       -- "GenerateCode.ag"(line 328, column 19)-                       _lhsOtSigs =-                           (if isLast_ then id else (TSig (funname name_ (nr_+1)) (TypeApp (SimpleType _nextTp) (map SimpleType _instParams    )) :)) _definedTps-                       -- "GenerateCode.ag"(line 330, column 19)-                       _orgParams =-                           map getName $ Map.findWithDefault [] nt_ _lhsIparamMap-                       -- "GenerateCode.ag"(line 331, column 19)-                       _instParams =-                           snd $ Map.findWithDefault (nt_,[]) name_ _lhsIparamInstMap-                       -- "GenerateCode.ag"(line 332, column 19)-                       _replParamMap =-                           Map.fromList (zip _orgParams     _instParams    )-                       -- "GenerateCode.ag"(line 333, column 19)-                       _replace =-                           \k -> Map.findWithDefault k k _replParamMap-                       -- "GenerateCode.ag"(line 334, column 19)-                       _evalTp =-                           if null _orgParams     then id else evalType _replace-                       -- "GenerateCode.ag"(line 357, column 19)-                       _lhsOtps =-                           if _isSuperfluousHigherOrderIntra-                           then []-                           else [NT (ntOfVisit nt_ (nr_+1)) _instParams    ]-                       -- "GenerateCode.ag"(line 482, column 7)-                       _lhsOdeclsAbove =-                           []-                       -- "GenerateCode.ag"(line 495, column 7)-                       _lhsObldBlocksFun =-                           DeclBlock _lhsIdeclsAbove (head _decls    )-                       -- use rule "GenerateCode.ag"(line 354, column 39)-                       _lhsOallTpsFound =-                           True-                       -- use rule "GenerateCode.ag"(line 748, column 52)-                       _lhsOcomments =-                           []-                       -- use rule "GenerateCode.ag"(line 138, column 34)-                       _lhsOdecls =-                           _decls-                       -- use rule "GenerateCode.ag"(line 205, column 55)-                       _lhsOdefinedInsts =-                           []-                       -- use rule "GenerateCode.ag"(line 729, column 32)-                       _lhsOerrors =-                           Seq.empty-                   in  ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars))) )-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)) ->-                   T_CRule -sem_CRule_CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ (T_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_  =-    (T_CRule (\ _lhsIallNts-                _lhsIchildren-                _lhsIcon-                _lhsIdeclsAbove-                _lhsIerrors-                _lhsIhigherOrderChildren-                _lhsIinh-                _lhsIinstVisitNrs-                _lhsInr-                _lhsInt-                _lhsIo_case-                _lhsIo_cata-                _lhsIo_costcentre-                _lhsIo_data-                _lhsIo_linePragmas-                _lhsIo_newtypes-                _lhsIo_pretty-                _lhsIo_rename-                _lhsIo_sem-                _lhsIo_sig-                _lhsIo_splitsems-                _lhsIo_strictwrap-                _lhsIo_traces-                _lhsIo_unbox-                _lhsIparamInstMap-                _lhsIparamMap-                _lhsIprefix-                _lhsIsyn-                _lhsIterminals-                _lhsIunfoldSemDom-                _lhsIwhat ->-                  (let _lhsOexprs :: Exprs-                       _lhsOusedVars :: (Set String)-                       _lhsOtSigs :: ([Decl])-                       __tup3 :: (([Type],Bool))-                       _lhsOtps :: ([Type])-                       _lhsOallTpsFound :: Bool-                       _lhsOdeclsAbove :: ([Decl])-                       _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)-                       _lhsOerrors :: (Seq Error)-                       _lhsOcomments :: ([String])-                       _lhsOdecls :: Decls-                       _lhsOdefinedInsts :: ([Identifier])-                       _patternIcopy :: Pattern-                       _patternIdefinedInsts :: ([Identifier])-                       _patternIpatternAttributes :: ([(Identifier, Identifier)])-                       -- "GenerateCode.ag"(line 140, column 12)-                       _instTypes =-                           map (\(n,NT t _,_) -> (n,t)) _lhsIhigherOrderChildren-                       -- "GenerateCode.ag"(line 141, column 12)-                       _originComment =-                           if  _lhsIo_pretty-                               then (Comment origin_:)-                               else id-                       -- "GenerateCode.ag"(line 144, column 12)-                       _instDecls =-                           [ Decl (Pattern3 (Alias _INST' inst (Underscore (getPos inst)) []))-                                  ( let nm = fromJust $ inst `lookup` _instTypes-                                    in unwrapSem _lhsIo_newtypes (maybe nm id (deforestedNt nm))-                                       $ 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-                           , let instSemFieldName = attrname False _INST' inst ]-                       -- "GenerateCode.ag"(line 157, column 12)-                       _patDescr =-                           if isIn_-                           then "_"-                           else concat $ intersperse "," (map (\(f,a) -> show f ++ "." ++ show a) _patternIpatternAttributes)-                       -- "GenerateCode.ag"(line 160, column 12)-                       _traceDescr =-                           show nt_ ++ " :: " ++ show con_ ++ " :: " ++ _patDescr-                       -- "GenerateCode.ag"(line 162, column 12)-                       _addTrace =-                           \v -> if _lhsIo_traces-                                 then Trace _traceDescr     v-                                 else v-                       -- "GenerateCode.ag"(line 165, column 12)-                       _costCentreDescr =-                           show nt_ ++ ":" ++ show con_ ++ ":" ++ _patDescr-                       -- "GenerateCode.ag"(line 166, column 12)-                       _addCostCentre =-                           \v -> if _lhsIo_costcentre-                                 then PragmaExpr True False ("SCC \"" ++ _costCentreDescr     ++ "\"") v-                                 else v-                       -- "GenerateCode.ag"(line 169, column 12)-                       _addLinePragma =-                           \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-                       -- "GenerateCode.ag"(line 176, column 12)-                       _decls =-                           if hasCode_-                           then _originComment ( Decl (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-                       -- "GenerateCode.ag"(line 210, column 12)-                       _definedInsts =-                           if isIn_ then [] else _patternIdefinedInsts-                       -- "GenerateCode.ag"(line 280, column 12)-                       _rulename =-                           if  field_ == _LOC && name_ `elem` _lhsIterminals-                           then funname name_ 0-                           else attrname isIn_ field_ name_-                       -- "GenerateCode.ag"(line 283, column 12)-                       _lhsOexprs =-                           [SimpleExpr _rulename    ]-                       -- "GenerateCode.ag"(line 299, column 7)-                       _lhsOusedVars =-                           Set.singleton _rulename-                       -- "GenerateCode.ag"(line 309, column 19)-                       _mkTp =-                           SimpleType . typeToHaskellString (Just _lhsInt) _orgParams-                       -- "GenerateCode.ag"(line 310, column 19)-                       _lhsOtSigs =-                           [ TSig (attrname False field attr) (_evalTp     field $ _mkTp (fromJust tp))-                           |  (field,attr,tp) <- Map.elems defines_, isJust tp ]-                       -- "GenerateCode.ag"(line 313, column 19)-                       _orgParams =-                           map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap-                       -- "GenerateCode.ag"(line 314, column 19)-                       _evalTp =-                           \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-                       -- "GenerateCode.ag"(line 356, column 23)-                       __tup3 =-                           maybe ([],False) (\tp -> ([substSelf (fromJust childnt_) tp],True)) tp_-                       -- "GenerateCode.ag"(line 356, column 23)-                       (_lhsOtps,_) =-                           __tup3-                       -- "GenerateCode.ag"(line 356, column 23)-                       (_,_lhsOallTpsFound) =-                           __tup3-                       -- "GenerateCode.ag"(line 480, column 7)-                       _lhsOdeclsAbove =-                           _lhsIdeclsAbove ++ _decls-                       -- "GenerateCode.ag"(line 493, column 7)-                       _lhsObldBlocksFun =-                           id-                       -- "GenerateCode.ag"(line 735, column 12)-                       _lhsOerrors =-                           let nameOf (Alias _ _ _ pats@(_:_)) = Ident (show (map (\(Alias _ a _ _)->a) pats)) (getPos name_)-                               nameOf _ = name_-                           in  maybe (Seq.singleton (MissingTypeSig _lhsInt _lhsIcon (nameOf _patternIcopy))) (const Seq.empty) tp_-                       -- "GenerateCode.ag"(line 775, column 18)-                       _lhsOcomments =-                           [ 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 ]-                       -- use rule "GenerateCode.ag"(line 138, column 34)-                       _lhsOdecls =-                           _decls-                       -- use rule "GenerateCode.ag"(line 205, column 55)-                       _lhsOdefinedInsts =-                           _definedInsts-                       ( _patternIcopy,_patternIdefinedInsts,_patternIpatternAttributes) =-                           (pattern_ )-                   in  ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars))) )--- 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_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-         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 tp          : _-            local inhTps      : _-            local synTps      : _-            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 ->-                                  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_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),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_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn )  =-    (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) =-             (sem _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _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_newtypes-                   _lhsIo_pretty-                   _lhsIo_rename-                   _lhsIo_sem-                   _lhsIo_sig-                   _lhsIo_splitsems-                   _lhsIo_strictwrap-                   _lhsIo_traces-                   _lhsIo_unbox-                   _lhsIparamMap-                   _lhsIprefix-                   _lhsIsyn ->-                     (let _lhsOsemDom :: ([Decl])-                          _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                          _lhsOwrapDecls :: Decls-                          _lhsOcomments :: ([String])-                          -- "GenerateCode.ag"(line 607, column 15)-                          _tp =-                              foldr Arr _synTps     _inhTps-                          -- "GenerateCode.ag"(line 608, column 15)-                          _inhTps =-                              [SimpleType (typeToHaskellString (Just _lhsInt) _params     tp) |  tp <- Map.elems inh_]-                          -- "GenerateCode.ag"(line 609, column 15)-                          _synTps =-                              mkTupleType _lhsIo_unbox (null _inhTps    ) ([SimpleType (typeToHaskellString (Just _lhsInt) _params     tp) |  tp <- Map.elems syn_] ++ _continuation    )-                          -- "GenerateCode.ag"(line 610, column 15)-                          _continuation =-                              if  _lhsIisLast-                              then []-                              else [TypeApp (SimpleType (typeName _lhsInt (_lhsInr + 1))) (map (SimpleType . ('@':)) _params    )]-                          -- "GenerateCode.ag"(line 613, column 15)-                          _params =-                              map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap-                          -- "GenerateCode.ag"(line 614, column 15)-                          _lhsOsemDom =-                              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    ) ]-                          -- "GenerateCode.ag"(line 625, column 7)-                          _lhsOsemDomUnfoldGath =-                              Map.singleton (_lhsInt, _lhsInr) (_params    , _tp    )-                          -- "GenerateCode.ag"(line 699, column 15)-                          _lhsOwrapDecls =-                              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-                              in [ Decl (mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars) (App (sem _lhsInr) rhs) (Set.fromList lhsVars) (Set.fromList rhsVars) ]-                          -- "GenerateCode.ag"(line 753, column 18)-                          _lhsOcomments =-                              let body = map ind (showsSegment (CSegment inh_ syn_))-                              in if null body-                                 then []-                                 else ("visit " ++ show _lhsInr ++ ":") : body-                      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_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-         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 ->-                                    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_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),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_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn )  =-    (let ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) =-             (sem _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _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_newtypes-                    _lhsIo_pretty-                    _lhsIo_rename-                    _lhsIo_sem-                    _lhsIo_sig-                    _lhsIo_splitsems-                    _lhsIo_strictwrap-                    _lhsIo_traces-                    _lhsIo_unbox-                    _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_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-                           _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_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-                           _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 230, column 11)-                           _tlOnr =-                               _lhsInr + 1-                           -- "GenerateCode.ag"(line 243, column 12)-                           _lhsOisNil =-                               False-                           -- "GenerateCode.ag"(line 244, column 12)-                           _hdOisLast =-                               _tlIisNil-                           -- use rule "GenerateCode.ag"(line 748, column 52)-                           _lhsOcomments =-                               _hdIcomments ++ _tlIcomments-                           -- use rule "GenerateCode.ag"(line 602, column 50)-                           _lhsOsemDom =-                               _hdIsemDom ++ _tlIsemDom-                           -- use rule "GenerateCode.ag"(line 621, column 86)-                           _lhsOsemDomUnfoldGath =-                               _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath-                           -- use rule "GenerateCode.ag"(line 697, column 52)-                           _lhsOwrapDecls =-                               _hdIwrapDecls ++ _tlIwrapDecls-                           -- copy rule (down)-                           _hdOinh =-                               _lhsIinh-                           -- copy rule (down)-                           _hdOnr =-                               _lhsInr-                           -- copy rule (down)-                           _hdOnt =-                               _lhsInt-                           -- copy rule (down)-                           _hdOo_case =-                               _lhsIo_case-                           -- copy rule (down)-                           _hdOo_cata =-                               _lhsIo_cata-                           -- copy rule (down)-                           _hdOo_costcentre =-                               _lhsIo_costcentre-                           -- copy rule (down)-                           _hdOo_data =-                               _lhsIo_data-                           -- copy rule (down)-                           _hdOo_linePragmas =-                               _lhsIo_linePragmas-                           -- copy rule (down)-                           _hdOo_newtypes =-                               _lhsIo_newtypes-                           -- copy rule (down)-                           _hdOo_pretty =-                               _lhsIo_pretty-                           -- copy rule (down)-                           _hdOo_rename =-                               _lhsIo_rename-                           -- copy rule (down)-                           _hdOo_sem =-                               _lhsIo_sem-                           -- copy rule (down)-                           _hdOo_sig =-                               _lhsIo_sig-                           -- copy rule (down)-                           _hdOo_splitsems =-                               _lhsIo_splitsems-                           -- copy rule (down)-                           _hdOo_strictwrap =-                               _lhsIo_strictwrap-                           -- copy rule (down)-                           _hdOo_traces =-                               _lhsIo_traces-                           -- copy rule (down)-                           _hdOo_unbox =-                               _lhsIo_unbox-                           -- copy rule (down)-                           _hdOparamMap =-                               _lhsIparamMap-                           -- copy rule (down)-                           _hdOprefix =-                               _lhsIprefix-                           -- copy rule (down)-                           _hdOsyn =-                               _lhsIsyn-                           -- copy rule (down)-                           _tlOinh =-                               _lhsIinh-                           -- copy rule (down)-                           _tlOnt =-                               _lhsInt-                           -- copy rule (down)-                           _tlOo_case =-                               _lhsIo_case-                           -- copy rule (down)-                           _tlOo_cata =-                               _lhsIo_cata-                           -- copy rule (down)-                           _tlOo_costcentre =-                               _lhsIo_costcentre-                           -- copy rule (down)-                           _tlOo_data =-                               _lhsIo_data-                           -- copy rule (down)-                           _tlOo_linePragmas =-                               _lhsIo_linePragmas-                           -- copy rule (down)-                           _tlOo_newtypes =-                               _lhsIo_newtypes-                           -- copy rule (down)-                           _tlOo_pretty =-                               _lhsIo_pretty-                           -- copy rule (down)-                           _tlOo_rename =-                               _lhsIo_rename-                           -- copy rule (down)-                           _tlOo_sem =-                               _lhsIo_sem-                           -- copy rule (down)-                           _tlOo_sig =-                               _lhsIo_sig-                           -- copy rule (down)-                           _tlOo_splitsems =-                               _lhsIo_splitsems-                           -- copy rule (down)-                           _tlOo_strictwrap =-                               _lhsIo_strictwrap-                           -- copy rule (down)-                           _tlOo_traces =-                               _lhsIo_traces-                           -- copy rule (down)-                           _tlOo_unbox =-                               _lhsIo_unbox-                           -- copy rule (down)-                           _tlOparamMap =-                               _lhsIparamMap-                           -- copy rule (down)-                           _tlOprefix =-                               _lhsIprefix-                           -- copy rule (down)-                           _tlOsyn =-                               _lhsIsyn-                           ( _hdIcomments,_hdIsemDom,_hdIsemDomUnfoldGath,_hdIwrapDecls) =-                               (hd_ _hdOinh _hdOisLast _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamMap _hdOprefix _hdOsyn )-                           ( _tlIcomments,_tlIisNil,_tlIsemDom,_tlIsemDomUnfoldGath,_tlIwrapDecls) =-                               (tl_ _tlOinh _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _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_newtypes-                    _lhsIo_pretty-                    _lhsIo_rename-                    _lhsIo_sem-                    _lhsIo_sig-                    _lhsIo_splitsems-                    _lhsIo_strictwrap-                    _lhsIo_traces-                    _lhsIo_unbox-                    _lhsIparamMap-                    _lhsIprefix-                    _lhsIsyn ->-                      (let _lhsOisNil :: Bool-                           _lhsOcomments :: ([String])-                           _lhsOsemDom :: ([Decl])-                           _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))-                           _lhsOwrapDecls :: Decls-                           -- "GenerateCode.ag"(line 245, column 10)-                           _lhsOisNil =-                               True-                           -- use rule "GenerateCode.ag"(line 748, column 52)-                           _lhsOcomments =-                               []-                           -- use rule "GenerateCode.ag"(line 602, column 50)-                           _lhsOsemDom =-                               []-                           -- use rule "GenerateCode.ag"(line 621, column 86)-                           _lhsOsemDomUnfoldGath =-                               Map.empty-                           -- use rule "GenerateCode.ag"(line 697, column 52)-                           _lhsOwrapDecls =-                               []-                       in  ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )--- CVisit -------------------------------------------------------{--   visit 0:-      inherited attributes:-         allNts               : Set NontermIdent-         allPragmas           : PragmaMap-         children             : [(Identifier,Type,Bool)]-         con                  : ConstructorIdent-         contextMap           : ContextMap-         inh                  : Attributes-         instVisitNrs         : Map Identifier Int-         isLast               : Bool-         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_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-         paramInstMap         : Map Identifier (NontermIdent, [String])-         paramMap             : ParamMap-         prefix               : String-         syn                  : Attributes-         terminals            : [Identifier]-         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type-         with_sig             : Bool-      chained attribute:-         errors               : Seq Error-      synthesized attributes:-         allTpsFound          : Bool-         comments             : [String]-         decls                : Decls-         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 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_case      : _-            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 ->-                              ([(Identifier,Type,Bool)]) ->-                              ConstructorIdent ->-                              ContextMap ->-                              (Seq Error) ->-                              Attributes ->-                              (Map Identifier Int) ->-                              Bool ->-                              Exprs ->-                              (Set String) ->-                              Int ->-                              NontermIdent ->-                              Bool ->-                              Bool ->-                              Bool ->-                              (Maybe Bool) ->-                              Bool ->-                              Bool ->-                              Bool ->-                              Bool ->-                              Bool ->-                              Bool ->-                              Bool ->-                              Bool ->-                              Bool ->-                              Bool ->-                              (Map Identifier (NontermIdent, [String])) ->-                              ParamMap ->-                              String ->-                              Attributes ->-                              ([Identifier]) ->-                              (NontermIdent -> Int -> [String] -> Code.Type) ->-                              Bool ->-                              ( Bool,([String]),Decls,(Seq Error),(Map Identifier Int),Exprs,(Set String),([String])))-data Inh_CVisit  = Inh_CVisit {allNts_Inh_CVisit :: !(Set NontermIdent),allPragmas_Inh_CVisit :: !(PragmaMap),children_Inh_CVisit :: !([(Identifier,Type,Bool)]),con_Inh_CVisit :: !(ConstructorIdent),contextMap_Inh_CVisit :: !(ContextMap),errors_Inh_CVisit :: !(Seq Error),inh_Inh_CVisit :: !(Attributes),instVisitNrs_Inh_CVisit :: !(Map Identifier Int),isLast_Inh_CVisit :: !(Bool),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_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),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),with_sig_Inh_CVisit :: !(Bool)}-data Syn_CVisit  = Syn_CVisit {allTpsFound_Syn_CVisit :: !(Bool),comments_Syn_CVisit :: !([String]),decls_Syn_CVisit :: !(Decls),errors_Syn_CVisit :: !(Seq Error),gatherInstVisitNrs_Syn_CVisit :: !(Map Identifier Int),intra_Syn_CVisit :: !(Exprs),intraVars_Syn_CVisit :: !(Set String),semNames_Syn_CVisit :: !([String])}-wrap_CVisit :: T_CVisit  ->-               Inh_CVisit  ->-               Syn_CVisit -wrap_CVisit (T_CVisit sem ) (Inh_CVisit _lhsIallNts _lhsIallPragmas _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIerrors _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwith_sig )  =-    (let ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames) =-             (sem _lhsIallNts _lhsIallPragmas _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIerrors _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwith_sig )-     in  (Syn_CVisit _lhsOallTpsFound _lhsOcomments _lhsOdecls _lhsOerrors _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames ))-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-                 _lhsIchildren-                 _lhsIcon-                 _lhsIcontextMap-                 _lhsIerrors-                 _lhsIinh-                 _lhsIinstVisitNrs-                 _lhsIisLast-                 _lhsInextIntra-                 _lhsInextIntraVars-                 _lhsInr-                 _lhsInt-                 _lhsIo_case-                 _lhsIo_cata-                 _lhsIo_costcentre-                 _lhsIo_data-                 _lhsIo_linePragmas-                 _lhsIo_newtypes-                 _lhsIo_pretty-                 _lhsIo_rename-                 _lhsIo_sem-                 _lhsIo_sig-                 _lhsIo_splitsems-                 _lhsIo_strictwrap-                 _lhsIo_traces-                 _lhsIo_unbox-                 _lhsIparamInstMap-                 _lhsIparamMap-                 _lhsIprefix-                 _lhsIsyn-                 _lhsIterminals-                 _lhsIunfoldSemDom-                 _lhsIwith_sig ->-                   (let _lhsOintra :: Exprs-                        _lhsOintraVars :: (Set String)-                        _vssOlastExpr :: Expr-                        _intraOlastExpr :: Expr-                        _lhsOdecls :: Decls-                        _lhsOgatherInstVisitNrs :: (Map Identifier Int)-                        _vssOdeclsAbove :: ([Decl])-                        _intraOdeclsAbove :: ([Decl])-                        _lhsOallTpsFound :: Bool-                        _lhsOerrors :: (Seq Error)-                        _lhsOcomments :: ([String])-                        _vssOwhat :: String-                        _intraOwhat :: String-                        _lhsOsemNames :: ([String])-                        _vssOallNts :: (Set NontermIdent)-                        _vssOchildren :: ([(Identifier,Type,Bool)])-                        _vssOcon :: ConstructorIdent-                        _vssOerrors :: (Seq Error)-                        _vssOhigherOrderChildren :: ([(Identifier,Type,Bool)])-                        _vssOinh :: Attributes-                        _vssOinstVisitNrs :: (Map Identifier Int)-                        _vssOnr :: Int-                        _vssOnt :: NontermIdent-                        _vssOo_case :: Bool-                        _vssOo_cata :: Bool-                        _vssOo_costcentre :: Bool-                        _vssOo_data :: (Maybe Bool)-                        _vssOo_linePragmas :: 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-                        _vssOparamInstMap :: (Map Identifier (NontermIdent, [String]))-                        _vssOparamMap :: ParamMap-                        _vssOprefix :: String-                        _vssOsyn :: Attributes-                        _vssOterminals :: ([Identifier])-                        _vssOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                        _intraOallNts :: (Set NontermIdent)-                        _intraOchildren :: ([(Identifier,Type,Bool)])-                        _intraOcon :: ConstructorIdent-                        _intraOerrors :: (Seq Error)-                        _intraOhigherOrderChildren :: ([(Identifier,Type,Bool)])-                        _intraOinh :: Attributes-                        _intraOinstVisitNrs :: (Map Identifier Int)-                        _intraOnr :: Int-                        _intraOnt :: NontermIdent-                        _intraOo_case :: Bool-                        _intraOo_cata :: Bool-                        _intraOo_costcentre :: Bool-                        _intraOo_data :: (Maybe Bool)-                        _intraOo_linePragmas :: 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-                        _intraOparamInstMap :: (Map Identifier (NontermIdent, [String]))-                        _intraOparamMap :: ParamMap-                        _intraOprefix :: String-                        _intraOsyn :: Attributes-                        _intraOterminals :: ([Identifier])-                        _intraOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                        _vssIallTpsFound :: Bool-                        _vssIblockDecls :: DeclBlocks-                        _vssIcomments :: ([String])-                        _vssIdecls :: Decls-                        _vssIdeclsAbove :: ([Decl])-                        _vssIdefinedInsts :: ([Identifier])-                        _vssIerrors :: (Seq Error)-                        _vssIexprs :: Exprs-                        _vssItSigs :: ([Decl])-                        _vssItps :: ([Type])-                        _vssIusedVars :: (Set String)-                        _intraIallTpsFound :: Bool-                        _intraIblockDecls :: DeclBlocks-                        _intraIcomments :: ([String])-                        _intraIdecls :: Decls-                        _intraIdeclsAbove :: ([Decl])-                        _intraIdefinedInsts :: ([Identifier])-                        _intraIerrors :: (Seq Error)-                        _intraIexprs :: Exprs-                        _intraItSigs :: ([Decl])-                        _intraItps :: ([Type])-                        _intraIusedVars :: (Set String)-                        -- "GenerateCode.ag"(line 254, column 13)-                        _lhsOintra =-                            _intraIexprs-                        -- "GenerateCode.ag"(line 255, column 13)-                        _lhsOintraVars =-                            _intraIusedVars-                        -- "GenerateCode.ag"(line 367, column 13)-                        __tup4 =-                            partition (\(_,_,ho) -> ho) _lhsIchildren-                        -- "GenerateCode.ag"(line 367, column 13)-                        (_higherOrderChildren,_) =-                            __tup4-                        -- "GenerateCode.ag"(line 367, column 13)-                        (_,_firstOrderChildren) =-                            __tup4-                        -- "GenerateCode.ag"(line 368, column 13)-                        _funcname =-                            seqSemname _lhsIprefix _lhsInt _lhsIcon _lhsInr-                        -- "GenerateCode.ag"(line 369, column 13)-                        _nextVisitName =-                            if _lhsIisLast then [] else [visitname _lhsIprefix _lhsInt (_lhsInr+1)]-                        -- "GenerateCode.ag"(line 370, column 13)-                        _nextVisitDecl =-                            let  lhs = TupleLhs _nextVisitName-                                 rhs = App fun _lhsInextIntra-                                 fun = seqSemname _lhsIprefix _lhsInt _lhsIcon (_lhsInr+1)-                            in if _lhsIisLast-                               then []-                               else [Decl lhs rhs (Set.fromList _nextVisitName) _lhsInextIntraVars]-                        -- "GenerateCode.ag"(line 376, column 13)-                        _decls =-                            _typeSigs ++ _vssIdecls ++ _nextVisitDecl-                        -- "GenerateCode.ag"(line 377, column 13)-                        _vssOlastExpr =-                            mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_) $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName-                        -- "GenerateCode.ag"(line 378, column 13)-                        _intraOlastExpr =-                            error "lastExpr: not used here"-                        -- "GenerateCode.ag"(line 379, column 13)-                        _lastExprVars =-                            map (lhsname False) (Map.keys syn_) ++ _nextVisitName-                        -- "GenerateCode.ag"(line 380, column 13)-                        __tup5 =-                            mkPartitionedFunction _funcname     _o_case     _nextVisitDecl     _lastExprVars     _vssIblockDecls-                        -- "GenerateCode.ag"(line 380, column 13)-                        (_blockFunDecls,_) =-                            __tup5-                        -- "GenerateCode.ag"(line 380, column 13)-                        (_,_blockFirstFunCall) =-                            __tup5-                        -- "GenerateCode.ag"(line 382, column 13)-                        _costCentreDescr =-                            "b" ++ ":" ++ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show _lhsInr-                        -- "GenerateCode.ag"(line 383, column 13)-                        _addCostCentre =-                            \v -> if _lhsIo_costcentre-                                  then PragmaExpr True False ("SCC \"" ++ _costCentreDescr     ++ "\"") v-                                  else v-                        -- "GenerateCode.ag"(line 387, column 13)-                        _params =-                            map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap-                        -- "GenerateCode.ag"(line 388, column 13)-                        _semFun =-                            let  lhs = Fun _funcname lhs_args-                                 lhs_args = if _lhsInr == 0 then map field _firstOrderChildren     else _intraIexprs-                                 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 $ SimpleType (typeToHaskellString (Just _lhsInt) _params     tp))-                                 mbEvalTp | null _params     = const Nothing-                                          | otherwise        = Just . idEvalType-                                 rhs = wrap-                                     . mkLambda [mkLambdaArg (lhsname True nm) (mbEvalTp $ SimpleType $ typeToHaskellString (Just _lhsInt) _params     tp) | (nm,tp) <- Map.assocs inh_]-                                     $ _addCostCentre-                                     $ if ordered_ && _o_splitsems-                                       then _blockFirstFunCall-                                       else mkLet _o_case _decls-                                            . 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-                        -- "GenerateCode.ag"(line 418, column 13)-                        _tsig =-                            TSig _funcname _semType-                        -- "GenerateCode.ag"(line 419, column 13)-                        _semType =-                            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) _firstOrderChildren    )-                                   else foldr argType (typeAppStrs (typeName _lhsInt _lhsInr) _params    ) _intraItps-                        -- "GenerateCode.ag"(line 430, column 13)-                        _lhsOdecls =-                            ( if  _lhsIwith_sig-                              then [_tsig, _semFun]-                              else [_semFun]-                            ) ++-                            ( if ordered_ && _o_splitsems-                              then _blockFunDecls-                              else []-                            )-                        -- "GenerateCode.ag"(line 438, column 13)-                        _typeSigs =-                            if  _lhsIo_sig && not _o_case-                                then  _vssItSigs-                                else  []-                        -- "GenerateCode.ag"(line 441, column 13)-                        _o_case =-                            _lhsIo_case && ordered_ && not (hasPragma _lhsIallPragmas _lhsInt _lhsIcon _NOCASE)-                        -- "GenerateCode.ag"(line 442, column 13)-                        _o_splitsems =-                            ordered_ && _lhsIo_splitsems-                        -- "GenerateCode.ag"(line 464, column 7)-                        _lhsOgatherInstVisitNrs =-                            Map.fromList [(i,_lhsInr) | i <- _vssIdefinedInsts]-                        -- "GenerateCode.ag"(line 475, column 7)-                        _vssOdeclsAbove =-                            []-                        -- "GenerateCode.ag"(line 476, column 7)-                        _intraOdeclsAbove =-                            error "declsAbove: not used here"-                        -- "GenerateCode.ag"(line 722, column 13)-                        _lhsOallTpsFound =-                            _intraIallTpsFound-                        -- "GenerateCode.ag"(line 733, column 13)-                        _lhsOerrors =-                            _intraIerrors-                        -- "GenerateCode.ag"(line 766, column 18)-                        _lhsOcomments =-                            let body = map ind (_vssIcomments ++ _intraIcomments)-                            in if null body-                               then []-                               else ("visit " ++ show _lhsInr ++ ":") : body-                        -- "GenerateCode.ag"(line 770, column 18)-                        _vssOwhat =-                            "local"-                        -- "GenerateCode.ag"(line 771, column 18)-                        _intraOwhat =-                            "intra"-                        -- "GenerateCode.ag"(line 1005, column 7)-                        _lhsOsemNames =-                            [_funcname    ]-                        -- copy rule (down)-                        _vssOallNts =-                            _lhsIallNts-                        -- copy rule (down)-                        _vssOchildren =-                            _lhsIchildren-                        -- copy rule (down)-                        _vssOcon =-                            _lhsIcon-                        -- copy rule (down)-                        _vssOerrors =-                            _lhsIerrors-                        -- copy rule (from local)-                        _vssOhigherOrderChildren =-                            _higherOrderChildren-                        -- copy rule (down)-                        _vssOinh =-                            _lhsIinh-                        -- copy rule (down)-                        _vssOinstVisitNrs =-                            _lhsIinstVisitNrs-                        -- copy rule (down)-                        _vssOnr =-                            _lhsInr-                        -- copy rule (down)-                        _vssOnt =-                            _lhsInt-                        -- copy rule (from local)-                        _vssOo_case =-                            _o_case-                        -- copy rule (down)-                        _vssOo_cata =-                            _lhsIo_cata-                        -- copy rule (down)-                        _vssOo_costcentre =-                            _lhsIo_costcentre-                        -- copy rule (down)-                        _vssOo_data =-                            _lhsIo_data-                        -- copy rule (down)-                        _vssOo_linePragmas =-                            _lhsIo_linePragmas-                        -- copy rule (down)-                        _vssOo_newtypes =-                            _lhsIo_newtypes-                        -- copy rule (down)-                        _vssOo_pretty =-                            _lhsIo_pretty-                        -- copy rule (down)-                        _vssOo_rename =-                            _lhsIo_rename-                        -- copy rule (down)-                        _vssOo_sem =-                            _lhsIo_sem-                        -- copy rule (down)-                        _vssOo_sig =-                            _lhsIo_sig-                        -- copy rule (from local)-                        _vssOo_splitsems =-                            _o_splitsems-                        -- copy rule (down)-                        _vssOo_strictwrap =-                            _lhsIo_strictwrap-                        -- copy rule (down)-                        _vssOo_traces =-                            _lhsIo_traces-                        -- copy rule (down)-                        _vssOo_unbox =-                            _lhsIo_unbox-                        -- copy rule (down)-                        _vssOparamInstMap =-                            _lhsIparamInstMap-                        -- copy rule (down)-                        _vssOparamMap =-                            _lhsIparamMap-                        -- copy rule (down)-                        _vssOprefix =-                            _lhsIprefix-                        -- copy rule (down)-                        _vssOsyn =-                            _lhsIsyn-                        -- copy rule (down)-                        _vssOterminals =-                            _lhsIterminals-                        -- copy rule (down)-                        _vssOunfoldSemDom =-                            _lhsIunfoldSemDom-                        -- copy rule (down)-                        _intraOallNts =-                            _lhsIallNts-                        -- copy rule (down)-                        _intraOchildren =-                            _lhsIchildren-                        -- copy rule (down)-                        _intraOcon =-                            _lhsIcon-                        -- copy rule (chain)-                        _intraOerrors =-                            _vssIerrors-                        -- copy rule (from local)-                        _intraOhigherOrderChildren =-                            _higherOrderChildren-                        -- copy rule (down)-                        _intraOinh =-                            _lhsIinh-                        -- copy rule (down)-                        _intraOinstVisitNrs =-                            _lhsIinstVisitNrs-                        -- copy rule (down)-                        _intraOnr =-                            _lhsInr-                        -- copy rule (down)-                        _intraOnt =-                            _lhsInt-                        -- copy rule (from local)-                        _intraOo_case =-                            _o_case-                        -- copy rule (down)-                        _intraOo_cata =-                            _lhsIo_cata-                        -- copy rule (down)-                        _intraOo_costcentre =-                            _lhsIo_costcentre-                        -- copy rule (down)-                        _intraOo_data =-                            _lhsIo_data-                        -- copy rule (down)-                        _intraOo_linePragmas =-                            _lhsIo_linePragmas-                        -- copy rule (down)-                        _intraOo_newtypes =-                            _lhsIo_newtypes-                        -- copy rule (down)-                        _intraOo_pretty =-                            _lhsIo_pretty-                        -- copy rule (down)-                        _intraOo_rename =-                            _lhsIo_rename-                        -- copy rule (down)-                        _intraOo_sem =-                            _lhsIo_sem-                        -- copy rule (down)-                        _intraOo_sig =-                            _lhsIo_sig-                        -- copy rule (from local)-                        _intraOo_splitsems =-                            _o_splitsems-                        -- copy rule (down)-                        _intraOo_strictwrap =-                            _lhsIo_strictwrap-                        -- copy rule (down)-                        _intraOo_traces =-                            _lhsIo_traces-                        -- copy rule (down)-                        _intraOo_unbox =-                            _lhsIo_unbox-                        -- copy rule (down)-                        _intraOparamInstMap =-                            _lhsIparamInstMap-                        -- copy rule (down)-                        _intraOparamMap =-                            _lhsIparamMap-                        -- copy rule (down)-                        _intraOprefix =-                            _lhsIprefix-                        -- copy rule (down)-                        _intraOsyn =-                            _lhsIsyn-                        -- copy rule (down)-                        _intraOterminals =-                            _lhsIterminals-                        -- copy rule (down)-                        _intraOunfoldSemDom =-                            _lhsIunfoldSemDom-                        ( _vssIallTpsFound,_vssIblockDecls,_vssIcomments,_vssIdecls,_vssIdeclsAbove,_vssIdefinedInsts,_vssIerrors,_vssIexprs,_vssItSigs,_vssItps,_vssIusedVars) =-                            (vss_ _vssOallNts _vssOchildren _vssOcon _vssOdeclsAbove _vssOerrors _vssOhigherOrderChildren _vssOinh _vssOinstVisitNrs _vssOlastExpr _vssOnr _vssOnt _vssOo_case _vssOo_cata _vssOo_costcentre _vssOo_data _vssOo_linePragmas _vssOo_newtypes _vssOo_pretty _vssOo_rename _vssOo_sem _vssOo_sig _vssOo_splitsems _vssOo_strictwrap _vssOo_traces _vssOo_unbox _vssOparamInstMap _vssOparamMap _vssOprefix _vssOsyn _vssOterminals _vssOunfoldSemDom _vssOwhat )-                        ( _intraIallTpsFound,_intraIblockDecls,_intraIcomments,_intraIdecls,_intraIdeclsAbove,_intraIdefinedInsts,_intraIerrors,_intraIexprs,_intraItSigs,_intraItps,_intraIusedVars) =-                            (intra_ _intraOallNts _intraOchildren _intraOcon _intraOdeclsAbove _intraOerrors _intraOhigherOrderChildren _intraOinh _intraOinstVisitNrs _intraOlastExpr _intraOnr _intraOnt _intraOo_case _intraOo_cata _intraOo_costcentre _intraOo_data _intraOo_linePragmas _intraOo_newtypes _intraOo_pretty _intraOo_rename _intraOo_sem _intraOo_sig _intraOo_splitsems _intraOo_strictwrap _intraOo_traces _intraOo_unbox _intraOparamInstMap _intraOparamMap _intraOprefix _intraOsyn _intraOterminals _intraOunfoldSemDom _intraOwhat )-                    in  ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames))) )--- CVisits ------------------------------------------------------{--   visit 0:-      inherited attributes:-         allNts               : Set NontermIdent-         allPragmas           : PragmaMap-         children             : [(Identifier,Type,Bool)]-         con                  : ConstructorIdent-         contextMap           : ContextMap-         inh                  : Attributes-         instVisitNrs         : Map Identifier Int-         nr                   : Int-         nt                   : NontermIdent-         o_case               : Bool-         o_cata               : Bool-         o_costcentre         : Bool-         o_data               : Maybe Bool-         o_linePragmas        : 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-         paramInstMap         : Map Identifier (NontermIdent, [String])-         paramMap             : ParamMap-         prefix               : String-         syn                  : Attributes-         terminals            : [Identifier]-         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type-         with_sig             : Bool-      chained attribute:-         errors               : Seq Error-      synthesized attributes:-         allTpsFound          : Bool-         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 ->-                                ([(Identifier,Type,Bool)]) ->-                                ConstructorIdent ->-                                ContextMap ->-                                (Seq Error) ->-                                Attributes ->-                                (Map Identifier Int) ->-                                Int ->-                                NontermIdent ->-                                Bool ->-                                Bool ->-                                Bool ->-                                (Maybe Bool) ->-                                Bool ->-                                Bool ->-                                Bool ->-                                Bool ->-                                Bool ->-                                Bool ->-                                Bool ->-                                Bool ->-                                Bool ->-                                Bool ->-                                (Map Identifier (NontermIdent, [String])) ->-                                ParamMap ->-                                String ->-                                Attributes ->-                                ([Identifier]) ->-                                (NontermIdent -> Int -> [String] -> Code.Type) ->-                                Bool ->-                                ( Bool,([String]),Decls,(Seq Error),(Map Identifier Int),Exprs,(Set String),Bool,([String])))-data Inh_CVisits  = Inh_CVisits {allNts_Inh_CVisits :: !(Set NontermIdent),allPragmas_Inh_CVisits :: !(PragmaMap),children_Inh_CVisits :: !([(Identifier,Type,Bool)]),con_Inh_CVisits :: !(ConstructorIdent),contextMap_Inh_CVisits :: !(ContextMap),errors_Inh_CVisits :: !(Seq Error),inh_Inh_CVisits :: !(Attributes),instVisitNrs_Inh_CVisits :: !(Map Identifier Int),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_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),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),with_sig_Inh_CVisits :: !(Bool)}-data Syn_CVisits  = Syn_CVisits {allTpsFound_Syn_CVisits :: !(Bool),comments_Syn_CVisits :: !([String]),decls_Syn_CVisits :: !(Decls),errors_Syn_CVisits :: !(Seq Error),gatherInstVisitNrs_Syn_CVisits :: !(Map Identifier Int),intra_Syn_CVisits :: !(Exprs),intraVars_Syn_CVisits :: !(Set String),isNil_Syn_CVisits :: !(Bool),semNames_Syn_CVisits :: !([String])}-wrap_CVisits :: T_CVisits  ->-                Inh_CVisits  ->-                Syn_CVisits -wrap_CVisits (T_CVisits sem ) (Inh_CVisits _lhsIallNts _lhsIallPragmas _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIerrors _lhsIinh _lhsIinstVisitNrs _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwith_sig )  =-    (let ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames) =-             (sem _lhsIallNts _lhsIallPragmas _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIerrors _lhsIinh _lhsIinstVisitNrs _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwith_sig )-     in  (Syn_CVisits _lhsOallTpsFound _lhsOcomments _lhsOdecls _lhsOerrors _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames ))-sem_CVisits_Cons :: T_CVisit  ->-                    T_CVisits  ->-                    T_CVisits -sem_CVisits_Cons (T_CVisit hd_ ) (T_CVisits tl_ )  =-    (T_CVisits (\ _lhsIallNts-                  _lhsIallPragmas-                  _lhsIchildren-                  _lhsIcon-                  _lhsIcontextMap-                  _lhsIerrors-                  _lhsIinh-                  _lhsIinstVisitNrs-                  _lhsInr-                  _lhsInt-                  _lhsIo_case-                  _lhsIo_cata-                  _lhsIo_costcentre-                  _lhsIo_data-                  _lhsIo_linePragmas-                  _lhsIo_newtypes-                  _lhsIo_pretty-                  _lhsIo_rename-                  _lhsIo_sem-                  _lhsIo_sig-                  _lhsIo_splitsems-                  _lhsIo_strictwrap-                  _lhsIo_traces-                  _lhsIo_unbox-                  _lhsIparamInstMap-                  _lhsIparamMap-                  _lhsIprefix-                  _lhsIsyn-                  _lhsIterminals-                  _lhsIunfoldSemDom-                  _lhsIwith_sig ->-                    (let _tlOnr :: Int-                         _lhsOisNil :: Bool-                         _hdOisLast :: Bool-                         _hdOnextIntra :: Exprs-                         _hdOnextIntraVars :: (Set String)-                         _lhsOintra :: Exprs-                         _lhsOintraVars :: (Set String)-                         _lhsOallTpsFound :: Bool-                         _lhsOcomments :: ([String])-                         _lhsOdecls :: Decls-                         _lhsOerrors :: (Seq Error)-                         _lhsOgatherInstVisitNrs :: (Map Identifier Int)-                         _lhsOsemNames :: ([String])-                         _hdOallNts :: (Set NontermIdent)-                         _hdOallPragmas :: PragmaMap-                         _hdOchildren :: ([(Identifier,Type,Bool)])-                         _hdOcon :: ConstructorIdent-                         _hdOcontextMap :: ContextMap-                         _hdOerrors :: (Seq Error)-                         _hdOinh :: Attributes-                         _hdOinstVisitNrs :: (Map Identifier Int)-                         _hdOnr :: Int-                         _hdOnt :: NontermIdent-                         _hdOo_case :: Bool-                         _hdOo_cata :: Bool-                         _hdOo_costcentre :: Bool-                         _hdOo_data :: (Maybe Bool)-                         _hdOo_linePragmas :: 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-                         _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))-                         _hdOparamMap :: ParamMap-                         _hdOprefix :: String-                         _hdOsyn :: Attributes-                         _hdOterminals :: ([Identifier])-                         _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                         _hdOwith_sig :: Bool-                         _tlOallNts :: (Set NontermIdent)-                         _tlOallPragmas :: PragmaMap-                         _tlOchildren :: ([(Identifier,Type,Bool)])-                         _tlOcon :: ConstructorIdent-                         _tlOcontextMap :: ContextMap-                         _tlOerrors :: (Seq Error)-                         _tlOinh :: Attributes-                         _tlOinstVisitNrs :: (Map Identifier Int)-                         _tlOnt :: NontermIdent-                         _tlOo_case :: Bool-                         _tlOo_cata :: Bool-                         _tlOo_costcentre :: Bool-                         _tlOo_data :: (Maybe Bool)-                         _tlOo_linePragmas :: 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-                         _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))-                         _tlOparamMap :: ParamMap-                         _tlOprefix :: String-                         _tlOsyn :: Attributes-                         _tlOterminals :: ([Identifier])-                         _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                         _tlOwith_sig :: Bool-                         _hdIallTpsFound :: Bool-                         _hdIcomments :: ([String])-                         _hdIdecls :: Decls-                         _hdIerrors :: (Seq Error)-                         _hdIgatherInstVisitNrs :: (Map Identifier Int)-                         _hdIintra :: Exprs-                         _hdIintraVars :: (Set String)-                         _hdIsemNames :: ([String])-                         _tlIallTpsFound :: Bool-                         _tlIcomments :: ([String])-                         _tlIdecls :: Decls-                         _tlIerrors :: (Seq Error)-                         _tlIgatherInstVisitNrs :: (Map Identifier Int)-                         _tlIintra :: Exprs-                         _tlIintraVars :: (Set String)-                         _tlIisNil :: Bool-                         _tlIsemNames :: ([String])-                         -- "GenerateCode.ag"(line 226, column 11)-                         _tlOnr =-                             _lhsInr + 1-                         -- "GenerateCode.ag"(line 239, column 12)-                         _lhsOisNil =-                             False-                         -- "GenerateCode.ag"(line 240, column 12)-                         _hdOisLast =-                             _tlIisNil-                         -- "GenerateCode.ag"(line 257, column 12)-                         _hdOnextIntra =-                             _tlIintra-                         -- "GenerateCode.ag"(line 258, column 12)-                         _hdOnextIntraVars =-                             _tlIintraVars-                         -- "GenerateCode.ag"(line 259, column 12)-                         _lhsOintra =-                             _hdIintra-                         -- "GenerateCode.ag"(line 260, column 12)-                         _lhsOintraVars =-                             _hdIintraVars-                         -- use rule "GenerateCode.ag"(line 716, column 39)-                         _lhsOallTpsFound =-                             _hdIallTpsFound && _tlIallTpsFound-                         -- use rule "GenerateCode.ag"(line 748, column 52)-                         _lhsOcomments =-                             _hdIcomments ++ _tlIcomments-                         -- use rule "GenerateCode.ag"(line 365, column 33)-                         _lhsOdecls =-                             _hdIdecls ++ _tlIdecls-                         -- use rule "GenerateCode.ag"(line 729, column 32)-                         _lhsOerrors =-                             _hdIerrors Seq.>< _tlIerrors-                         -- use rule "GenerateCode.ag"(line 457, column 44)-                         _lhsOgatherInstVisitNrs =-                             _hdIgatherInstVisitNrs `Map.union` _tlIgatherInstVisitNrs-                         -- use rule "GenerateCode.ag"(line 995, column 61)-                         _lhsOsemNames =-                             _hdIsemNames ++ _tlIsemNames-                         -- copy rule (down)-                         _hdOallNts =-                             _lhsIallNts-                         -- copy rule (down)-                         _hdOallPragmas =-                             _lhsIallPragmas-                         -- copy rule (down)-                         _hdOchildren =-                             _lhsIchildren-                         -- copy rule (down)-                         _hdOcon =-                             _lhsIcon-                         -- copy rule (down)-                         _hdOcontextMap =-                             _lhsIcontextMap-                         -- copy rule (down)-                         _hdOerrors =-                             _lhsIerrors-                         -- copy rule (down)-                         _hdOinh =-                             _lhsIinh-                         -- copy rule (down)-                         _hdOinstVisitNrs =-                             _lhsIinstVisitNrs-                         -- copy rule (down)-                         _hdOnr =-                             _lhsInr-                         -- copy rule (down)-                         _hdOnt =-                             _lhsInt-                         -- copy rule (down)-                         _hdOo_case =-                             _lhsIo_case-                         -- copy rule (down)-                         _hdOo_cata =-                             _lhsIo_cata-                         -- copy rule (down)-                         _hdOo_costcentre =-                             _lhsIo_costcentre-                         -- copy rule (down)-                         _hdOo_data =-                             _lhsIo_data-                         -- copy rule (down)-                         _hdOo_linePragmas =-                             _lhsIo_linePragmas-                         -- copy rule (down)-                         _hdOo_newtypes =-                             _lhsIo_newtypes-                         -- copy rule (down)-                         _hdOo_pretty =-                             _lhsIo_pretty-                         -- copy rule (down)-                         _hdOo_rename =-                             _lhsIo_rename-                         -- copy rule (down)-                         _hdOo_sem =-                             _lhsIo_sem-                         -- copy rule (down)-                         _hdOo_sig =-                             _lhsIo_sig-                         -- copy rule (down)-                         _hdOo_splitsems =-                             _lhsIo_splitsems-                         -- copy rule (down)-                         _hdOo_strictwrap =-                             _lhsIo_strictwrap-                         -- copy rule (down)-                         _hdOo_traces =-                             _lhsIo_traces-                         -- copy rule (down)-                         _hdOo_unbox =-                             _lhsIo_unbox-                         -- copy rule (down)-                         _hdOparamInstMap =-                             _lhsIparamInstMap-                         -- copy rule (down)-                         _hdOparamMap =-                             _lhsIparamMap-                         -- copy rule (down)-                         _hdOprefix =-                             _lhsIprefix-                         -- copy rule (down)-                         _hdOsyn =-                             _lhsIsyn-                         -- copy rule (down)-                         _hdOterminals =-                             _lhsIterminals-                         -- copy rule (down)-                         _hdOunfoldSemDom =-                             _lhsIunfoldSemDom-                         -- copy rule (down)-                         _hdOwith_sig =-                             _lhsIwith_sig-                         -- copy rule (down)-                         _tlOallNts =-                             _lhsIallNts-                         -- copy rule (down)-                         _tlOallPragmas =-                             _lhsIallPragmas-                         -- copy rule (down)-                         _tlOchildren =-                             _lhsIchildren-                         -- copy rule (down)-                         _tlOcon =-                             _lhsIcon-                         -- copy rule (down)-                         _tlOcontextMap =-                             _lhsIcontextMap-                         -- copy rule (chain)-                         _tlOerrors =-                             _hdIerrors-                         -- copy rule (down)-                         _tlOinh =-                             _lhsIinh-                         -- copy rule (down)-                         _tlOinstVisitNrs =-                             _lhsIinstVisitNrs-                         -- copy rule (down)-                         _tlOnt =-                             _lhsInt-                         -- copy rule (down)-                         _tlOo_case =-                             _lhsIo_case-                         -- copy rule (down)-                         _tlOo_cata =-                             _lhsIo_cata-                         -- copy rule (down)-                         _tlOo_costcentre =-                             _lhsIo_costcentre-                         -- copy rule (down)-                         _tlOo_data =-                             _lhsIo_data-                         -- copy rule (down)-                         _tlOo_linePragmas =-                             _lhsIo_linePragmas-                         -- copy rule (down)-                         _tlOo_newtypes =-                             _lhsIo_newtypes-                         -- copy rule (down)-                         _tlOo_pretty =-                             _lhsIo_pretty-                         -- copy rule (down)-                         _tlOo_rename =-                             _lhsIo_rename-                         -- copy rule (down)-                         _tlOo_sem =-                             _lhsIo_sem-                         -- copy rule (down)-                         _tlOo_sig =-                             _lhsIo_sig-                         -- copy rule (down)-                         _tlOo_splitsems =-                             _lhsIo_splitsems-                         -- copy rule (down)-                         _tlOo_strictwrap =-                             _lhsIo_strictwrap-                         -- copy rule (down)-                         _tlOo_traces =-                             _lhsIo_traces-                         -- copy rule (down)-                         _tlOo_unbox =-                             _lhsIo_unbox-                         -- copy rule (down)-                         _tlOparamInstMap =-                             _lhsIparamInstMap-                         -- copy rule (down)-                         _tlOparamMap =-                             _lhsIparamMap-                         -- copy rule (down)-                         _tlOprefix =-                             _lhsIprefix-                         -- copy rule (down)-                         _tlOsyn =-                             _lhsIsyn-                         -- copy rule (down)-                         _tlOterminals =-                             _lhsIterminals-                         -- copy rule (down)-                         _tlOunfoldSemDom =-                             _lhsIunfoldSemDom-                         -- copy rule (down)-                         _tlOwith_sig =-                             _lhsIwith_sig-                         ( _hdIallTpsFound,_hdIcomments,_hdIdecls,_hdIerrors,_hdIgatherInstVisitNrs,_hdIintra,_hdIintraVars,_hdIsemNames) =-                             (hd_ _hdOallNts _hdOallPragmas _hdOchildren _hdOcon _hdOcontextMap _hdOerrors _hdOinh _hdOinstVisitNrs _hdOisLast _hdOnextIntra _hdOnextIntraVars _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamInstMap _hdOparamMap _hdOprefix _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOwith_sig )-                         ( _tlIallTpsFound,_tlIcomments,_tlIdecls,_tlIerrors,_tlIgatherInstVisitNrs,_tlIintra,_tlIintraVars,_tlIisNil,_tlIsemNames) =-                             (tl_ _tlOallNts _tlOallPragmas _tlOchildren _tlOcon _tlOcontextMap _tlOerrors _tlOinh _tlOinstVisitNrs _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOparamInstMap _tlOparamMap _tlOprefix _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOwith_sig )-                     in  ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames))) )-sem_CVisits_Nil :: T_CVisits -sem_CVisits_Nil  =-    (T_CVisits (\ _lhsIallNts-                  _lhsIallPragmas-                  _lhsIchildren-                  _lhsIcon-                  _lhsIcontextMap-                  _lhsIerrors-                  _lhsIinh-                  _lhsIinstVisitNrs-                  _lhsInr-                  _lhsInt-                  _lhsIo_case-                  _lhsIo_cata-                  _lhsIo_costcentre-                  _lhsIo_data-                  _lhsIo_linePragmas-                  _lhsIo_newtypes-                  _lhsIo_pretty-                  _lhsIo_rename-                  _lhsIo_sem-                  _lhsIo_sig-                  _lhsIo_splitsems-                  _lhsIo_strictwrap-                  _lhsIo_traces-                  _lhsIo_unbox-                  _lhsIparamInstMap-                  _lhsIparamMap-                  _lhsIprefix-                  _lhsIsyn-                  _lhsIterminals-                  _lhsIunfoldSemDom-                  _lhsIwith_sig ->-                    (let _lhsOisNil :: Bool-                         _lhsOintra :: Exprs-                         _lhsOintraVars :: (Set String)-                         _lhsOallTpsFound :: Bool-                         _lhsOcomments :: ([String])-                         _lhsOdecls :: Decls-                         _lhsOerrors :: (Seq Error)-                         _lhsOgatherInstVisitNrs :: (Map Identifier Int)-                         _lhsOsemNames :: ([String])-                         -- "GenerateCode.ag"(line 241, column 10)-                         _lhsOisNil =-                             True-                         -- "GenerateCode.ag"(line 261, column 10)-                         _lhsOintra =-                             []-                         -- "GenerateCode.ag"(line 262, column 10)-                         _lhsOintraVars =-                             Set.empty-                         -- use rule "GenerateCode.ag"(line 716, column 39)-                         _lhsOallTpsFound =-                             True-                         -- use rule "GenerateCode.ag"(line 748, column 52)-                         _lhsOcomments =-                             []-                         -- use rule "GenerateCode.ag"(line 365, column 33)-                         _lhsOdecls =-                             []-                         -- use rule "GenerateCode.ag"(line 729, column 32)-                         _lhsOerrors =-                             Seq.empty-                         -- use rule "GenerateCode.ag"(line 457, column 44)-                         _lhsOgatherInstVisitNrs =-                             Map.empty-                         -- use rule "GenerateCode.ag"(line 995, column 61)-                         _lhsOsemNames =-                             []-                     in  ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames))) )--- 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 554, column 7)-                            _nextOblockNr =-                                _lhsIblockNr + 1-                            -- "GenerateCode.ag"(line 559, column 7)-                            _lambdaName =-                                _lhsIprefix ++ "_block" ++ show _lhsIblockNr-                            -- "GenerateCode.ag"(line 560, column 7)-                            _pragmaDecl =-                                PragmaDecl ("NOINLINE " ++ _lambdaName    )-                            -- "GenerateCode.ag"(line 561, column 7)-                            _lhsOcallExpr =-                                App _lambdaName     (map SimpleExpr _freeVars    )-                            -- "GenerateCode.ag"(line 565, column 7)-                            _freeVars =-                                freevars _nextIfreeVars (visit_ : defs_)-                            -- "GenerateCode.ag"(line 572, column 7)-                            _decl =-                                mkBlockLambda _lhsIoptCase _lambdaName     _freeVars     (defs_ ++ [visit_]) _nextIcallExpr-                            -- "GenerateCode.ag"(line 573, column 7)-                            _lhsOdecls =-                                (if _lhsIblockNr > 1 then [_pragmaDecl    ] else []) ++ [_decl    ] ++ _nextIdecls-                            -- copy rule (from local)-                            _lhsOfreeVars =-                                _freeVars-                            -- copy rule (down)-                            _nextOlastExprVars =-                                _lhsIlastExprVars-                            -- copy rule (down)-                            _nextOnextVisitDecls =-                                _lhsInextVisitDecls-                            -- copy rule (down)-                            _nextOoptCase =-                                _lhsIoptCase-                            -- copy rule (down)-                            _nextOprefix =-                                _lhsIprefix-                            ( _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 559, column 7)-                            _lambdaName =-                                _lhsIprefix ++ "_block" ++ show _lhsIblockNr-                            -- "GenerateCode.ag"(line 560, column 7)-                            _pragmaDecl =-                                PragmaDecl ("NOINLINE " ++ _lambdaName    )-                            -- "GenerateCode.ag"(line 561, column 7)-                            _lhsOcallExpr =-                                App _lambdaName     (map SimpleExpr _freeVars    )-                            -- "GenerateCode.ag"(line 563, column 7)-                            _freeVars =-                                freevars _lhsIlastExprVars (defs_ ++ _lhsInextVisitDecls)-                            -- "GenerateCode.ag"(line 570, column 7)-                            _lhsOdecls =-                                [ mkBlockLambda _lhsIoptCase _lambdaName     _freeVars     (defs_ ++ _lhsInextVisitDecls) result_ ]-                            -- copy rule (from local)-                            _lhsOfreeVars =-                                _freeVars-                        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 545, column 7)-                                _lhsOlambdas =-                                    _blocksIdecls-                                -- "GenerateCode.ag"(line 546, column 7)-                                _lhsOfirstCall =-                                    _blocksIcallExpr-                                -- "GenerateCode.ag"(line 551, column 7)-                                _blocksOblockNr =-                                    1-                                -- copy rule (down)-                                _blocksOlastExprVars =-                                    _lhsIlastExprVars-                                -- copy rule (down)-                                _blocksOnextVisitDecls =-                                    _lhsInextVisitDecls-                                -- copy rule (down)-                                _blocksOoptCase =-                                    _lhsIoptCase-                                -- copy rule (down)-                                _blocksOprefix =-                                    _lhsIprefix-                                ( _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 207, column 11)-                    _lhsOdefinedInsts =-                        (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts-                    -- "GenerateCode.ag"(line 215, column 7)-                    _lhsOpatternAttributes =-                        (field_,attr_) : (_patIpatternAttributes ++ _partsIpatternAttributes)-                    -- self rule-                    _copy =-                        Alias field_ attr_ _patIcopy _partsIcopy-                    -- self rule-                    _lhsOcopy =-                        _copy-                    ( _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 205, column 55)-                    _lhsOdefinedInsts =-                        _patsIdefinedInsts-                    -- use rule "GenerateCode.ag"(line 212, column 47)-                    _lhsOpatternAttributes =-                        _patsIpatternAttributes-                    -- self rule-                    _copy =-                        Constr name_ _patsIcopy-                    -- self rule-                    _lhsOcopy =-                        _copy-                    ( _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 205, column 55)-                    _lhsOdefinedInsts =-                        _patIdefinedInsts-                    -- use rule "GenerateCode.ag"(line 212, column 47)-                    _lhsOpatternAttributes =-                        _patIpatternAttributes-                    -- self rule-                    _copy =-                        Irrefutable _patIcopy-                    -- self rule-                    _lhsOcopy =-                        _copy-                    ( _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 205, column 55)-                    _lhsOdefinedInsts =-                        _patsIdefinedInsts-                    -- use rule "GenerateCode.ag"(line 212, column 47)-                    _lhsOpatternAttributes =-                        _patsIpatternAttributes-                    -- self rule-                    _copy =-                        Product pos_ _patsIcopy-                    -- self rule-                    _lhsOcopy =-                        _copy-                    ( _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 205, column 55)-                    _lhsOdefinedInsts =-                        []-                    -- use rule "GenerateCode.ag"(line 212, column 47)-                    _lhsOpatternAttributes =-                        []-                    -- self rule-                    _copy =-                        Underscore pos_-                    -- self rule-                    _lhsOcopy =-                        _copy-                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 205, column 55)-                     _lhsOdefinedInsts =-                         _hdIdefinedInsts ++ _tlIdefinedInsts-                     -- use rule "GenerateCode.ag"(line 212, column 47)-                     _lhsOpatternAttributes =-                         _hdIpatternAttributes ++ _tlIpatternAttributes-                     -- self rule-                     _copy =-                         (:) _hdIcopy _tlIcopy-                     -- self rule-                     _lhsOcopy =-                         _copy-                     ( _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 205, column 55)-                     _lhsOdefinedInsts =-                         []-                     -- use rule "GenerateCode.ag"(line 212, column 47)-                     _lhsOpatternAttributes =-                         []-                     -- self rule-                     _copy =-                         []-                     -- self rule-                     _lhsOcopy =-                         _copy-                 in  ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )--- Sequence -----------------------------------------------------{--   visit 0:-      inherited attributes:-         allNts               : Set NontermIdent-         children             : [(Identifier,Type,Bool)]-         con                  : ConstructorIdent-         higherOrderChildren  : [(Identifier,Type,Bool)]-         inh                  : Attributes-         instVisitNrs         : Map Identifier Int-         lastExpr             : Expr-         nr                   : Int-         nt                   : NontermIdent-         o_case               : Bool-         o_cata               : Bool-         o_costcentre         : Bool-         o_data               : Maybe Bool-         o_linePragmas        : 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-         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]-         errors               : Seq Error-      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) ->-                                  ([(Identifier,Type,Bool)]) ->-                                  ConstructorIdent ->-                                  ([Decl]) ->-                                  (Seq Error) ->-                                  ([(Identifier,Type,Bool)]) ->-                                  Attributes ->-                                  (Map Identifier Int) ->-                                  Expr ->-                                  Int ->-                                  NontermIdent ->-                                  Bool ->-                                  Bool ->-                                  Bool ->-                                  (Maybe Bool) ->-                                  Bool ->-                                  Bool ->-                                  Bool ->-                                  Bool ->-                                  Bool ->-                                  Bool ->-                                  Bool ->-                                  Bool ->-                                  Bool ->-                                  Bool ->-                                  (Map Identifier (NontermIdent, [String])) ->-                                  ParamMap ->-                                  String ->-                                  Attributes ->-                                  ([Identifier]) ->-                                  (NontermIdent -> Int -> [String] -> Code.Type) ->-                                  String ->-                                  ( Bool,DeclBlocks,([String]),Decls,([Decl]),([Identifier]),(Seq Error),Exprs,([Decl]),([Type]),(Set String)))-data Inh_Sequence  = Inh_Sequence {allNts_Inh_Sequence :: !(Set NontermIdent),children_Inh_Sequence :: !([(Identifier,Type,Bool)]),con_Inh_Sequence :: !(ConstructorIdent),declsAbove_Inh_Sequence :: !([Decl]),errors_Inh_Sequence :: !(Seq Error),higherOrderChildren_Inh_Sequence :: !([(Identifier,Type,Bool)]),inh_Inh_Sequence :: !(Attributes),instVisitNrs_Inh_Sequence :: !(Map Identifier Int),lastExpr_Inh_Sequence :: !(Expr),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_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),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),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]),errors_Syn_Sequence :: !(Seq Error),exprs_Syn_Sequence :: !(Exprs),tSigs_Syn_Sequence :: !([Decl]),tps_Syn_Sequence :: !([Type]),usedVars_Syn_Sequence :: !(Set String)}-wrap_Sequence :: T_Sequence  ->-                 Inh_Sequence  ->-                 Syn_Sequence -wrap_Sequence (T_Sequence sem ) (Inh_Sequence _lhsIallNts _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIerrors _lhsIhigherOrderChildren _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwhat )  =-    (let ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars) =-             (sem _lhsIallNts _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIerrors _lhsIhigherOrderChildren _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwhat )-     in  (Syn_Sequence _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOerrors _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars ))-sem_Sequence_Cons :: T_CRule  ->-                     T_Sequence  ->-                     T_Sequence -sem_Sequence_Cons (T_CRule hd_ ) (T_Sequence tl_ )  =-    (T_Sequence (\ _lhsIallNts-                   _lhsIchildren-                   _lhsIcon-                   _lhsIdeclsAbove-                   _lhsIerrors-                   _lhsIhigherOrderChildren-                   _lhsIinh-                   _lhsIinstVisitNrs-                   _lhsIlastExpr-                   _lhsInr-                   _lhsInt-                   _lhsIo_case-                   _lhsIo_cata-                   _lhsIo_costcentre-                   _lhsIo_data-                   _lhsIo_linePragmas-                   _lhsIo_newtypes-                   _lhsIo_pretty-                   _lhsIo_rename-                   _lhsIo_sem-                   _lhsIo_sig-                   _lhsIo_splitsems-                   _lhsIo_strictwrap-                   _lhsIo_traces-                   _lhsIo_unbox-                   _lhsIparamInstMap-                   _lhsIparamMap-                   _lhsIprefix-                   _lhsIsyn-                   _lhsIterminals-                   _lhsIunfoldSemDom-                   _lhsIwhat ->-                     (let _lhsOblockDecls :: DeclBlocks-                          _lhsOallTpsFound :: Bool-                          _lhsOcomments :: ([String])-                          _lhsOdecls :: Decls-                          _lhsOdefinedInsts :: ([Identifier])-                          _lhsOerrors :: (Seq Error)-                          _lhsOexprs :: Exprs-                          _lhsOtSigs :: ([Decl])-                          _lhsOtps :: ([Type])-                          _lhsOusedVars :: (Set String)-                          _lhsOdeclsAbove :: ([Decl])-                          _hdOallNts :: (Set NontermIdent)-                          _hdOchildren :: ([(Identifier,Type,Bool)])-                          _hdOcon :: ConstructorIdent-                          _hdOdeclsAbove :: ([Decl])-                          _hdOerrors :: (Seq Error)-                          _hdOhigherOrderChildren :: ([(Identifier,Type,Bool)])-                          _hdOinh :: Attributes-                          _hdOinstVisitNrs :: (Map Identifier Int)-                          _hdOnr :: Int-                          _hdOnt :: NontermIdent-                          _hdOo_case :: Bool-                          _hdOo_cata :: Bool-                          _hdOo_costcentre :: Bool-                          _hdOo_data :: (Maybe Bool)-                          _hdOo_linePragmas :: 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-                          _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))-                          _hdOparamMap :: ParamMap-                          _hdOprefix :: String-                          _hdOsyn :: Attributes-                          _hdOterminals :: ([Identifier])-                          _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                          _hdOwhat :: String-                          _tlOallNts :: (Set NontermIdent)-                          _tlOchildren :: ([(Identifier,Type,Bool)])-                          _tlOcon :: ConstructorIdent-                          _tlOdeclsAbove :: ([Decl])-                          _tlOerrors :: (Seq Error)-                          _tlOhigherOrderChildren :: ([(Identifier,Type,Bool)])-                          _tlOinh :: Attributes-                          _tlOinstVisitNrs :: (Map Identifier Int)-                          _tlOlastExpr :: Expr-                          _tlOnr :: Int-                          _tlOnt :: NontermIdent-                          _tlOo_case :: Bool-                          _tlOo_cata :: Bool-                          _tlOo_costcentre :: Bool-                          _tlOo_data :: (Maybe Bool)-                          _tlOo_linePragmas :: 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-                          _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))-                          _tlOparamMap :: ParamMap-                          _tlOprefix :: String-                          _tlOsyn :: Attributes-                          _tlOterminals :: ([Identifier])-                          _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)-                          _tlOwhat :: String-                          _hdIallTpsFound :: Bool-                          _hdIbldBlocksFun :: (DeclBlocks -> DeclBlocks)-                          _hdIcomments :: ([String])-                          _hdIdecls :: Decls-                          _hdIdeclsAbove :: ([Decl])-                          _hdIdefinedInsts :: ([Identifier])-                          _hdIerrors :: (Seq Error)-                          _hdIexprs :: Exprs-                          _hdItSigs :: ([Decl])-                          _hdItps :: ([Type])-                          _hdIusedVars :: (Set String)-                          _tlIallTpsFound :: Bool-                          _tlIblockDecls :: DeclBlocks-                          _tlIcomments :: ([String])-                          _tlIdecls :: Decls-                          _tlIdeclsAbove :: ([Decl])-                          _tlIdefinedInsts :: ([Identifier])-                          _tlIerrors :: (Seq Error)-                          _tlIexprs :: Exprs-                          _tlItSigs :: ([Decl])-                          _tlItps :: ([Type])-                          _tlIusedVars :: (Set String)-                          -- "GenerateCode.ag"(line 486, column 7)-                          _lhsOblockDecls =-                              _hdIbldBlocksFun _tlIblockDecls-                          -- use rule "GenerateCode.ag"(line 354, column 39)-                          _lhsOallTpsFound =-                              _hdIallTpsFound && _tlIallTpsFound-                          -- use rule "GenerateCode.ag"(line 748, column 52)-                          _lhsOcomments =-                              _hdIcomments ++ _tlIcomments-                          -- use rule "GenerateCode.ag"(line 138, column 34)-                          _lhsOdecls =-                              _hdIdecls ++ _tlIdecls-                          -- use rule "GenerateCode.ag"(line 205, column 55)-                          _lhsOdefinedInsts =-                              _hdIdefinedInsts ++ _tlIdefinedInsts-                          -- use rule "GenerateCode.ag"(line 729, column 32)-                          _lhsOerrors =-                              _hdIerrors Seq.>< _tlIerrors-                          -- use rule "GenerateCode.ag"(line 278, column 34)-                          _lhsOexprs =-                              _hdIexprs ++ _tlIexprs-                          -- use rule "GenerateCode.ag"(line 307, column 33)-                          _lhsOtSigs =-                              _hdItSigs ++ _tlItSigs-                          -- use rule "GenerateCode.ag"(line 353, column 31)-                          _lhsOtps =-                              _hdItps ++ _tlItps-                          -- use rule "GenerateCode.ag"(line 296, column 37)-                          _lhsOusedVars =-                              _hdIusedVars `Set.union` _tlIusedVars-                          -- copy rule (up)-                          _lhsOdeclsAbove =-                              _tlIdeclsAbove-                          -- copy rule (down)-                          _hdOallNts =-                              _lhsIallNts-                          -- copy rule (down)-                          _hdOchildren =-                              _lhsIchildren-                          -- copy rule (down)-                          _hdOcon =-                              _lhsIcon-                          -- copy rule (down)-                          _hdOdeclsAbove =-                              _lhsIdeclsAbove-                          -- copy rule (down)-                          _hdOerrors =-                              _lhsIerrors-                          -- copy rule (down)-                          _hdOhigherOrderChildren =-                              _lhsIhigherOrderChildren-                          -- copy rule (down)-                          _hdOinh =-                              _lhsIinh-                          -- copy rule (down)-                          _hdOinstVisitNrs =-                              _lhsIinstVisitNrs-                          -- copy rule (down)-                          _hdOnr =-                              _lhsInr-                          -- copy rule (down)-                          _hdOnt =-                              _lhsInt-                          -- copy rule (down)-                          _hdOo_case =-                              _lhsIo_case-                          -- copy rule (down)-                          _hdOo_cata =-                              _lhsIo_cata-                          -- copy rule (down)-                          _hdOo_costcentre =-                              _lhsIo_costcentre-                          -- copy rule (down)-                          _hdOo_data =-                              _lhsIo_data-                          -- copy rule (down)-                          _hdOo_linePragmas =-                              _lhsIo_linePragmas-                          -- copy rule (down)-                          _hdOo_newtypes =-                              _lhsIo_newtypes-                          -- copy rule (down)-                          _hdOo_pretty =-                              _lhsIo_pretty-                          -- copy rule (down)-                          _hdOo_rename =-                              _lhsIo_rename-                          -- copy rule (down)-                          _hdOo_sem =-                              _lhsIo_sem-                          -- copy rule (down)-                          _hdOo_sig =-                              _lhsIo_sig-                          -- copy rule (down)-                          _hdOo_splitsems =-                              _lhsIo_splitsems-                          -- copy rule (down)-                          _hdOo_strictwrap =-                              _lhsIo_strictwrap-                          -- copy rule (down)-                          _hdOo_traces =-                              _lhsIo_traces-                          -- copy rule (down)-                          _hdOo_unbox =-                              _lhsIo_unbox-                          -- copy rule (down)-                          _hdOparamInstMap =-                              _lhsIparamInstMap-                          -- copy rule (down)-                          _hdOparamMap =-                              _lhsIparamMap-                          -- copy rule (down)-                          _hdOprefix =-                              _lhsIprefix-                          -- copy rule (down)-                          _hdOsyn =-                              _lhsIsyn-                          -- copy rule (down)-                          _hdOterminals =-                              _lhsIterminals-                          -- copy rule (down)-                          _hdOunfoldSemDom =-                              _lhsIunfoldSemDom-                          -- copy rule (down)-                          _hdOwhat =-                              _lhsIwhat-                          -- copy rule (down)-                          _tlOallNts =-                              _lhsIallNts-                          -- copy rule (down)-                          _tlOchildren =-                              _lhsIchildren-                          -- copy rule (down)-                          _tlOcon =-                              _lhsIcon-                          -- copy rule (chain)-                          _tlOdeclsAbove =-                              _hdIdeclsAbove-                          -- copy rule (chain)-                          _tlOerrors =-                              _hdIerrors-                          -- copy rule (down)-                          _tlOhigherOrderChildren =-                              _lhsIhigherOrderChildren-                          -- copy rule (down)-                          _tlOinh =-                              _lhsIinh-                          -- copy rule (down)-                          _tlOinstVisitNrs =-                              _lhsIinstVisitNrs-                          -- copy rule (down)-                          _tlOlastExpr =-                              _lhsIlastExpr-                          -- copy rule (down)-                          _tlOnr =-                              _lhsInr-                          -- copy rule (down)-                          _tlOnt =-                              _lhsInt-                          -- copy rule (down)-                          _tlOo_case =-                              _lhsIo_case-                          -- copy rule (down)-                          _tlOo_cata =-                              _lhsIo_cata-                          -- copy rule (down)-                          _tlOo_costcentre =-                              _lhsIo_costcentre-                          -- copy rule (down)-                          _tlOo_data =-                              _lhsIo_data-                          -- copy rule (down)-                          _tlOo_linePragmas =-                              _lhsIo_linePragmas-                          -- copy rule (down)-                          _tlOo_newtypes =-                              _lhsIo_newtypes-                          -- copy rule (down)-                          _tlOo_pretty =-                              _lhsIo_pretty-                          -- copy rule (down)-                          _tlOo_rename =-                              _lhsIo_rename-                          -- copy rule (down)-                          _tlOo_sem =-                              _lhsIo_sem-                          -- copy rule (down)-                          _tlOo_sig =-                              _lhsIo_sig-                          -- copy rule (down)-                          _tlOo_splitsems =-                              _lhsIo_splitsems-                          -- copy rule (down)-                          _tlOo_strictwrap =-                              _lhsIo_strictwrap-                          -- copy rule (down)-                          _tlOo_traces =-                              _lhsIo_traces-                          -- copy rule (down)-                          _tlOo_unbox =-                              _lhsIo_unbox-                          -- copy rule (down)-                          _tlOparamInstMap =-                              _lhsIparamInstMap-                          -- copy rule (down)-                          _tlOparamMap =-                              _lhsIparamMap-                          -- copy rule (down)-                          _tlOprefix =-                              _lhsIprefix-                          -- copy rule (down)-                          _tlOsyn =-                              _lhsIsyn-                          -- copy rule (down)-                          _tlOterminals =-                              _lhsIterminals-                          -- copy rule (down)-                          _tlOunfoldSemDom =-                              _lhsIunfoldSemDom-                          -- copy rule (down)-                          _tlOwhat =-                              _lhsIwhat-                          ( _hdIallTpsFound,_hdIbldBlocksFun,_hdIcomments,_hdIdecls,_hdIdeclsAbove,_hdIdefinedInsts,_hdIerrors,_hdIexprs,_hdItSigs,_hdItps,_hdIusedVars) =-                              (hd_ _hdOallNts _hdOchildren _hdOcon _hdOdeclsAbove _hdOerrors _hdOhigherOrderChildren _hdOinh _hdOinstVisitNrs _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamInstMap _hdOparamMap _hdOprefix _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOwhat )-                          ( _tlIallTpsFound,_tlIblockDecls,_tlIcomments,_tlIdecls,_tlIdeclsAbove,_tlIdefinedInsts,_tlIerrors,_tlIexprs,_tlItSigs,_tlItps,_tlIusedVars) =-                              (tl_ _tlOallNts _tlOchildren _tlOcon _tlOdeclsAbove _tlOerrors _tlOhigherOrderChildren _tlOinh _tlOinstVisitNrs _tlOlastExpr _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOparamInstMap _tlOparamMap _tlOprefix _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOwhat )-                      in  ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars))) )-sem_Sequence_Nil :: T_Sequence -sem_Sequence_Nil  =-    (T_Sequence (\ _lhsIallNts-                   _lhsIchildren-                   _lhsIcon-                   _lhsIdeclsAbove-                   _lhsIerrors-                   _lhsIhigherOrderChildren-                   _lhsIinh-                   _lhsIinstVisitNrs-                   _lhsIlastExpr-                   _lhsInr-                   _lhsInt-                   _lhsIo_case-                   _lhsIo_cata-                   _lhsIo_costcentre-                   _lhsIo_data-                   _lhsIo_linePragmas-                   _lhsIo_newtypes-                   _lhsIo_pretty-                   _lhsIo_rename-                   _lhsIo_sem-                   _lhsIo_sig-                   _lhsIo_splitsems-                   _lhsIo_strictwrap-                   _lhsIo_traces-                   _lhsIo_unbox-                   _lhsIparamInstMap-                   _lhsIparamMap-                   _lhsIprefix-                   _lhsIsyn-                   _lhsIterminals-                   _lhsIunfoldSemDom-                   _lhsIwhat ->-                     (let _lhsOblockDecls :: DeclBlocks-                          _lhsOallTpsFound :: Bool-                          _lhsOcomments :: ([String])-                          _lhsOdecls :: Decls-                          _lhsOdefinedInsts :: ([Identifier])-                          _lhsOerrors :: (Seq Error)-                          _lhsOexprs :: Exprs-                          _lhsOtSigs :: ([Decl])-                          _lhsOtps :: ([Type])-                          _lhsOusedVars :: (Set String)-                          _lhsOdeclsAbove :: ([Decl])-                          -- "GenerateCode.ag"(line 488, column 7)-                          _lhsOblockDecls =-                              DeclTerminator _lhsIdeclsAbove _lhsIlastExpr-                          -- use rule "GenerateCode.ag"(line 354, column 39)-                          _lhsOallTpsFound =-                              True-                          -- use rule "GenerateCode.ag"(line 748, column 52)-                          _lhsOcomments =-                              []-                          -- use rule "GenerateCode.ag"(line 138, column 34)-                          _lhsOdecls =-                              []-                          -- use rule "GenerateCode.ag"(line 205, column 55)-                          _lhsOdefinedInsts =-                              []-                          -- use rule "GenerateCode.ag"(line 729, column 32)-                          _lhsOerrors =-                              Seq.empty-                          -- use rule "GenerateCode.ag"(line 278, column 34)-                          _lhsOexprs =-                              []-                          -- use rule "GenerateCode.ag"(line 307, column 33)-                          _lhsOtSigs =-                              []-                          -- use rule "GenerateCode.ag"(line 353, column 31)-                          _lhsOtps =-                              []-                          -- use rule "GenerateCode.ag"(line 296, column 37)-                          _lhsOusedVars =-                              Set.empty-                          -- copy rule (chain)-                          _lhsOdeclsAbove =-                              _lhsIdeclsAbove+{-# 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)+{-# LINE 31 "../src-derived/GenerateCode.hs" #-}++{-# LINE 2 "./CodeSyntax.ag" #-}++import Patterns+import CommonTypes+import Data.Map(Map)+import Data.Set(Set)+{-# LINE 39 "../src-derived/GenerateCode.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 46 "../src-derived/GenerateCode.hs" #-}++{-# LINE 2 "./DeclBlocks.ag" #-}++import Code (Decl,Expr)+{-# LINE 51 "../src-derived/GenerateCode.hs" #-}+{-# LINE 100 "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 59 "../src-derived/GenerateCode.hs" #-}++{-# LINE 114 "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 66 "../src-derived/GenerateCode.hs" #-}++{-# LINE 197 "GenerateCode.ag" #-}++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 76 "../src-derived/GenerateCode.hs" #-}++{-# LINE 345 "GenerateCode.ag" #-}++substSelf nt tp = case tp of+                    NT t tps | t == _SELF -> Haskell (getName nt ++ " " ++ unwords tps)+                    _                     -> tp+{-# LINE 83 "../src-derived/GenerateCode.hs" #-}++{-# LINE 447 "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++typeAppStrs nm params = TypeApp (SimpleType nm) (map SimpleType params)+{-# LINE 96 "../src-derived/GenerateCode.hs" #-}++{-# LINE 516 "GenerateCode.ag" #-}++-- dead code - replaced by mkPartitionedFunction+{-+localCpsToExpr :: Bool -> [Decl] -> DeclBlocks -> Expr+localCpsToExpr o_case nextVisitDecl+  = r+  where+    r cps+      = case cps of+          DeclTerminator decls expr+            -> mkLet o_case (decls ++ nextVisitDecl) expr+          DeclBlock decls (Decl lhs rhs _ _) remainder+            -> let inDecls = [ PragmaDecl ("NOINLINE " ++ internalCpsName)+                             , Decl (Fun internalCpsName [SimpleExpr internalCpsVarName])+                                    (mkLet o_case [Decl lhs (SimpleExpr internalCpsVarName) Set.empty Set.empty] (rec remainder))+                                    Set.empty Set.empty+                             ]+                   inBody = App "head" [App "(:)" [App internalCpsName [rhs], App "(:)" [App internalCpsName [rhs], SimpleExpr "[]"]]]+                   outerBody = Let inDecls inBody+                   block = mkLet o_case decls outerBody+               in block++internalCpsName :: String+internalCpsName = "internalCps_"++internalCpsVarName :: String+internalCpsVarName = "internalCps_var_"+-}++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 138 "../src-derived/GenerateCode.hs" #-}++{-# LINE 594 "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 161 "../src-derived/GenerateCode.hs" #-}++{-# LINE 657 "GenerateCode.ag" #-}++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'++    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 797 "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 197 "../src-derived/GenerateCode.hs" #-}++{-# LINE 828 "GenerateCode.ag" #-}++-- Lets or nested Cases?+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 _                   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 231 "../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))}+         visit 0:+            local aroundMap   : _+            local unfoldSemDom : _+-}+-- cata+sem_CGrammar :: CGrammar  ->+                T_CGrammar +sem_CGrammar (CGrammar _typeSyns _derivings _wrappers _nonts _pragmas _paramMap _contextMap _aroundsMap )  =+    (sem_CGrammar_CGrammar _typeSyns _derivings _wrappers (sem_CNonterminals _nonts ) _pragmas _paramMap _contextMap _aroundsMap )+-- 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))) ->+                         T_CGrammar +sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ (T_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_ aroundsMap_  =+    (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+                          _nontsOallPragmas :: PragmaMap+                          _nontsOparamMap :: ParamMap+                          _nontsOcontextMap :: ContextMap+                          _nontsOallNts :: (Set NontermIdent)+                          _nontsOwith_sig :: Bool+                          _nontsOerrors :: (Seq Error)+                          _lhsOoutput :: Program+                          _nontsOtypeSyns :: TypeSyns+                          _nontsOderivings :: Derivings+                          _nontsOwrappers :: (Set NontermIdent)+                          _lhsOerrors :: (Seq Error)+                          _nontsOaroundMap :: (Map NontermIdent (Map ConstructorIdent (Set Identifier)))+                          _nontsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                          _nontsIallTpsFound :: Bool+                          _nontsIchunks :: Chunks+                          _nontsIerrors :: (Seq Error)+                          _nontsIgathNts :: (Set NontermIdent)+                          _nontsIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_sig =+                              {-# LINE 50 "GenerateCode.ag" #-}+                              typeSigs      _lhsIoptions+                              {-# LINE 319 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_cata =+                              {-# LINE 51 "GenerateCode.ag" #-}+                              folds         _lhsIoptions+                              {-# LINE 324 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_sem =+                              {-# LINE 52 "GenerateCode.ag" #-}+                              semfuns       _lhsIoptions+                              {-# LINE 329 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_newtypes =+                              {-# LINE 53 "GenerateCode.ag" #-}+                              newtypes      _lhsIoptions+                              {-# LINE 334 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_unbox =+                              {-# LINE 54 "GenerateCode.ag" #-}+                              unbox         _lhsIoptions+                              {-# LINE 339 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_case =+                              {-# LINE 55 "GenerateCode.ag" #-}+                              cases         _lhsIoptions+                              {-# LINE 344 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_pretty =+                              {-# LINE 56 "GenerateCode.ag" #-}+                              attrInfo      _lhsIoptions+                              {-# LINE 349 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_rename =+                              {-# LINE 57 "GenerateCode.ag" #-}+                              rename        _lhsIoptions+                              {-# LINE 354 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_strictwrap =+                              {-# LINE 58 "GenerateCode.ag" #-}+                              strictWrap    _lhsIoptions+                              {-# LINE 359 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_splitsems =+                              {-# LINE 59 "GenerateCode.ag" #-}+                              splitSems     _lhsIoptions+                              {-# LINE 364 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_data =+                              {-# LINE 60 "GenerateCode.ag" #-}+                              if dataTypes _lhsIoptions then Just (strictData _lhsIoptions) else Nothing+                              {-# LINE 369 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOprefix =+                              {-# LINE 61 "GenerateCode.ag" #-}+                              prefix        _lhsIoptions+                              {-# LINE 374 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_traces =+                              {-# LINE 62 "GenerateCode.ag" #-}+                              genTraces     _lhsIoptions+                              {-# LINE 379 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_costcentre =+                              {-# LINE 63 "GenerateCode.ag" #-}+                              genCostCentres _lhsIoptions+                              {-# LINE 384 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 50, column 17)+                          _nontsOo_linePragmas =+                              {-# LINE 64 "GenerateCode.ag" #-}+                              genLinePragmas _lhsIoptions+                              {-# LINE 389 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 69, column 15)+                          _nontsOallPragmas =+                              {-# LINE 69 "GenerateCode.ag" #-}+                              pragmas_+                              {-# LINE 394 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 91, column 14)+                          _nontsOparamMap =+                              {-# LINE 91 "GenerateCode.ag" #-}+                              paramMap_+                              {-# LINE 399 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 112, column 7)+                          _nontsOcontextMap =+                              {-# LINE 112 "GenerateCode.ag" #-}+                              contextMap_+                              {-# LINE 404 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 124, column 7)+                          _nontsOallNts =+                              {-# LINE 124 "GenerateCode.ag" #-}+                              _nontsIgathNts+                              {-# LINE 409 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 481, column 34)+                          _aroundMap =+                              {-# LINE 481 "GenerateCode.ag" #-}+                              aroundsMap_+                              {-# LINE 414 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 650, column 7)+                          _unfoldSemDom =+                              {-# LINE 650 "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 423 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 743, column 14)+                          _nontsOwith_sig =+                              {-# LINE 743 "GenerateCode.ag" #-}+                              typeSigs _lhsIoptions && _nontsIallTpsFound+                              {-# LINE 428 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 750, column 15)+                          _nontsOerrors =+                              {-# LINE 750 "GenerateCode.ag" #-}+                              Seq.empty+                              {-# LINE 433 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 814, column 17)+                          _lhsOoutput =+                              {-# LINE 814 "GenerateCode.ag" #-}+                              Program _nontsIchunks+                              {-# LINE 438 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 867, column 14)+                          _nontsOtypeSyns =+                              {-# LINE 867 "GenerateCode.ag" #-}+                              typeSyns_+                              {-# LINE 443 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 867, column 14)+                          _nontsOderivings =+                              {-# LINE 868 "GenerateCode.ag" #-}+                              derivings_+                              {-# LINE 448 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 867, column 14)+                          _nontsOwrappers =+                              {-# LINE 869 "GenerateCode.ag" #-}+                              wrappers_+                              {-# LINE 453 "GenerateCode.hs" #-}+                          -- copy rule (up)+                          _lhsOerrors =+                              {-# LINE 749 "GenerateCode.ag" #-}+                              _nontsIerrors+                              {-# LINE 458 "GenerateCode.hs" #-}+                          -- copy rule (from local)+                          _nontsOaroundMap =+                              {-# LINE 474 "GenerateCode.ag" #-}+                              _aroundMap+                              {-# LINE 463 "GenerateCode.hs" #-}+                          -- copy rule (from local)+                          _nontsOunfoldSemDom =+                              {-# LINE 646 "GenerateCode.ag" #-}+                              _unfoldSemDom+                              {-# LINE 468 "GenerateCode.hs" #-}+                          ( _nontsIallTpsFound,_nontsIchunks,_nontsIerrors,_nontsIgathNts,_nontsIsemDomUnfoldGath) =+                              (nonts_ _nontsOallNts _nontsOallPragmas _nontsOaroundMap _nontsOcontextMap _nontsOderivings _nontsOerrors _nontsOo_case _nontsOo_cata _nontsOo_costcentre _nontsOo_data _nontsOo_linePragmas _nontsOo_newtypes _nontsOo_pretty _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_splitsems _nontsOo_strictwrap _nontsOo_traces _nontsOo_unbox _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_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+         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 ->+                                      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_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),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_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn )  =+    (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) =+             (sem _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _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_newtypes+                     _lhsIo_pretty+                     _lhsIo_rename+                     _lhsIo_sem+                     _lhsIo_sig+                     _lhsIo_splitsems+                     _lhsIo_strictwrap+                     _lhsIo_traces+                     _lhsIo_unbox+                     _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_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+                            _segOparamMap :: ParamMap+                            _segOprefix :: String+                            _segOsyn :: Attributes+                            _segIcomments :: ([String])+                            _segIisNil :: Bool+                            _segIsemDom :: ([Decl])+                            _segIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+                            _segIwrapDecls :: Decls+                            -- "GenerateCode.ag"(line 231, column 17)+                            _segOnr =+                                {-# LINE 231 "GenerateCode.ag" #-}+                                0+                                {-# LINE 594 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 623, column 18)+                            _lhsOsemDom =+                                {-# LINE 623 "GenerateCode.ag" #-}+                                Comment "semantic domain" : _segIsemDom+                                {-# LINE 599 "GenerateCode.hs" #-}+                            -- use rule "GenerateCode.ag"(line 767, column 52)+                            _lhsOcomments =+                                {-# LINE 767 "GenerateCode.ag" #-}+                                _segIcomments+                                {-# LINE 604 "GenerateCode.hs" #-}+                            -- use rule "GenerateCode.ag"(line 640, column 86)+                            _lhsOsemDomUnfoldGath =+                                {-# LINE 640 "GenerateCode.ag" #-}+                                _segIsemDomUnfoldGath+                                {-# LINE 609 "GenerateCode.hs" #-}+                            -- use rule "GenerateCode.ag"(line 716, column 52)+                            _lhsOwrapDecls =+                                {-# LINE 716 "GenerateCode.ag" #-}+                                _segIwrapDecls+                                {-# LINE 614 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOinh =+                                {-# LINE 77 "GenerateCode.ag" #-}+                                _lhsIinh+                                {-# LINE 619 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOnt =+                                {-# LINE 77 "GenerateCode.ag" #-}+                                _lhsInt+                                {-# LINE 624 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_case =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_case+                                {-# LINE 629 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_cata =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_cata+                                {-# LINE 634 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_costcentre =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_costcentre+                                {-# LINE 639 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_data =+                                {-# LINE 46 "GenerateCode.ag" #-}+                                _lhsIo_data+                                {-# LINE 644 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_linePragmas =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_linePragmas+                                {-# LINE 649 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_newtypes =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_newtypes+                                {-# LINE 654 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_pretty =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_pretty+                                {-# LINE 659 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_rename =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_rename+                                {-# LINE 664 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_sem =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_sem+                                {-# LINE 669 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_sig =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_sig+                                {-# LINE 674 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_splitsems =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_splitsems+                                {-# LINE 679 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_strictwrap =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_strictwrap+                                {-# LINE 684 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_traces =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_traces+                                {-# LINE 689 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOo_unbox =+                                {-# LINE 45 "GenerateCode.ag" #-}+                                _lhsIo_unbox+                                {-# LINE 694 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOparamMap =+                                {-# LINE 88 "GenerateCode.ag" #-}+                                _lhsIparamMap+                                {-# LINE 699 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOprefix =+                                {-# LINE 47 "GenerateCode.ag" #-}+                                _lhsIprefix+                                {-# LINE 704 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _segOsyn =+                                {-# LINE 77 "GenerateCode.ag" #-}+                                _lhsIsyn+                                {-# LINE 709 "GenerateCode.hs" #-}+                            ( _segIcomments,_segIisNil,_segIsemDom,_segIsemDomUnfoldGath,_segIwrapDecls) =+                                (seg_ _segOinh _segOnr _segOnt _segOo_case _segOo_cata _segOo_costcentre _segOo_data _segOo_linePragmas _segOo_newtypes _segOo_pretty _segOo_rename _segOo_sem _segOo_sig _segOo_splitsems _segOo_strictwrap _segOo_traces _segOo_unbox _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+         o_case               : Bool+         o_cata               : Bool+         o_costcentre         : Bool+         o_data               : Maybe Bool+         o_linePragmas        : 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+         paramMap             : ParamMap+         prefix               : String+         typeSyns             : TypeSyns+         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type+         with_sig             : Bool+         wrappers             : Set NontermIdent+      chained attribute:+         errors               : Seq Error+      synthesized attributes:+         allTpsFound          : Bool+         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 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 ->+                                          (Seq Error) ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          (Maybe Bool) ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          ParamMap ->+                                          String ->+                                          TypeSyns ->+                                          (NontermIdent -> Int -> [String] -> Code.Type) ->+                                          Bool ->+                                          (Set NontermIdent) ->+                                          ( Bool,Chunks,(Seq Error),(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),errors_Inh_CNonterminal :: !(Seq Error),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_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),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 {allTpsFound_Syn_CNonterminal :: !(Bool),chunks_Syn_CNonterminal :: !(Chunks),errors_Syn_CNonterminal :: !(Seq Error),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 _lhsIerrors _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )  =+    (let ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath) =+             (sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsIerrors _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )+     in  (Syn_CNonterminal _lhsOallTpsFound _lhsOchunks _lhsOerrors _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+                       _lhsIerrors+                       _lhsIo_case+                       _lhsIo_cata+                       _lhsIo_costcentre+                       _lhsIo_data+                       _lhsIo_linePragmas+                       _lhsIo_newtypes+                       _lhsIo_pretty+                       _lhsIo_rename+                       _lhsIo_sem+                       _lhsIo_sig+                       _lhsIo_splitsems+                       _lhsIo_strictwrap+                       _lhsIo_traces+                       _lhsIo_unbox+                       _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+                              _lhsOallTpsFound :: Bool+                              _lhsOerrors :: (Seq Error)+                              _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+                              _prodsOallNts :: (Set NontermIdent)+                              _prodsOallPragmas :: PragmaMap+                              _prodsOaroundMap :: (Map ConstructorIdent (Set Identifier))+                              _prodsOcontextMap :: ContextMap+                              _prodsOerrors :: (Seq Error)+                              _prodsOo_case :: Bool+                              _prodsOo_cata :: Bool+                              _prodsOo_costcentre :: Bool+                              _prodsOo_data :: (Maybe Bool)+                              _prodsOo_linePragmas :: 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+                              _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_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+                              _interOparamMap :: ParamMap+                              _interOprefix :: String+                              _prodsIallTpsFound :: Bool+                              _prodsIcataAlts :: Decls+                              _prodsIcomments :: ([String])+                              _prodsIdataAlts :: DataAlts+                              _prodsIdecls :: Decls+                              _prodsIerrors :: (Seq Error)+                              _prodsIsemNames :: ([String])+                              _interIcomments :: ([String])+                              _interIsemDom :: ([Decl])+                              _interIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+                              _interIwrapDecls :: Decls+                              -- "GenerateCode.ag"(line 79, column 26)+                              __tup1 =+                                  {-# LINE 79 "GenerateCode.ag" #-}+                                  (inh_,syn_,nt_)+                                  {-# LINE 909 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 79, column 26)+                              (_interOinh,_,_) =+                                  {-# LINE 79 "GenerateCode.ag" #-}+                                  __tup1+                                  {-# LINE 914 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 79, column 26)+                              (_,_interOsyn,_) =+                                  {-# LINE 79 "GenerateCode.ag" #-}+                                  __tup1+                                  {-# LINE 919 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 79, column 26)+                              (_,_,_interOnt) =+                                  {-# LINE 79 "GenerateCode.ag" #-}+                                  __tup1+                                  {-# LINE 924 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 80, column 25)+                              __tup2 =+                                  {-# LINE 80 "GenerateCode.ag" #-}+                                  (inh_,syn_,nt_)+                                  {-# LINE 929 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 80, column 25)+                              (_prodsOinh,_,_) =+                                  {-# LINE 80 "GenerateCode.ag" #-}+                                  __tup2+                                  {-# LINE 934 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 80, column 25)+                              (_,_prodsOsyn,_) =+                                  {-# LINE 80 "GenerateCode.ag" #-}+                                  __tup2+                                  {-# LINE 939 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 80, column 25)+                              (_,_,_prodsOnt) =+                                  {-# LINE 80 "GenerateCode.ag" #-}+                                  __tup2+                                  {-# LINE 944 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 130, column 7)+                              _lhsOgathNts =+                                  {-# LINE 130 "GenerateCode.ag" #-}+                                  Set.singleton nt_+                                  {-# LINE 949 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 482, column 34)+                              _aroundMap =+                                  {-# LINE 482 "GenerateCode.ag" #-}+                                  Map.findWithDefault Map.empty nt_ _lhsIaroundMap+                                  {-# LINE 954 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 688, column 18)+                              _semWrapper =+                                  {-# LINE 688 "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+                                      evalTpCommon t | null params' = t+                                                     | otherwise    = case (evalTp (SimpleType t)) of SimpleType t' -> t'+                                      appParams nm = TypeApp (SimpleType nm) (map SimpleType params')+                                      typeSig = TSig wrapNT (evalTp $ appParams (sdtype nt_) `Arr` (appParams inhNT `Arr` appParams synNT))+                                      mkstrict = if _lhsIo_strictwrap then (\x -> "!(" ++ x ++ ")") else id+                                      mkdata n attrs = Data n params' [Record n [(getName f++"_"++n,mkstrict $ evalTpCommon $ typeToHaskellString (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 984 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 763, column 18)+                              _comment =+                                  {-# LINE 763 "GenerateCode.ag" #-}+                                  Comment . unlines . map ind $ ( _interIcomments ++ ("alternatives:" : map ind _prodsIcomments) )+                                  {-# LINE 989 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 817, column 19)+                              _lhsOchunks =+                                  {-# LINE 817 "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 1003 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 872, column 18)+                              _dataDef =+                                  {-# LINE 872 "GenerateCode.ag" #-}+                                  let params' = map getName params_+                                      typeSyn tp = let theType =+                                                         case tp of+                                                           CommonTypes.Maybe t      -> SimpleType ("Maybe (" ++ typeToHaskellString (Just nt_) params' t ++")")+                                                           CommonTypes.Either t1 t2 -> SimpleType ("Either (" ++ typeToHaskellString (Just nt_) params' t1 ++") ("+                                                                                                              ++ typeToHaskellString (Just nt_) params' t2 ++")")+                                                           CommonTypes.Map t1 t2    -> SimpleType ("Map (" ++ typeToHaskellString (Just nt_) params' t1 ++") ("+                                                                                                           ++ typeToHaskellString (Just nt_) params' t2 ++")")+                                                           CommonTypes.IntMap t     -> SimpleType ("IntMap (" ++ typeToHaskellString (Just nt_) params' t ++")")+                                                           CommonTypes.List t       -> Code.List $ SimpleType (typeToHaskellString (Just nt_) params' t)+                                                           CommonTypes.Tuple ts     -> Code.TupleType [SimpleType (typeToHaskellString (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 1024 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 906, column 18)+                              _cataFun =+                                  {-# LINE 906 "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 1109 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 735, column 39)+                              _lhsOallTpsFound =+                                  {-# LINE 735 "GenerateCode.ag" #-}+                                  _prodsIallTpsFound+                                  {-# LINE 1114 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 748, column 32)+                              _lhsOerrors =+                                  {-# LINE 748 "GenerateCode.ag" #-}+                                  _prodsIerrors+                                  {-# LINE 1119 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 640, column 86)+                              _lhsOsemDomUnfoldGath =+                                  {-# LINE 640 "GenerateCode.ag" #-}+                                  _interIsemDomUnfoldGath+                                  {-# LINE 1124 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOallNts =+                                  {-# LINE 120 "GenerateCode.ag" #-}+                                  _lhsIallNts+                                  {-# LINE 1129 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOallPragmas =+                                  {-# LINE 66 "GenerateCode.ag" #-}+                                  _lhsIallPragmas+                                  {-# LINE 1134 "GenerateCode.hs" #-}+                              -- copy rule (from local)+                              _prodsOaroundMap =+                                  {-# LINE 477 "GenerateCode.ag" #-}+                                  _aroundMap+                                  {-# LINE 1139 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOcontextMap =+                                  {-# LINE 108 "GenerateCode.ag" #-}+                                  _lhsIcontextMap+                                  {-# LINE 1144 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOerrors =+                                  {-# LINE 748 "GenerateCode.ag" #-}+                                  _lhsIerrors+                                  {-# LINE 1149 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_case =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_case+                                  {-# LINE 1154 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_cata =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_cata+                                  {-# LINE 1159 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_costcentre =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_costcentre+                                  {-# LINE 1164 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_data =+                                  {-# LINE 46 "GenerateCode.ag" #-}+                                  _lhsIo_data+                                  {-# LINE 1169 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_linePragmas =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_linePragmas+                                  {-# LINE 1174 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_newtypes =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_newtypes+                                  {-# LINE 1179 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_pretty =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_pretty+                                  {-# LINE 1184 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_rename =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_rename+                                  {-# LINE 1189 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_sem =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_sem+                                  {-# LINE 1194 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_sig =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_sig+                                  {-# LINE 1199 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_splitsems =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_splitsems+                                  {-# LINE 1204 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_strictwrap =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_strictwrap+                                  {-# LINE 1209 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_traces =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_traces+                                  {-# LINE 1214 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOo_unbox =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_unbox+                                  {-# LINE 1219 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOparamMap =+                                  {-# LINE 88 "GenerateCode.ag" #-}+                                  _lhsIparamMap+                                  {-# LINE 1224 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOprefix =+                                  {-# LINE 47 "GenerateCode.ag" #-}+                                  _lhsIprefix+                                  {-# LINE 1229 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOunfoldSemDom =+                                  {-# LINE 646 "GenerateCode.ag" #-}+                                  _lhsIunfoldSemDom+                                  {-# LINE 1234 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _prodsOwith_sig =+                                  {-# LINE 738 "GenerateCode.ag" #-}+                                  _lhsIwith_sig+                                  {-# LINE 1239 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_case =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_case+                                  {-# LINE 1244 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_cata =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_cata+                                  {-# LINE 1249 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_costcentre =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_costcentre+                                  {-# LINE 1254 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_data =+                                  {-# LINE 46 "GenerateCode.ag" #-}+                                  _lhsIo_data+                                  {-# LINE 1259 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_linePragmas =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_linePragmas+                                  {-# LINE 1264 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_newtypes =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_newtypes+                                  {-# LINE 1269 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_pretty =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_pretty+                                  {-# LINE 1274 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_rename =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_rename+                                  {-# LINE 1279 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_sem =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_sem+                                  {-# LINE 1284 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_sig =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_sig+                                  {-# LINE 1289 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_splitsems =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_splitsems+                                  {-# LINE 1294 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_strictwrap =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_strictwrap+                                  {-# LINE 1299 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_traces =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_traces+                                  {-# LINE 1304 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOo_unbox =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_unbox+                                  {-# LINE 1309 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOparamMap =+                                  {-# LINE 88 "GenerateCode.ag" #-}+                                  _lhsIparamMap+                                  {-# LINE 1314 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _interOprefix =+                                  {-# LINE 47 "GenerateCode.ag" #-}+                                  _lhsIprefix+                                  {-# LINE 1319 "GenerateCode.hs" #-}+                              ( _prodsIallTpsFound,_prodsIcataAlts,_prodsIcomments,_prodsIdataAlts,_prodsIdecls,_prodsIerrors,_prodsIsemNames) =+                                  (prods_ _prodsOallNts _prodsOallPragmas _prodsOaroundMap _prodsOcontextMap _prodsOerrors _prodsOinh _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_costcentre _prodsOo_data _prodsOo_linePragmas _prodsOo_newtypes _prodsOo_pretty _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_splitsems _prodsOo_strictwrap _prodsOo_traces _prodsOo_unbox _prodsOparamMap _prodsOprefix _prodsOsyn _prodsOunfoldSemDom _prodsOwith_sig )+                              ( _interIcomments,_interIsemDom,_interIsemDomUnfoldGath,_interIwrapDecls) =+                                  (inter_ _interOinh _interOnt _interOo_case _interOo_cata _interOo_costcentre _interOo_data _interOo_linePragmas _interOo_newtypes _interOo_pretty _interOo_rename _interOo_sem _interOo_sig _interOo_splitsems _interOo_strictwrap _interOo_traces _interOo_unbox _interOparamMap _interOprefix _interOsyn )+                          in  ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )+-- CNonterminals -----------------------------------------------+{-+   visit 0:+      inherited attributes:+         allNts               : Set NontermIdent+         allPragmas           : PragmaMap+         aroundMap            : Map NontermIdent (Map ConstructorIdent (Set Identifier))+         contextMap           : ContextMap+         derivings            : Derivings+         o_case               : Bool+         o_cata               : Bool+         o_costcentre         : Bool+         o_data               : Maybe Bool+         o_linePragmas        : 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+         paramMap             : ParamMap+         prefix               : String+         typeSyns             : TypeSyns+         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type+         with_sig             : Bool+         wrappers             : Set NontermIdent+      chained attribute:+         errors               : Seq Error+      synthesized attributes:+         allTpsFound          : Bool+         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 ->+                                            (Seq Error) ->+                                            Bool ->+                                            Bool ->+                                            Bool ->+                                            (Maybe Bool) ->+                                            Bool ->+                                            Bool ->+                                            Bool ->+                                            Bool ->+                                            Bool ->+                                            Bool ->+                                            Bool ->+                                            Bool ->+                                            Bool ->+                                            Bool ->+                                            ParamMap ->+                                            String ->+                                            TypeSyns ->+                                            (NontermIdent -> Int -> [String] -> Code.Type) ->+                                            Bool ->+                                            (Set NontermIdent) ->+                                            ( Bool,Chunks,(Seq Error),(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),errors_Inh_CNonterminals :: !(Seq Error),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_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),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 {allTpsFound_Syn_CNonterminals :: !(Bool),chunks_Syn_CNonterminals :: !(Chunks),errors_Syn_CNonterminals :: !(Seq Error),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 _lhsIerrors _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )  =+    (let ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath) =+             (sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsIerrors _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers )+     in  (Syn_CNonterminals _lhsOallTpsFound _lhsOchunks _lhsOerrors _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+                        _lhsIerrors+                        _lhsIo_case+                        _lhsIo_cata+                        _lhsIo_costcentre+                        _lhsIo_data+                        _lhsIo_linePragmas+                        _lhsIo_newtypes+                        _lhsIo_pretty+                        _lhsIo_rename+                        _lhsIo_sem+                        _lhsIo_sig+                        _lhsIo_splitsems+                        _lhsIo_strictwrap+                        _lhsIo_traces+                        _lhsIo_unbox+                        _lhsIparamMap+                        _lhsIprefix+                        _lhsItypeSyns+                        _lhsIunfoldSemDom+                        _lhsIwith_sig+                        _lhsIwrappers ->+                          (let _lhsOallTpsFound :: Bool+                               _lhsOchunks :: Chunks+                               _lhsOerrors :: (Seq Error)+                               _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+                               _hdOerrors :: (Seq Error)+                               _hdOo_case :: Bool+                               _hdOo_cata :: Bool+                               _hdOo_costcentre :: Bool+                               _hdOo_data :: (Maybe Bool)+                               _hdOo_linePragmas :: 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+                               _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+                               _tlOerrors :: (Seq Error)+                               _tlOo_case :: Bool+                               _tlOo_cata :: Bool+                               _tlOo_costcentre :: Bool+                               _tlOo_data :: (Maybe Bool)+                               _tlOo_linePragmas :: 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+                               _tlOparamMap :: ParamMap+                               _tlOprefix :: String+                               _tlOtypeSyns :: TypeSyns+                               _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                               _tlOwith_sig :: Bool+                               _tlOwrappers :: (Set NontermIdent)+                               _hdIallTpsFound :: Bool+                               _hdIchunks :: Chunks+                               _hdIerrors :: (Seq Error)+                               _hdIgathNts :: (Set NontermIdent)+                               _hdIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+                               _tlIallTpsFound :: Bool+                               _tlIchunks :: Chunks+                               _tlIerrors :: (Seq Error)+                               _tlIgathNts :: (Set NontermIdent)+                               _tlIsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+                               -- use rule "GenerateCode.ag"(line 735, column 39)+                               _lhsOallTpsFound =+                                   {-# LINE 735 "GenerateCode.ag" #-}+                                   _hdIallTpsFound && _tlIallTpsFound+                                   {-# LINE 1510 "GenerateCode.hs" #-}+                               -- use rule "GenerateCode.ag"(line 809, column 49)+                               _lhsOchunks =+                                   {-# LINE 809 "GenerateCode.ag" #-}+                                   _hdIchunks ++ _tlIchunks+                                   {-# LINE 1515 "GenerateCode.hs" #-}+                               -- use rule "GenerateCode.ag"(line 748, column 32)+                               _lhsOerrors =+                                   {-# LINE 748 "GenerateCode.ag" #-}+                                   _hdIerrors Seq.>< _tlIerrors+                                   {-# LINE 1520 "GenerateCode.hs" #-}+                               -- use rule "GenerateCode.ag"(line 126, column 47)+                               _lhsOgathNts =+                                   {-# LINE 126 "GenerateCode.ag" #-}+                                   _hdIgathNts `Set.union` _tlIgathNts+                                   {-# LINE 1525 "GenerateCode.hs" #-}+                               -- use rule "GenerateCode.ag"(line 640, column 86)+                               _lhsOsemDomUnfoldGath =+                                   {-# LINE 640 "GenerateCode.ag" #-}+                                   _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath+                                   {-# LINE 1530 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOallNts =+                                   {-# LINE 120 "GenerateCode.ag" #-}+                                   _lhsIallNts+                                   {-# LINE 1535 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOallPragmas =+                                   {-# LINE 66 "GenerateCode.ag" #-}+                                   _lhsIallPragmas+                                   {-# LINE 1540 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOaroundMap =+                                   {-# LINE 474 "GenerateCode.ag" #-}+                                   _lhsIaroundMap+                                   {-# LINE 1545 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOcontextMap =+                                   {-# LINE 108 "GenerateCode.ag" #-}+                                   _lhsIcontextMap+                                   {-# LINE 1550 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOderivings =+                                   {-# LINE 865 "GenerateCode.ag" #-}+                                   _lhsIderivings+                                   {-# LINE 1555 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOerrors =+                                   {-# LINE 748 "GenerateCode.ag" #-}+                                   _lhsIerrors+                                   {-# LINE 1560 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_case =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_case+                                   {-# LINE 1565 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_cata =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_cata+                                   {-# LINE 1570 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_costcentre =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_costcentre+                                   {-# LINE 1575 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_data =+                                   {-# LINE 46 "GenerateCode.ag" #-}+                                   _lhsIo_data+                                   {-# LINE 1580 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_linePragmas =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_linePragmas+                                   {-# LINE 1585 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_newtypes =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_newtypes+                                   {-# LINE 1590 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_pretty =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_pretty+                                   {-# LINE 1595 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_rename =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_rename+                                   {-# LINE 1600 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_sem =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_sem+                                   {-# LINE 1605 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_sig =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_sig+                                   {-# LINE 1610 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_splitsems =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_splitsems+                                   {-# LINE 1615 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_strictwrap =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_strictwrap+                                   {-# LINE 1620 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_traces =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_traces+                                   {-# LINE 1625 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOo_unbox =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_unbox+                                   {-# LINE 1630 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOparamMap =+                                   {-# LINE 88 "GenerateCode.ag" #-}+                                   _lhsIparamMap+                                   {-# LINE 1635 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOprefix =+                                   {-# LINE 47 "GenerateCode.ag" #-}+                                   _lhsIprefix+                                   {-# LINE 1640 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOtypeSyns =+                                   {-# LINE 865 "GenerateCode.ag" #-}+                                   _lhsItypeSyns+                                   {-# LINE 1645 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOunfoldSemDom =+                                   {-# LINE 646 "GenerateCode.ag" #-}+                                   _lhsIunfoldSemDom+                                   {-# LINE 1650 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOwith_sig =+                                   {-# LINE 738 "GenerateCode.ag" #-}+                                   _lhsIwith_sig+                                   {-# LINE 1655 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _hdOwrappers =+                                   {-# LINE 865 "GenerateCode.ag" #-}+                                   _lhsIwrappers+                                   {-# LINE 1660 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOallNts =+                                   {-# LINE 120 "GenerateCode.ag" #-}+                                   _lhsIallNts+                                   {-# LINE 1665 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOallPragmas =+                                   {-# LINE 66 "GenerateCode.ag" #-}+                                   _lhsIallPragmas+                                   {-# LINE 1670 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOaroundMap =+                                   {-# LINE 474 "GenerateCode.ag" #-}+                                   _lhsIaroundMap+                                   {-# LINE 1675 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOcontextMap =+                                   {-# LINE 108 "GenerateCode.ag" #-}+                                   _lhsIcontextMap+                                   {-# LINE 1680 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOderivings =+                                   {-# LINE 865 "GenerateCode.ag" #-}+                                   _lhsIderivings+                                   {-# LINE 1685 "GenerateCode.hs" #-}+                               -- copy rule (chain)+                               _tlOerrors =+                                   {-# LINE 748 "GenerateCode.ag" #-}+                                   _hdIerrors+                                   {-# LINE 1690 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_case =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_case+                                   {-# LINE 1695 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_cata =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_cata+                                   {-# LINE 1700 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_costcentre =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_costcentre+                                   {-# LINE 1705 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_data =+                                   {-# LINE 46 "GenerateCode.ag" #-}+                                   _lhsIo_data+                                   {-# LINE 1710 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_linePragmas =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_linePragmas+                                   {-# LINE 1715 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_newtypes =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_newtypes+                                   {-# LINE 1720 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_pretty =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_pretty+                                   {-# LINE 1725 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_rename =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_rename+                                   {-# LINE 1730 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_sem =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_sem+                                   {-# LINE 1735 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_sig =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_sig+                                   {-# LINE 1740 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_splitsems =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_splitsems+                                   {-# LINE 1745 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_strictwrap =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_strictwrap+                                   {-# LINE 1750 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_traces =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_traces+                                   {-# LINE 1755 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOo_unbox =+                                   {-# LINE 45 "GenerateCode.ag" #-}+                                   _lhsIo_unbox+                                   {-# LINE 1760 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOparamMap =+                                   {-# LINE 88 "GenerateCode.ag" #-}+                                   _lhsIparamMap+                                   {-# LINE 1765 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOprefix =+                                   {-# LINE 47 "GenerateCode.ag" #-}+                                   _lhsIprefix+                                   {-# LINE 1770 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOtypeSyns =+                                   {-# LINE 865 "GenerateCode.ag" #-}+                                   _lhsItypeSyns+                                   {-# LINE 1775 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOunfoldSemDom =+                                   {-# LINE 646 "GenerateCode.ag" #-}+                                   _lhsIunfoldSemDom+                                   {-# LINE 1780 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOwith_sig =+                                   {-# LINE 738 "GenerateCode.ag" #-}+                                   _lhsIwith_sig+                                   {-# LINE 1785 "GenerateCode.hs" #-}+                               -- copy rule (down)+                               _tlOwrappers =+                                   {-# LINE 865 "GenerateCode.ag" #-}+                                   _lhsIwrappers+                                   {-# LINE 1790 "GenerateCode.hs" #-}+                               ( _hdIallTpsFound,_hdIchunks,_hdIerrors,_hdIgathNts,_hdIsemDomUnfoldGath) =+                                   (hd_ _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOderivings _hdOerrors _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamMap _hdOprefix _hdOtypeSyns _hdOunfoldSemDom _hdOwith_sig _hdOwrappers )+                               ( _tlIallTpsFound,_tlIchunks,_tlIerrors,_tlIgathNts,_tlIsemDomUnfoldGath) =+                                   (tl_ _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOderivings _tlOerrors _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOparamMap _tlOprefix _tlOtypeSyns _tlOunfoldSemDom _tlOwith_sig _tlOwrappers )+                           in  ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )+sem_CNonterminals_Nil :: T_CNonterminals +sem_CNonterminals_Nil  =+    (T_CNonterminals (\ _lhsIallNts+                        _lhsIallPragmas+                        _lhsIaroundMap+                        _lhsIcontextMap+                        _lhsIderivings+                        _lhsIerrors+                        _lhsIo_case+                        _lhsIo_cata+                        _lhsIo_costcentre+                        _lhsIo_data+                        _lhsIo_linePragmas+                        _lhsIo_newtypes+                        _lhsIo_pretty+                        _lhsIo_rename+                        _lhsIo_sem+                        _lhsIo_sig+                        _lhsIo_splitsems+                        _lhsIo_strictwrap+                        _lhsIo_traces+                        _lhsIo_unbox+                        _lhsIparamMap+                        _lhsIprefix+                        _lhsItypeSyns+                        _lhsIunfoldSemDom+                        _lhsIwith_sig+                        _lhsIwrappers ->+                          (let _lhsOallTpsFound :: Bool+                               _lhsOchunks :: Chunks+                               _lhsOerrors :: (Seq Error)+                               _lhsOgathNts :: (Set NontermIdent)+                               _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+                               -- use rule "GenerateCode.ag"(line 735, column 39)+                               _lhsOallTpsFound =+                                   {-# LINE 735 "GenerateCode.ag" #-}+                                   True+                                   {-# LINE 1833 "GenerateCode.hs" #-}+                               -- use rule "GenerateCode.ag"(line 809, column 49)+                               _lhsOchunks =+                                   {-# LINE 809 "GenerateCode.ag" #-}+                                   []+                                   {-# LINE 1838 "GenerateCode.hs" #-}+                               -- use rule "GenerateCode.ag"(line 748, column 32)+                               _lhsOerrors =+                                   {-# LINE 748 "GenerateCode.ag" #-}+                                   Seq.empty+                                   {-# LINE 1843 "GenerateCode.hs" #-}+                               -- use rule "GenerateCode.ag"(line 126, column 47)+                               _lhsOgathNts =+                                   {-# LINE 126 "GenerateCode.ag" #-}+                                   Set.empty+                                   {-# LINE 1848 "GenerateCode.hs" #-}+                               -- use rule "GenerateCode.ag"(line 640, column 86)+                               _lhsOsemDomUnfoldGath =+                                   {-# LINE 640 "GenerateCode.ag" #-}+                                   Map.empty+                                   {-# LINE 1853 "GenerateCode.hs" #-}+                           in  ( _lhsOallTpsFound,_lhsOchunks,_lhsOerrors,_lhsOgathNts,_lhsOsemDomUnfoldGath))) )+-- CProduction -------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allNts               : Set NontermIdent+         allPragmas           : PragmaMap+         aroundMap            : Map ConstructorIdent (Set Identifier)+         contextMap           : ContextMap+         inh                  : Attributes+         nt                   : NontermIdent+         o_case               : Bool+         o_cata               : Bool+         o_costcentre         : Bool+         o_data               : Maybe Bool+         o_linePragmas        : 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+         paramMap             : ParamMap+         prefix               : String+         syn                  : Attributes+         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type+         with_sig             : Bool+      chained attribute:+         errors               : Seq Error+      synthesized attributes:+         allTpsFound          : Bool+         cataAlt              : Decl+         comments             : [String]+         dataAlt              : DataAlt+         decls                : Decls+         semNames             : [String]+   alternatives:+      alternative CProduction:+         child con            : {ConstructorIdent}+         child visits         : CVisits +         child children       : {[(Identifier,Type,Bool)]}+         child terminals      : {[Identifier]}+         visit 0:+            local paramInstMap : _+            local aroundMap   : _+            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 ->+                                        (Seq Error) ->+                                        Attributes ->+                                        NontermIdent ->+                                        Bool ->+                                        Bool ->+                                        Bool ->+                                        (Maybe Bool) ->+                                        Bool ->+                                        Bool ->+                                        Bool ->+                                        Bool ->+                                        Bool ->+                                        Bool ->+                                        Bool ->+                                        Bool ->+                                        Bool ->+                                        Bool ->+                                        ParamMap ->+                                        String ->+                                        Attributes ->+                                        (NontermIdent -> Int -> [String] -> Code.Type) ->+                                        Bool ->+                                        ( Bool,Decl,([String]),DataAlt,Decls,(Seq Error),([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),errors_Inh_CProduction :: !(Seq Error),inh_Inh_CProduction :: !(Attributes),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_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),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 {allTpsFound_Syn_CProduction :: !(Bool),cataAlt_Syn_CProduction :: !(Decl),comments_Syn_CProduction :: !([String]),dataAlt_Syn_CProduction :: !(DataAlt),decls_Syn_CProduction :: !(Decls),errors_Syn_CProduction :: !(Seq Error),semNames_Syn_CProduction :: !([String])}+wrap_CProduction :: T_CProduction  ->+                    Inh_CProduction  ->+                    Syn_CProduction +wrap_CProduction (T_CProduction sem ) (Inh_CProduction _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIerrors _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )  =+    (let ( _lhsOallTpsFound,_lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOerrors,_lhsOsemNames) =+             (sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIerrors _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )+     in  (Syn_CProduction _lhsOallTpsFound _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOerrors _lhsOsemNames ))+sem_CProduction_CProduction :: ConstructorIdent ->+                               T_CVisits  ->+                               ([(Identifier,Type,Bool)]) ->+                               ([Identifier]) ->+                               T_CProduction +sem_CProduction_CProduction con_ (T_CVisits visits_ ) children_ terminals_  =+    (T_CProduction (\ _lhsIallNts+                      _lhsIallPragmas+                      _lhsIaroundMap+                      _lhsIcontextMap+                      _lhsIerrors+                      _lhsIinh+                      _lhsInt+                      _lhsIo_case+                      _lhsIo_cata+                      _lhsIo_costcentre+                      _lhsIo_data+                      _lhsIo_linePragmas+                      _lhsIo_newtypes+                      _lhsIo_pretty+                      _lhsIo_rename+                      _lhsIo_sem+                      _lhsIo_sig+                      _lhsIo_splitsems+                      _lhsIo_strictwrap+                      _lhsIo_traces+                      _lhsIo_unbox+                      _lhsIparamMap+                      _lhsIprefix+                      _lhsIsyn+                      _lhsIunfoldSemDom+                      _lhsIwith_sig ->+                        (let _visitsOcon :: ConstructorIdent+                             _visitsOterminals :: ([Identifier])+                             _visitsOnr :: Int+                             _visitsOchildren :: ([(Identifier,Type,Bool)])+                             _visitsOinstVisitNrs :: (Map Identifier Int)+                             _lhsOcomments :: ([String])+                             _lhsOdataAlt :: DataAlt+                             _lhsOcataAlt :: Decl+                             _lhsOallTpsFound :: Bool+                             _lhsOdecls :: Decls+                             _lhsOerrors :: (Seq Error)+                             _lhsOsemNames :: ([String])+                             _visitsOallNts :: (Set NontermIdent)+                             _visitsOallPragmas :: PragmaMap+                             _visitsOaroundMap :: (Set Identifier)+                             _visitsOcontextMap :: ContextMap+                             _visitsOerrors :: (Seq Error)+                             _visitsOinh :: Attributes+                             _visitsOnt :: NontermIdent+                             _visitsOo_case :: Bool+                             _visitsOo_cata :: Bool+                             _visitsOo_costcentre :: Bool+                             _visitsOo_data :: (Maybe Bool)+                             _visitsOo_linePragmas :: 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+                             _visitsOparamInstMap :: (Map Identifier (NontermIdent, [String]))+                             _visitsOparamMap :: ParamMap+                             _visitsOprefix :: String+                             _visitsOsyn :: Attributes+                             _visitsOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                             _visitsOwith_sig :: Bool+                             _visitsIallTpsFound :: Bool+                             _visitsIcomments :: ([String])+                             _visitsIdecls :: Decls+                             _visitsIerrors :: (Seq Error)+                             _visitsIgatherInstVisitNrs :: (Map Identifier Int)+                             _visitsIintra :: Exprs+                             _visitsIintraVars :: (Set String)+                             _visitsIisNil :: Bool+                             _visitsIsemNames :: ([String])+                             -- "GenerateCode.ag"(line 85, column 19)+                             _visitsOcon =+                                 {-# LINE 85 "GenerateCode.ag" #-}+                                 con_+                                 {-# LINE 2031 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 86, column 20)+                             _visitsOterminals =+                                 {-# LINE 86 "GenerateCode.ag" #-}+                                 terminals_+                                 {-# LINE 2036 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 98, column 7)+                             _paramInstMap =+                                 {-# LINE 98 "GenerateCode.ag" #-}+                                 Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- children_, let tps = map cleanupArg $ nontermArgs tp, not (null tps) ]+                                 {-# LINE 2041 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 227, column 18)+                             _visitsOnr =+                                 {-# LINE 227 "GenerateCode.ag" #-}+                                 0+                                 {-# LINE 2046 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 353, column 18)+                             _visitsOchildren =+                                 {-# LINE 353 "GenerateCode.ag" #-}+                                 children_+                                 {-# LINE 2051 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 463, column 7)+                             _visitsOinstVisitNrs =+                                 {-# LINE 463 "GenerateCode.ag" #-}+                                 _visitsIgatherInstVisitNrs+                                 {-# LINE 2056 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 483, column 34)+                             _aroundMap =+                                 {-# LINE 483 "GenerateCode.ag" #-}+                                 Map.findWithDefault Set.empty con_ _lhsIaroundMap+                                 {-# LINE 2061 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 778, column 17)+                             _firstOrderChildren =+                                 {-# LINE 778 "GenerateCode.ag" #-}+                                 filter (\(_,_,ho) -> not ho) children_+                                 {-# LINE 2066 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 779, column 18)+                             _lhsOcomments =+                                 {-# LINE 779 "GenerateCode.ag" #-}+                                 ("alternative " ++ getName con_ ++ ":")+                                 : map ind (  map (\(x,y,_) -> makeLocalComment 14 "child" x (Just y)) _firstOrderChildren+                                           ++ _visitsIcomments+                                           )+                                 {-# LINE 2074 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 898, column 17)+                             _params =+                                 {-# LINE 898 "GenerateCode.ag" #-}+                                 map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+                                 {-# LINE 2079 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 899, column 17)+                             _lhsOdataAlt =+                                 {-# LINE 899 "GenerateCode.ag" #-}+                                 DataAlt (conname _lhsIo_rename _lhsInt con_) (map (\(_,t,_) -> typeToHaskellString (Just _lhsInt) _params     t) _firstOrderChildren    )+                                 {-# LINE 2084 "GenerateCode.hs" #-}+                             -- "GenerateCode.ag"(line 998, column 17)+                             _lhsOcataAlt =+                                 {-# LINE 998 "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 2098 "GenerateCode.hs" #-}+                             -- use rule "GenerateCode.ag"(line 735, column 39)+                             _lhsOallTpsFound =+                                 {-# LINE 735 "GenerateCode.ag" #-}+                                 _visitsIallTpsFound+                                 {-# LINE 2103 "GenerateCode.hs" #-}+                             -- use rule "GenerateCode.ag"(line 810, column 44)+                             _lhsOdecls =+                                 {-# LINE 810 "GenerateCode.ag" #-}+                                 _visitsIdecls+                                 {-# LINE 2108 "GenerateCode.hs" #-}+                             -- use rule "GenerateCode.ag"(line 748, column 32)+                             _lhsOerrors =+                                 {-# LINE 748 "GenerateCode.ag" #-}+                                 _visitsIerrors+                                 {-# LINE 2113 "GenerateCode.hs" #-}+                             -- use rule "GenerateCode.ag"(line 1014, column 61)+                             _lhsOsemNames =+                                 {-# LINE 1014 "GenerateCode.ag" #-}+                                 _visitsIsemNames+                                 {-# LINE 2118 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOallNts =+                                 {-# LINE 120 "GenerateCode.ag" #-}+                                 _lhsIallNts+                                 {-# LINE 2123 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOallPragmas =+                                 {-# LINE 66 "GenerateCode.ag" #-}+                                 _lhsIallPragmas+                                 {-# LINE 2128 "GenerateCode.hs" #-}+                             -- copy rule (from local)+                             _visitsOaroundMap =+                                 {-# LINE 479 "GenerateCode.ag" #-}+                                 _aroundMap+                                 {-# LINE 2133 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOcontextMap =+                                 {-# LINE 108 "GenerateCode.ag" #-}+                                 _lhsIcontextMap+                                 {-# LINE 2138 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOerrors =+                                 {-# LINE 748 "GenerateCode.ag" #-}+                                 _lhsIerrors+                                 {-# LINE 2143 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOinh =+                                 {-# LINE 77 "GenerateCode.ag" #-}+                                 _lhsIinh+                                 {-# LINE 2148 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOnt =+                                 {-# LINE 77 "GenerateCode.ag" #-}+                                 _lhsInt+                                 {-# LINE 2153 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_case =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_case+                                 {-# LINE 2158 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_cata =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_cata+                                 {-# LINE 2163 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_costcentre =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_costcentre+                                 {-# LINE 2168 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_data =+                                 {-# LINE 46 "GenerateCode.ag" #-}+                                 _lhsIo_data+                                 {-# LINE 2173 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_linePragmas =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_linePragmas+                                 {-# LINE 2178 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_newtypes =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_newtypes+                                 {-# LINE 2183 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_pretty =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_pretty+                                 {-# LINE 2188 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_rename =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_rename+                                 {-# LINE 2193 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_sem =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_sem+                                 {-# LINE 2198 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_sig =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_sig+                                 {-# LINE 2203 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_splitsems =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_splitsems+                                 {-# LINE 2208 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_strictwrap =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_strictwrap+                                 {-# LINE 2213 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_traces =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_traces+                                 {-# LINE 2218 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOo_unbox =+                                 {-# LINE 45 "GenerateCode.ag" #-}+                                 _lhsIo_unbox+                                 {-# LINE 2223 "GenerateCode.hs" #-}+                             -- copy rule (from local)+                             _visitsOparamInstMap =+                                 {-# LINE 94 "GenerateCode.ag" #-}+                                 _paramInstMap+                                 {-# LINE 2228 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOparamMap =+                                 {-# LINE 88 "GenerateCode.ag" #-}+                                 _lhsIparamMap+                                 {-# LINE 2233 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOprefix =+                                 {-# LINE 47 "GenerateCode.ag" #-}+                                 _lhsIprefix+                                 {-# LINE 2238 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOsyn =+                                 {-# LINE 77 "GenerateCode.ag" #-}+                                 _lhsIsyn+                                 {-# LINE 2243 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOunfoldSemDom =+                                 {-# LINE 646 "GenerateCode.ag" #-}+                                 _lhsIunfoldSemDom+                                 {-# LINE 2248 "GenerateCode.hs" #-}+                             -- copy rule (down)+                             _visitsOwith_sig =+                                 {-# LINE 738 "GenerateCode.ag" #-}+                                 _lhsIwith_sig+                                 {-# LINE 2253 "GenerateCode.hs" #-}+                             ( _visitsIallTpsFound,_visitsIcomments,_visitsIdecls,_visitsIerrors,_visitsIgatherInstVisitNrs,_visitsIintra,_visitsIintraVars,_visitsIisNil,_visitsIsemNames) =+                                 (visits_ _visitsOallNts _visitsOallPragmas _visitsOaroundMap _visitsOchildren _visitsOcon _visitsOcontextMap _visitsOerrors _visitsOinh _visitsOinstVisitNrs _visitsOnr _visitsOnt _visitsOo_case _visitsOo_cata _visitsOo_costcentre _visitsOo_data _visitsOo_linePragmas _visitsOo_newtypes _visitsOo_pretty _visitsOo_rename _visitsOo_sem _visitsOo_sig _visitsOo_splitsems _visitsOo_strictwrap _visitsOo_traces _visitsOo_unbox _visitsOparamInstMap _visitsOparamMap _visitsOprefix _visitsOsyn _visitsOterminals _visitsOunfoldSemDom _visitsOwith_sig )+                         in  ( _lhsOallTpsFound,_lhsOcataAlt,_lhsOcomments,_lhsOdataAlt,_lhsOdecls,_lhsOerrors,_lhsOsemNames))) )+-- CProductions ------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allNts               : Set NontermIdent+         allPragmas           : PragmaMap+         aroundMap            : Map ConstructorIdent (Set Identifier)+         contextMap           : ContextMap+         inh                  : Attributes+         nt                   : NontermIdent+         o_case               : Bool+         o_cata               : Bool+         o_costcentre         : Bool+         o_data               : Maybe Bool+         o_linePragmas        : 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+         paramMap             : ParamMap+         prefix               : String+         syn                  : Attributes+         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type+         with_sig             : Bool+      chained attribute:+         errors               : Seq Error+      synthesized attributes:+         allTpsFound          : Bool+         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 ->+                                          (Seq Error) ->+                                          Attributes ->+                                          NontermIdent ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          (Maybe Bool) ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          Bool ->+                                          ParamMap ->+                                          String ->+                                          Attributes ->+                                          (NontermIdent -> Int -> [String] -> Code.Type) ->+                                          Bool ->+                                          ( Bool,Decls,([String]),DataAlts,Decls,(Seq Error),([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),errors_Inh_CProductions :: !(Seq Error),inh_Inh_CProductions :: !(Attributes),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_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),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 {allTpsFound_Syn_CProductions :: !(Bool),cataAlts_Syn_CProductions :: !(Decls),comments_Syn_CProductions :: !([String]),dataAlts_Syn_CProductions :: !(DataAlts),decls_Syn_CProductions :: !(Decls),errors_Syn_CProductions :: !(Seq Error),semNames_Syn_CProductions :: !([String])}+wrap_CProductions :: T_CProductions  ->+                     Inh_CProductions  ->+                     Syn_CProductions +wrap_CProductions (T_CProductions sem ) (Inh_CProductions _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIerrors _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )  =+    (let ( _lhsOallTpsFound,_lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOerrors,_lhsOsemNames) =+             (sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIerrors _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig )+     in  (Syn_CProductions _lhsOallTpsFound _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOerrors _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+                       _lhsIerrors+                       _lhsIinh+                       _lhsInt+                       _lhsIo_case+                       _lhsIo_cata+                       _lhsIo_costcentre+                       _lhsIo_data+                       _lhsIo_linePragmas+                       _lhsIo_newtypes+                       _lhsIo_pretty+                       _lhsIo_rename+                       _lhsIo_sem+                       _lhsIo_sig+                       _lhsIo_splitsems+                       _lhsIo_strictwrap+                       _lhsIo_traces+                       _lhsIo_unbox+                       _lhsIparamMap+                       _lhsIprefix+                       _lhsIsyn+                       _lhsIunfoldSemDom+                       _lhsIwith_sig ->+                         (let _lhsOdataAlts :: DataAlts+                              _lhsOcataAlts :: Decls+                              _lhsOallTpsFound :: Bool+                              _lhsOcomments :: ([String])+                              _lhsOdecls :: Decls+                              _lhsOerrors :: (Seq Error)+                              _lhsOsemNames :: ([String])+                              _hdOallNts :: (Set NontermIdent)+                              _hdOallPragmas :: PragmaMap+                              _hdOaroundMap :: (Map ConstructorIdent (Set Identifier))+                              _hdOcontextMap :: ContextMap+                              _hdOerrors :: (Seq Error)+                              _hdOinh :: Attributes+                              _hdOnt :: NontermIdent+                              _hdOo_case :: Bool+                              _hdOo_cata :: Bool+                              _hdOo_costcentre :: Bool+                              _hdOo_data :: (Maybe Bool)+                              _hdOo_linePragmas :: 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+                              _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+                              _tlOerrors :: (Seq Error)+                              _tlOinh :: Attributes+                              _tlOnt :: NontermIdent+                              _tlOo_case :: Bool+                              _tlOo_cata :: Bool+                              _tlOo_costcentre :: Bool+                              _tlOo_data :: (Maybe Bool)+                              _tlOo_linePragmas :: 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+                              _tlOparamMap :: ParamMap+                              _tlOprefix :: String+                              _tlOsyn :: Attributes+                              _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                              _tlOwith_sig :: Bool+                              _hdIallTpsFound :: Bool+                              _hdIcataAlt :: Decl+                              _hdIcomments :: ([String])+                              _hdIdataAlt :: DataAlt+                              _hdIdecls :: Decls+                              _hdIerrors :: (Seq Error)+                              _hdIsemNames :: ([String])+                              _tlIallTpsFound :: Bool+                              _tlIcataAlts :: Decls+                              _tlIcomments :: ([String])+                              _tlIdataAlts :: DataAlts+                              _tlIdecls :: Decls+                              _tlIerrors :: (Seq Error)+                              _tlIsemNames :: ([String])+                              -- "GenerateCode.ag"(line 894, column 17)+                              _lhsOdataAlts =+                                  {-# LINE 894 "GenerateCode.ag" #-}+                                  _hdIdataAlt : _tlIdataAlts+                                  {-# LINE 2450 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 994, column 10)+                              _lhsOcataAlts =+                                  {-# LINE 994 "GenerateCode.ag" #-}+                                  _hdIcataAlt : _tlIcataAlts+                                  {-# LINE 2455 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 735, column 39)+                              _lhsOallTpsFound =+                                  {-# LINE 735 "GenerateCode.ag" #-}+                                  _hdIallTpsFound && _tlIallTpsFound+                                  {-# LINE 2460 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 767, column 52)+                              _lhsOcomments =+                                  {-# LINE 767 "GenerateCode.ag" #-}+                                  _hdIcomments ++ _tlIcomments+                                  {-# LINE 2465 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 810, column 44)+                              _lhsOdecls =+                                  {-# LINE 810 "GenerateCode.ag" #-}+                                  _hdIdecls ++ _tlIdecls+                                  {-# LINE 2470 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 748, column 32)+                              _lhsOerrors =+                                  {-# LINE 748 "GenerateCode.ag" #-}+                                  _hdIerrors Seq.>< _tlIerrors+                                  {-# LINE 2475 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 1014, column 61)+                              _lhsOsemNames =+                                  {-# LINE 1014 "GenerateCode.ag" #-}+                                  _hdIsemNames ++ _tlIsemNames+                                  {-# LINE 2480 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOallNts =+                                  {-# LINE 120 "GenerateCode.ag" #-}+                                  _lhsIallNts+                                  {-# LINE 2485 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOallPragmas =+                                  {-# LINE 66 "GenerateCode.ag" #-}+                                  _lhsIallPragmas+                                  {-# LINE 2490 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOaroundMap =+                                  {-# LINE 477 "GenerateCode.ag" #-}+                                  _lhsIaroundMap+                                  {-# LINE 2495 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOcontextMap =+                                  {-# LINE 108 "GenerateCode.ag" #-}+                                  _lhsIcontextMap+                                  {-# LINE 2500 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOerrors =+                                  {-# LINE 748 "GenerateCode.ag" #-}+                                  _lhsIerrors+                                  {-# LINE 2505 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOinh =+                                  {-# LINE 77 "GenerateCode.ag" #-}+                                  _lhsIinh+                                  {-# LINE 2510 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOnt =+                                  {-# LINE 77 "GenerateCode.ag" #-}+                                  _lhsInt+                                  {-# LINE 2515 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_case =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_case+                                  {-# LINE 2520 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_cata =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_cata+                                  {-# LINE 2525 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_costcentre =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_costcentre+                                  {-# LINE 2530 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_data =+                                  {-# LINE 46 "GenerateCode.ag" #-}+                                  _lhsIo_data+                                  {-# LINE 2535 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_linePragmas =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_linePragmas+                                  {-# LINE 2540 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_newtypes =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_newtypes+                                  {-# LINE 2545 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_pretty =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_pretty+                                  {-# LINE 2550 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_rename =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_rename+                                  {-# LINE 2555 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_sem =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_sem+                                  {-# LINE 2560 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_sig =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_sig+                                  {-# LINE 2565 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_splitsems =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_splitsems+                                  {-# LINE 2570 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_strictwrap =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_strictwrap+                                  {-# LINE 2575 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_traces =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_traces+                                  {-# LINE 2580 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOo_unbox =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_unbox+                                  {-# LINE 2585 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOparamMap =+                                  {-# LINE 88 "GenerateCode.ag" #-}+                                  _lhsIparamMap+                                  {-# LINE 2590 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOprefix =+                                  {-# LINE 47 "GenerateCode.ag" #-}+                                  _lhsIprefix+                                  {-# LINE 2595 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOsyn =+                                  {-# LINE 77 "GenerateCode.ag" #-}+                                  _lhsIsyn+                                  {-# LINE 2600 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOunfoldSemDom =+                                  {-# LINE 646 "GenerateCode.ag" #-}+                                  _lhsIunfoldSemDom+                                  {-# LINE 2605 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _hdOwith_sig =+                                  {-# LINE 738 "GenerateCode.ag" #-}+                                  _lhsIwith_sig+                                  {-# LINE 2610 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOallNts =+                                  {-# LINE 120 "GenerateCode.ag" #-}+                                  _lhsIallNts+                                  {-# LINE 2615 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOallPragmas =+                                  {-# LINE 66 "GenerateCode.ag" #-}+                                  _lhsIallPragmas+                                  {-# LINE 2620 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOaroundMap =+                                  {-# LINE 477 "GenerateCode.ag" #-}+                                  _lhsIaroundMap+                                  {-# LINE 2625 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOcontextMap =+                                  {-# LINE 108 "GenerateCode.ag" #-}+                                  _lhsIcontextMap+                                  {-# LINE 2630 "GenerateCode.hs" #-}+                              -- copy rule (chain)+                              _tlOerrors =+                                  {-# LINE 748 "GenerateCode.ag" #-}+                                  _hdIerrors+                                  {-# LINE 2635 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOinh =+                                  {-# LINE 77 "GenerateCode.ag" #-}+                                  _lhsIinh+                                  {-# LINE 2640 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOnt =+                                  {-# LINE 77 "GenerateCode.ag" #-}+                                  _lhsInt+                                  {-# LINE 2645 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_case =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_case+                                  {-# LINE 2650 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_cata =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_cata+                                  {-# LINE 2655 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_costcentre =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_costcentre+                                  {-# LINE 2660 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_data =+                                  {-# LINE 46 "GenerateCode.ag" #-}+                                  _lhsIo_data+                                  {-# LINE 2665 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_linePragmas =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_linePragmas+                                  {-# LINE 2670 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_newtypes =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_newtypes+                                  {-# LINE 2675 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_pretty =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_pretty+                                  {-# LINE 2680 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_rename =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_rename+                                  {-# LINE 2685 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_sem =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_sem+                                  {-# LINE 2690 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_sig =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_sig+                                  {-# LINE 2695 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_splitsems =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_splitsems+                                  {-# LINE 2700 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_strictwrap =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_strictwrap+                                  {-# LINE 2705 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_traces =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_traces+                                  {-# LINE 2710 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOo_unbox =+                                  {-# LINE 45 "GenerateCode.ag" #-}+                                  _lhsIo_unbox+                                  {-# LINE 2715 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOparamMap =+                                  {-# LINE 88 "GenerateCode.ag" #-}+                                  _lhsIparamMap+                                  {-# LINE 2720 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOprefix =+                                  {-# LINE 47 "GenerateCode.ag" #-}+                                  _lhsIprefix+                                  {-# LINE 2725 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOsyn =+                                  {-# LINE 77 "GenerateCode.ag" #-}+                                  _lhsIsyn+                                  {-# LINE 2730 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOunfoldSemDom =+                                  {-# LINE 646 "GenerateCode.ag" #-}+                                  _lhsIunfoldSemDom+                                  {-# LINE 2735 "GenerateCode.hs" #-}+                              -- copy rule (down)+                              _tlOwith_sig =+                                  {-# LINE 738 "GenerateCode.ag" #-}+                                  _lhsIwith_sig+                                  {-# LINE 2740 "GenerateCode.hs" #-}+                              ( _hdIallTpsFound,_hdIcataAlt,_hdIcomments,_hdIdataAlt,_hdIdecls,_hdIerrors,_hdIsemNames) =+                                  (hd_ _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOerrors _hdOinh _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamMap _hdOprefix _hdOsyn _hdOunfoldSemDom _hdOwith_sig )+                              ( _tlIallTpsFound,_tlIcataAlts,_tlIcomments,_tlIdataAlts,_tlIdecls,_tlIerrors,_tlIsemNames) =+                                  (tl_ _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOerrors _tlOinh _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOparamMap _tlOprefix _tlOsyn _tlOunfoldSemDom _tlOwith_sig )+                          in  ( _lhsOallTpsFound,_lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOerrors,_lhsOsemNames))) )+sem_CProductions_Nil :: T_CProductions +sem_CProductions_Nil  =+    (T_CProductions (\ _lhsIallNts+                       _lhsIallPragmas+                       _lhsIaroundMap+                       _lhsIcontextMap+                       _lhsIerrors+                       _lhsIinh+                       _lhsInt+                       _lhsIo_case+                       _lhsIo_cata+                       _lhsIo_costcentre+                       _lhsIo_data+                       _lhsIo_linePragmas+                       _lhsIo_newtypes+                       _lhsIo_pretty+                       _lhsIo_rename+                       _lhsIo_sem+                       _lhsIo_sig+                       _lhsIo_splitsems+                       _lhsIo_strictwrap+                       _lhsIo_traces+                       _lhsIo_unbox+                       _lhsIparamMap+                       _lhsIprefix+                       _lhsIsyn+                       _lhsIunfoldSemDom+                       _lhsIwith_sig ->+                         (let _lhsOdataAlts :: DataAlts+                              _lhsOcataAlts :: Decls+                              _lhsOallTpsFound :: Bool+                              _lhsOcomments :: ([String])+                              _lhsOdecls :: Decls+                              _lhsOerrors :: (Seq Error)+                              _lhsOsemNames :: ([String])+                              -- "GenerateCode.ag"(line 895, column 17)+                              _lhsOdataAlts =+                                  {-# LINE 895 "GenerateCode.ag" #-}+                                  []+                                  {-# LINE 2785 "GenerateCode.hs" #-}+                              -- "GenerateCode.ag"(line 995, column 10)+                              _lhsOcataAlts =+                                  {-# LINE 995 "GenerateCode.ag" #-}+                                  []+                                  {-# LINE 2790 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 735, column 39)+                              _lhsOallTpsFound =+                                  {-# LINE 735 "GenerateCode.ag" #-}+                                  True+                                  {-# LINE 2795 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 767, column 52)+                              _lhsOcomments =+                                  {-# LINE 767 "GenerateCode.ag" #-}+                                  []+                                  {-# LINE 2800 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 810, column 44)+                              _lhsOdecls =+                                  {-# LINE 810 "GenerateCode.ag" #-}+                                  []+                                  {-# LINE 2805 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 748, column 32)+                              _lhsOerrors =+                                  {-# LINE 748 "GenerateCode.ag" #-}+                                  Seq.empty+                                  {-# LINE 2810 "GenerateCode.hs" #-}+                              -- use rule "GenerateCode.ag"(line 1014, column 61)+                              _lhsOsemNames =+                                  {-# LINE 1014 "GenerateCode.ag" #-}+                                  []+                                  {-# LINE 2815 "GenerateCode.hs" #-}+                          in  ( _lhsOallTpsFound,_lhsOcataAlts,_lhsOcomments,_lhsOdataAlts,_lhsOdecls,_lhsOerrors,_lhsOsemNames))) )+-- CRule -------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allNts               : Set NontermIdent+         aroundMap            : Set Identifier+         children             : [(Identifier,Type,Bool)]+         con                  : ConstructorIdent+         higherOrderChildren  : [(Identifier,Type,Bool)]+         inh                  : Attributes+         instVisitNrs         : Map Identifier Int+         nr                   : Int+         nt                   : NontermIdent+         o_case               : Bool+         o_cata               : Bool+         o_costcentre         : Bool+         o_data               : Maybe Bool+         o_linePragmas        : 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+         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]+         errors               : Seq Error+      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 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)}+         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 )  =+    (sem_CRule_CRule _name _isIn _hasCode _nt _con _field _childnt _tp (sem_Pattern _pattern ) _rhs _defines _owrt _origin _uses )+-- semantic domain+newtype T_CRule  = T_CRule ((Set NontermIdent) ->+                            (Set Identifier) ->+                            ([(Identifier,Type,Bool)]) ->+                            ConstructorIdent ->+                            ([Decl]) ->+                            (Seq Error) ->+                            ([(Identifier,Type,Bool)]) ->+                            Attributes ->+                            (Map Identifier Int) ->+                            Int ->+                            NontermIdent ->+                            Bool ->+                            Bool ->+                            Bool ->+                            (Maybe Bool) ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            (Map Identifier (NontermIdent, [String])) ->+                            ParamMap ->+                            String ->+                            Attributes ->+                            ([Identifier]) ->+                            (NontermIdent -> Int -> [String] -> Code.Type) ->+                            String ->+                            ( Bool,(DeclBlocks -> DeclBlocks),([String]),Decls,([Decl]),([Identifier]),(Seq Error),Exprs,([Decl]),([Type]),(Set String)))+data Inh_CRule  = Inh_CRule {allNts_Inh_CRule :: !(Set NontermIdent),aroundMap_Inh_CRule :: !(Set Identifier),children_Inh_CRule :: !([(Identifier,Type,Bool)]),con_Inh_CRule :: !(ConstructorIdent),declsAbove_Inh_CRule :: !([Decl]),errors_Inh_CRule :: !(Seq Error),higherOrderChildren_Inh_CRule :: !([(Identifier,Type,Bool)]),inh_Inh_CRule :: !(Attributes),instVisitNrs_Inh_CRule :: !(Map Identifier Int),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_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),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),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]),errors_Syn_CRule :: !(Seq Error),exprs_Syn_CRule :: !(Exprs),tSigs_Syn_CRule :: !([Decl]),tps_Syn_CRule :: !([Type]),usedVars_Syn_CRule :: !(Set String)}+wrap_CRule :: T_CRule  ->+              Inh_CRule  ->+              Syn_CRule +wrap_CRule (T_CRule sem ) (Inh_CRule _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIerrors _lhsIhigherOrderChildren _lhsIinh _lhsIinstVisitNrs _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwhat )  =+    (let ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars) =+             (sem _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIerrors _lhsIhigherOrderChildren _lhsIinh _lhsIinstVisitNrs _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwhat )+     in  (Syn_CRule _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOerrors _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars ))+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+                _lhsIerrors+                _lhsIhigherOrderChildren+                _lhsIinh+                _lhsIinstVisitNrs+                _lhsInr+                _lhsInt+                _lhsIo_case+                _lhsIo_cata+                _lhsIo_costcentre+                _lhsIo_data+                _lhsIo_linePragmas+                _lhsIo_newtypes+                _lhsIo_pretty+                _lhsIo_rename+                _lhsIo_sem+                _lhsIo_sig+                _lhsIo_splitsems+                _lhsIo_strictwrap+                _lhsIo_traces+                _lhsIo_unbox+                _lhsIparamInstMap+                _lhsIparamMap+                _lhsIprefix+                _lhsIsyn+                _lhsIterminals+                _lhsIunfoldSemDom+                _lhsIwhat ->+                  (let _lhsOexprs :: Exprs+                       _lhsOusedVars :: (Set String)+                       _lhsOtSigs :: ([Decl])+                       _lhsOtps :: ([Type])+                       _lhsOdeclsAbove :: ([Decl])+                       _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)+                       _lhsOallTpsFound :: Bool+                       _lhsOcomments :: ([String])+                       _lhsOdecls :: Decls+                       _lhsOdefinedInsts :: ([Identifier])+                       _lhsOerrors :: (Seq Error)+                       -- "GenerateCode.ag"(line 182, column 18)+                       _costCentreDescr =+                           {-# LINE 182 "GenerateCode.ag" #-}+                           show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show name_ ++ ":" ++ show nt_ ++ ":" ++ show nr_+                           {-# LINE 3024 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 183, column 18)+                       _addCostCentre =+                           {-# LINE 183 "GenerateCode.ag" #-}+                           \v -> if _lhsIo_costcentre+                                 then PragmaExpr True False ("SCC \"" ++ _costCentreDescr     ++ "\"") v+                                 else v+                           {-# LINE 3031 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 186, column 18)+                       _decls =+                           {-# LINE 186 "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 = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars+                                rhs = _addCostCentre     $ App fun (map SimpleExpr rhsVars)+                                fun | nr_ == 0 && Set.member name_ _lhsIaroundMap+                                                = locname name_ ++ "_around " ++ funname name_ 0+                                    | otherwise = funname name_ nr_+                           in [Decl tuple rhs (Set.fromList lhsVars) (Set.fromList (funname name_ nr_ : rhsVars))]+                           {-# LINE 3045 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 274, column 7)+                       _isSuperfluousHigherOrderIntra =+                           {-# LINE 274 "GenerateCode.ag" #-}+                           _lhsInr <= Map.findWithDefault (-1) name_ _lhsIinstVisitNrs+                           {-# LINE 3050 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 288, column 8)+                       _names =+                           {-# LINE 288 "GenerateCode.ag" #-}+                           if _isSuperfluousHigherOrderIntra+                           then []+                           else [funname name_ (nr_+1)]+                           {-# LINE 3057 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 292, column 8)+                       _lhsOexprs =+                           {-# LINE 292 "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 3065 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 304, column 7)+                       _lhsOusedVars =+                           {-# LINE 304 "GenerateCode.ag" #-}+                           Set.fromList _names+                           {-# LINE 3070 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 328, column 19)+                       _mkTp =+                           {-# LINE 328 "GenerateCode.ag" #-}+                           _evalTp     . SimpleType . typeToHaskellString (Just nt_) _orgParams+                           {-# LINE 3075 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 329, column 19)+                       _definedTps =+                           {-# LINE 329 "GenerateCode.ag" #-}+                           [ TSig (attrname True name_ a) (_mkTp tp) |  (a,tp) <- Map.toList syn_ ]+                           {-# LINE 3080 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 330, column 19)+                       _nextTp =+                           {-# LINE 330 "GenerateCode.ag" #-}+                           typeName nt_ (nr_+1)+                           {-# LINE 3085 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 331, column 19)+                       _lhsOtSigs =+                           {-# LINE 331 "GenerateCode.ag" #-}+                           (if isLast_ then id else (TSig (funname name_ (nr_+1)) (TypeApp (SimpleType _nextTp) (map SimpleType _instParams    )) :)) _definedTps+                           {-# LINE 3090 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 333, column 19)+                       _orgParams =+                           {-# LINE 333 "GenerateCode.ag" #-}+                           map getName $ Map.findWithDefault [] nt_ _lhsIparamMap+                           {-# LINE 3095 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 334, column 19)+                       _instParams =+                           {-# LINE 334 "GenerateCode.ag" #-}+                           snd $ Map.findWithDefault (nt_,[]) name_ _lhsIparamInstMap+                           {-# LINE 3100 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 335, column 19)+                       _replParamMap =+                           {-# LINE 335 "GenerateCode.ag" #-}+                           Map.fromList (zip _orgParams     _instParams    )+                           {-# LINE 3105 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 336, column 19)+                       _replace =+                           {-# LINE 336 "GenerateCode.ag" #-}+                           \k -> Map.findWithDefault k k _replParamMap+                           {-# LINE 3110 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 337, column 19)+                       _evalTp =+                           {-# LINE 337 "GenerateCode.ag" #-}+                           if null _orgParams     then id else evalType _replace+                           {-# LINE 3115 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 360, column 19)+                       _lhsOtps =+                           {-# LINE 360 "GenerateCode.ag" #-}+                           if _isSuperfluousHigherOrderIntra+                           then []+                           else [NT (ntOfVisit nt_ (nr_+1)) _instParams    ]+                           {-# LINE 3122 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 501, column 7)+                       _lhsOdeclsAbove =+                           {-# LINE 501 "GenerateCode.ag" #-}+                           []+                           {-# LINE 3127 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 514, column 7)+                       _lhsObldBlocksFun =+                           {-# LINE 514 "GenerateCode.ag" #-}+                           DeclBlock _lhsIdeclsAbove (head _decls    )+                           {-# LINE 3132 "GenerateCode.hs" #-}+                       -- use rule "GenerateCode.ag"(line 357, column 39)+                       _lhsOallTpsFound =+                           {-# LINE 357 "GenerateCode.ag" #-}+                           True+                           {-# LINE 3137 "GenerateCode.hs" #-}+                       -- use rule "GenerateCode.ag"(line 767, column 52)+                       _lhsOcomments =+                           {-# LINE 767 "GenerateCode.ag" #-}+                           []+                           {-# LINE 3142 "GenerateCode.hs" #-}+                       -- use rule "GenerateCode.ag"(line 138, column 34)+                       _lhsOdecls =+                           {-# LINE 138 "GenerateCode.ag" #-}+                           _decls+                           {-# LINE 3147 "GenerateCode.hs" #-}+                       -- use rule "GenerateCode.ag"(line 208, column 55)+                       _lhsOdefinedInsts =+                           {-# LINE 208 "GenerateCode.ag" #-}+                           []+                           {-# LINE 3152 "GenerateCode.hs" #-}+                       -- use rule "GenerateCode.ag"(line 748, column 32)+                       _lhsOerrors =+                           {-# LINE 748 "GenerateCode.ag" #-}+                           Seq.empty+                           {-# LINE 3157 "GenerateCode.hs" #-}+                   in  ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars))) )+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)) ->+                   T_CRule +sem_CRule_CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ (T_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_  =+    (T_CRule (\ _lhsIallNts+                _lhsIaroundMap+                _lhsIchildren+                _lhsIcon+                _lhsIdeclsAbove+                _lhsIerrors+                _lhsIhigherOrderChildren+                _lhsIinh+                _lhsIinstVisitNrs+                _lhsInr+                _lhsInt+                _lhsIo_case+                _lhsIo_cata+                _lhsIo_costcentre+                _lhsIo_data+                _lhsIo_linePragmas+                _lhsIo_newtypes+                _lhsIo_pretty+                _lhsIo_rename+                _lhsIo_sem+                _lhsIo_sig+                _lhsIo_splitsems+                _lhsIo_strictwrap+                _lhsIo_traces+                _lhsIo_unbox+                _lhsIparamInstMap+                _lhsIparamMap+                _lhsIprefix+                _lhsIsyn+                _lhsIterminals+                _lhsIunfoldSemDom+                _lhsIwhat ->+                  (let _lhsOexprs :: Exprs+                       _lhsOusedVars :: (Set String)+                       _lhsOtSigs :: ([Decl])+                       __tup3 :: (([Type],Bool))+                       _lhsOtps :: ([Type])+                       _lhsOallTpsFound :: Bool+                       _lhsOdeclsAbove :: ([Decl])+                       _lhsObldBlocksFun :: (DeclBlocks -> DeclBlocks)+                       _lhsOerrors :: (Seq Error)+                       _lhsOcomments :: ([String])+                       _lhsOdecls :: Decls+                       _lhsOdefinedInsts :: ([Identifier])+                       _patternIcopy :: Pattern+                       _patternIdefinedInsts :: ([Identifier])+                       _patternIpatternAttributes :: ([(Identifier, Identifier)])+                       -- "GenerateCode.ag"(line 140, column 12)+                       _instTypes =+                           {-# LINE 140 "GenerateCode.ag" #-}+                           map (\(n,NT t _,_) -> (n,t)) _lhsIhigherOrderChildren+                           {-# LINE 3226 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 141, column 12)+                       _originComment =+                           {-# LINE 141 "GenerateCode.ag" #-}+                           if  _lhsIo_pretty+                               then (Comment origin_:)+                               else id+                           {-# LINE 3233 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 144, column 12)+                       _instDecls =+                           {-# LINE 144 "GenerateCode.ag" #-}+                           [ Decl (Pattern3 (Alias _INST' inst (Underscore (getPos inst)) []))+                                  ( let nm = fromJust $ inst `lookup` _instTypes+                                    in unwrapSem _lhsIo_newtypes (maybe nm id (deforestedNt nm))+                                       $ 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+                           , let instSemFieldName = attrname False _INST' inst ]+                           {-# LINE 3250 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 157, column 12)+                       _patDescr =+                           {-# LINE 157 "GenerateCode.ag" #-}+                           if isIn_+                           then "_"+                           else concat $ intersperse "," (map (\(f,a) -> show f ++ "." ++ show a) _patternIpatternAttributes)+                           {-# LINE 3257 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 160, column 12)+                       _traceDescr =+                           {-# LINE 160 "GenerateCode.ag" #-}+                           show nt_ ++ " :: " ++ show con_ ++ " :: " ++ _patDescr+                           {-# LINE 3262 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 162, column 12)+                       _addTrace =+                           {-# LINE 162 "GenerateCode.ag" #-}+                           \v -> if _lhsIo_traces+                                 then Trace _traceDescr     v+                                 else v+                           {-# LINE 3269 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 165, column 12)+                       _costCentreDescr =+                           {-# LINE 165 "GenerateCode.ag" #-}+                           show nt_ ++ ":" ++ show con_ ++ ":" ++ _patDescr+                           {-# LINE 3274 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 166, column 12)+                       _addCostCentre =+                           {-# LINE 166 "GenerateCode.ag" #-}+                           \v -> if _lhsIo_costcentre+                                 then PragmaExpr True False ("SCC \"" ++ _costCentreDescr     ++ "\"") v+                                 else v+                           {-# LINE 3281 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 169, column 12)+                       _addLinePragma =+                           {-# LINE 169 "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 3292 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 176, column 12)+                       _decls =+                           {-# LINE 176 "GenerateCode.ag" #-}+                           if hasCode_+                           then _originComment ( Decl (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 3302 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 213, column 12)+                       _definedInsts =+                           {-# LINE 213 "GenerateCode.ag" #-}+                           if isIn_ then [] else _patternIdefinedInsts+                           {-# LINE 3307 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 283, column 12)+                       _rulename =+                           {-# LINE 283 "GenerateCode.ag" #-}+                           if  field_ == _LOC && name_ `elem` _lhsIterminals+                           then funname name_ 0+                           else attrname isIn_ field_ name_+                           {-# LINE 3314 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 286, column 12)+                       _lhsOexprs =+                           {-# LINE 286 "GenerateCode.ag" #-}+                           [SimpleExpr _rulename    ]+                           {-# LINE 3319 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 302, column 7)+                       _lhsOusedVars =+                           {-# LINE 302 "GenerateCode.ag" #-}+                           Set.singleton _rulename+                           {-# LINE 3324 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 312, column 19)+                       _mkTp =+                           {-# LINE 312 "GenerateCode.ag" #-}+                           SimpleType . typeToHaskellString (Just _lhsInt) _orgParams+                           {-# LINE 3329 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 313, column 19)+                       _lhsOtSigs =+                           {-# LINE 313 "GenerateCode.ag" #-}+                           [ TSig (attrname False field attr) (_evalTp     field $ _mkTp (fromJust tp))+                           |  (field,attr,tp) <- Map.elems defines_, isJust tp ]+                           {-# LINE 3335 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 316, column 19)+                       _orgParams =+                           {-# LINE 316 "GenerateCode.ag" #-}+                           map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+                           {-# LINE 3340 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 317, column 19)+                       _evalTp =+                           {-# LINE 317 "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 3353 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 359, column 23)+                       __tup3 =+                           {-# LINE 359 "GenerateCode.ag" #-}+                           maybe ([],False) (\tp -> ([substSelf (fromJust childnt_) tp],True)) tp_+                           {-# LINE 3358 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 359, column 23)+                       (_lhsOtps,_) =+                           {-# LINE 359 "GenerateCode.ag" #-}+                           __tup3+                           {-# LINE 3363 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 359, column 23)+                       (_,_lhsOallTpsFound) =+                           {-# LINE 359 "GenerateCode.ag" #-}+                           __tup3+                           {-# LINE 3368 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 499, column 7)+                       _lhsOdeclsAbove =+                           {-# LINE 499 "GenerateCode.ag" #-}+                           _lhsIdeclsAbove ++ _decls+                           {-# LINE 3373 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 512, column 7)+                       _lhsObldBlocksFun =+                           {-# LINE 512 "GenerateCode.ag" #-}+                           id+                           {-# LINE 3378 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 754, column 12)+                       _lhsOerrors =+                           {-# LINE 754 "GenerateCode.ag" #-}+                           let nameOf (Alias _ _ _ pats@(_:_)) = Ident (show (map (\(Alias _ a _ _)->a) pats)) (getPos name_)+                               nameOf _ = name_+                           in  maybe (Seq.singleton (MissingTypeSig _lhsInt _lhsIcon (nameOf _patternIcopy))) (const Seq.empty) tp_+                           {-# LINE 3385 "GenerateCode.hs" #-}+                       -- "GenerateCode.ag"(line 794, column 18)+                       _lhsOcomments =+                           {-# LINE 794 "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 3391 "GenerateCode.hs" #-}+                       -- use rule "GenerateCode.ag"(line 138, column 34)+                       _lhsOdecls =+                           {-# LINE 138 "GenerateCode.ag" #-}+                           _decls+                           {-# LINE 3396 "GenerateCode.hs" #-}+                       -- use rule "GenerateCode.ag"(line 208, column 55)+                       _lhsOdefinedInsts =+                           {-# LINE 208 "GenerateCode.ag" #-}+                           _definedInsts+                           {-# LINE 3401 "GenerateCode.hs" #-}+                       ( _patternIcopy,_patternIdefinedInsts,_patternIpatternAttributes) =+                           (pattern_ )+                   in  ( _lhsOallTpsFound,_lhsObldBlocksFun,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars))) )+-- 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_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+         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 tp          : _+            local inhTps      : _+            local synTps      : _+            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 ->+                                  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_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),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_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn )  =+    (let ( _lhsOcomments,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) =+             (sem _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _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_newtypes+                   _lhsIo_pretty+                   _lhsIo_rename+                   _lhsIo_sem+                   _lhsIo_sig+                   _lhsIo_splitsems+                   _lhsIo_strictwrap+                   _lhsIo_traces+                   _lhsIo_unbox+                   _lhsIparamMap+                   _lhsIprefix+                   _lhsIsyn ->+                     (let _lhsOsemDom :: ([Decl])+                          _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+                          _lhsOwrapDecls :: Decls+                          _lhsOcomments :: ([String])+                          -- "GenerateCode.ag"(line 626, column 15)+                          _tp =+                              {-# LINE 626 "GenerateCode.ag" #-}+                              foldr Arr _synTps     _inhTps+                              {-# LINE 3516 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 627, column 15)+                          _inhTps =+                              {-# LINE 627 "GenerateCode.ag" #-}+                              [SimpleType (typeToHaskellString (Just _lhsInt) _params     tp) |  tp <- Map.elems inh_]+                              {-# LINE 3521 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 628, column 15)+                          _synTps =+                              {-# LINE 628 "GenerateCode.ag" #-}+                              mkTupleType _lhsIo_unbox (null _inhTps    ) ([SimpleType (typeToHaskellString (Just _lhsInt) _params     tp) |  tp <- Map.elems syn_] ++ _continuation    )+                              {-# LINE 3526 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 629, column 15)+                          _continuation =+                              {-# LINE 629 "GenerateCode.ag" #-}+                              if  _lhsIisLast+                              then []+                              else [TypeApp (SimpleType (typeName _lhsInt (_lhsInr + 1))) (map (SimpleType . ('@':)) _params    )]+                              {-# LINE 3533 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 632, column 15)+                          _params =+                              {-# LINE 632 "GenerateCode.ag" #-}+                              map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+                              {-# LINE 3538 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 633, column 15)+                          _lhsOsemDom =+                              {-# LINE 633 "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    ) ]+                              {-# LINE 3548 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 644, column 7)+                          _lhsOsemDomUnfoldGath =+                              {-# LINE 644 "GenerateCode.ag" #-}+                              Map.singleton (_lhsInt, _lhsInr) (_params    , _tp    )+                              {-# LINE 3553 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 718, column 15)+                          _lhsOwrapDecls =+                              {-# LINE 718 "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+                              in [ Decl (mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars) (App (sem _lhsInr) rhs) (Set.fromList lhsVars) (Set.fromList rhsVars) ]+                              {-# LINE 3566 "GenerateCode.hs" #-}+                          -- "GenerateCode.ag"(line 772, column 18)+                          _lhsOcomments =+                              {-# LINE 772 "GenerateCode.ag" #-}+                              let body = map ind (showsSegment (CSegment inh_ syn_))+                              in if null body+                                 then []+                                 else ("visit " ++ show _lhsInr ++ ":") : body+                              {-# LINE 3574 "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_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+         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 ->+                                    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_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),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_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamMap _lhsIprefix _lhsIsyn )  =+    (let ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls) =+             (sem _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _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_newtypes+                    _lhsIo_pretty+                    _lhsIo_rename+                    _lhsIo_sem+                    _lhsIo_sig+                    _lhsIo_splitsems+                    _lhsIo_strictwrap+                    _lhsIo_traces+                    _lhsIo_unbox+                    _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_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+                           _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_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+                           _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 233, column 11)+                           _tlOnr =+                               {-# LINE 233 "GenerateCode.ag" #-}+                               _lhsInr + 1+                               {-# LINE 3731 "GenerateCode.hs" #-}+                           -- "GenerateCode.ag"(line 246, column 12)+                           _lhsOisNil =+                               {-# LINE 246 "GenerateCode.ag" #-}+                               False+                               {-# LINE 3736 "GenerateCode.hs" #-}+                           -- "GenerateCode.ag"(line 247, column 12)+                           _hdOisLast =+                               {-# LINE 247 "GenerateCode.ag" #-}+                               _tlIisNil+                               {-# LINE 3741 "GenerateCode.hs" #-}+                           -- use rule "GenerateCode.ag"(line 767, column 52)+                           _lhsOcomments =+                               {-# LINE 767 "GenerateCode.ag" #-}+                               _hdIcomments ++ _tlIcomments+                               {-# LINE 3746 "GenerateCode.hs" #-}+                           -- use rule "GenerateCode.ag"(line 621, column 50)+                           _lhsOsemDom =+                               {-# LINE 621 "GenerateCode.ag" #-}+                               _hdIsemDom ++ _tlIsemDom+                               {-# LINE 3751 "GenerateCode.hs" #-}+                           -- use rule "GenerateCode.ag"(line 640, column 86)+                           _lhsOsemDomUnfoldGath =+                               {-# LINE 640 "GenerateCode.ag" #-}+                               _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath+                               {-# LINE 3756 "GenerateCode.hs" #-}+                           -- use rule "GenerateCode.ag"(line 716, column 52)+                           _lhsOwrapDecls =+                               {-# LINE 716 "GenerateCode.ag" #-}+                               _hdIwrapDecls ++ _tlIwrapDecls+                               {-# LINE 3761 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOinh =+                               {-# LINE 77 "GenerateCode.ag" #-}+                               _lhsIinh+                               {-# LINE 3766 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOnr =+                               {-# LINE 225 "GenerateCode.ag" #-}+                               _lhsInr+                               {-# LINE 3771 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOnt =+                               {-# LINE 77 "GenerateCode.ag" #-}+                               _lhsInt+                               {-# LINE 3776 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_case =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_case+                               {-# LINE 3781 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_cata =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_cata+                               {-# LINE 3786 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_costcentre =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_costcentre+                               {-# LINE 3791 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_data =+                               {-# LINE 46 "GenerateCode.ag" #-}+                               _lhsIo_data+                               {-# LINE 3796 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_linePragmas =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_linePragmas+                               {-# LINE 3801 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_newtypes =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_newtypes+                               {-# LINE 3806 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_pretty =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_pretty+                               {-# LINE 3811 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_rename =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_rename+                               {-# LINE 3816 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_sem =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_sem+                               {-# LINE 3821 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_sig =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_sig+                               {-# LINE 3826 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_splitsems =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_splitsems+                               {-# LINE 3831 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_strictwrap =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_strictwrap+                               {-# LINE 3836 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_traces =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_traces+                               {-# LINE 3841 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOo_unbox =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_unbox+                               {-# LINE 3846 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOparamMap =+                               {-# LINE 88 "GenerateCode.ag" #-}+                               _lhsIparamMap+                               {-# LINE 3851 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOprefix =+                               {-# LINE 47 "GenerateCode.ag" #-}+                               _lhsIprefix+                               {-# LINE 3856 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _hdOsyn =+                               {-# LINE 77 "GenerateCode.ag" #-}+                               _lhsIsyn+                               {-# LINE 3861 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOinh =+                               {-# LINE 77 "GenerateCode.ag" #-}+                               _lhsIinh+                               {-# LINE 3866 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOnt =+                               {-# LINE 77 "GenerateCode.ag" #-}+                               _lhsInt+                               {-# LINE 3871 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_case =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_case+                               {-# LINE 3876 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_cata =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_cata+                               {-# LINE 3881 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_costcentre =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_costcentre+                               {-# LINE 3886 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_data =+                               {-# LINE 46 "GenerateCode.ag" #-}+                               _lhsIo_data+                               {-# LINE 3891 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_linePragmas =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_linePragmas+                               {-# LINE 3896 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_newtypes =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_newtypes+                               {-# LINE 3901 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_pretty =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_pretty+                               {-# LINE 3906 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_rename =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_rename+                               {-# LINE 3911 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_sem =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_sem+                               {-# LINE 3916 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_sig =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_sig+                               {-# LINE 3921 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_splitsems =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_splitsems+                               {-# LINE 3926 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_strictwrap =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_strictwrap+                               {-# LINE 3931 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_traces =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_traces+                               {-# LINE 3936 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOo_unbox =+                               {-# LINE 45 "GenerateCode.ag" #-}+                               _lhsIo_unbox+                               {-# LINE 3941 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOparamMap =+                               {-# LINE 88 "GenerateCode.ag" #-}+                               _lhsIparamMap+                               {-# LINE 3946 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOprefix =+                               {-# LINE 47 "GenerateCode.ag" #-}+                               _lhsIprefix+                               {-# LINE 3951 "GenerateCode.hs" #-}+                           -- copy rule (down)+                           _tlOsyn =+                               {-# LINE 77 "GenerateCode.ag" #-}+                               _lhsIsyn+                               {-# LINE 3956 "GenerateCode.hs" #-}+                           ( _hdIcomments,_hdIsemDom,_hdIsemDomUnfoldGath,_hdIwrapDecls) =+                               (hd_ _hdOinh _hdOisLast _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamMap _hdOprefix _hdOsyn )+                           ( _tlIcomments,_tlIisNil,_tlIsemDom,_tlIsemDomUnfoldGath,_tlIwrapDecls) =+                               (tl_ _tlOinh _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _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_newtypes+                    _lhsIo_pretty+                    _lhsIo_rename+                    _lhsIo_sem+                    _lhsIo_sig+                    _lhsIo_splitsems+                    _lhsIo_strictwrap+                    _lhsIo_traces+                    _lhsIo_unbox+                    _lhsIparamMap+                    _lhsIprefix+                    _lhsIsyn ->+                      (let _lhsOisNil :: Bool+                           _lhsOcomments :: ([String])+                           _lhsOsemDom :: ([Decl])+                           _lhsOsemDomUnfoldGath :: (Map (NontermIdent, Int) ([String], Code.Type))+                           _lhsOwrapDecls :: Decls+                           -- "GenerateCode.ag"(line 248, column 10)+                           _lhsOisNil =+                               {-# LINE 248 "GenerateCode.ag" #-}+                               True+                               {-# LINE 3993 "GenerateCode.hs" #-}+                           -- use rule "GenerateCode.ag"(line 767, column 52)+                           _lhsOcomments =+                               {-# LINE 767 "GenerateCode.ag" #-}+                               []+                               {-# LINE 3998 "GenerateCode.hs" #-}+                           -- use rule "GenerateCode.ag"(line 621, column 50)+                           _lhsOsemDom =+                               {-# LINE 621 "GenerateCode.ag" #-}+                               []+                               {-# LINE 4003 "GenerateCode.hs" #-}+                           -- use rule "GenerateCode.ag"(line 640, column 86)+                           _lhsOsemDomUnfoldGath =+                               {-# LINE 640 "GenerateCode.ag" #-}+                               Map.empty+                               {-# LINE 4008 "GenerateCode.hs" #-}+                           -- use rule "GenerateCode.ag"(line 716, column 52)+                           _lhsOwrapDecls =+                               {-# LINE 716 "GenerateCode.ag" #-}+                               []+                               {-# LINE 4013 "GenerateCode.hs" #-}+                       in  ( _lhsOcomments,_lhsOisNil,_lhsOsemDom,_lhsOsemDomUnfoldGath,_lhsOwrapDecls))) )+-- CVisit ------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allNts               : Set NontermIdent+         allPragmas           : PragmaMap+         aroundMap            : Set Identifier+         children             : [(Identifier,Type,Bool)]+         con                  : ConstructorIdent+         contextMap           : ContextMap+         inh                  : Attributes+         instVisitNrs         : Map Identifier Int+         isLast               : Bool+         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_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+         paramInstMap         : Map Identifier (NontermIdent, [String])+         paramMap             : ParamMap+         prefix               : String+         syn                  : Attributes+         terminals            : [Identifier]+         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type+         with_sig             : Bool+      chained attribute:+         errors               : Seq Error+      synthesized attributes:+         allTpsFound          : Bool+         comments             : [String]+         decls                : Decls+         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 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_case      : _+            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,Bool)]) ->+                              ConstructorIdent ->+                              ContextMap ->+                              (Seq Error) ->+                              Attributes ->+                              (Map Identifier Int) ->+                              Bool ->+                              Exprs ->+                              (Set String) ->+                              Int ->+                              NontermIdent ->+                              Bool ->+                              Bool ->+                              Bool ->+                              (Maybe Bool) ->+                              Bool ->+                              Bool ->+                              Bool ->+                              Bool ->+                              Bool ->+                              Bool ->+                              Bool ->+                              Bool ->+                              Bool ->+                              Bool ->+                              (Map Identifier (NontermIdent, [String])) ->+                              ParamMap ->+                              String ->+                              Attributes ->+                              ([Identifier]) ->+                              (NontermIdent -> Int -> [String] -> Code.Type) ->+                              Bool ->+                              ( Bool,([String]),Decls,(Seq Error),(Map Identifier Int),Exprs,(Set String),([String])))+data Inh_CVisit  = Inh_CVisit {allNts_Inh_CVisit :: !(Set NontermIdent),allPragmas_Inh_CVisit :: !(PragmaMap),aroundMap_Inh_CVisit :: !(Set Identifier),children_Inh_CVisit :: !([(Identifier,Type,Bool)]),con_Inh_CVisit :: !(ConstructorIdent),contextMap_Inh_CVisit :: !(ContextMap),errors_Inh_CVisit :: !(Seq Error),inh_Inh_CVisit :: !(Attributes),instVisitNrs_Inh_CVisit :: !(Map Identifier Int),isLast_Inh_CVisit :: !(Bool),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_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),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),with_sig_Inh_CVisit :: !(Bool)}+data Syn_CVisit  = Syn_CVisit {allTpsFound_Syn_CVisit :: !(Bool),comments_Syn_CVisit :: !([String]),decls_Syn_CVisit :: !(Decls),errors_Syn_CVisit :: !(Seq Error),gatherInstVisitNrs_Syn_CVisit :: !(Map Identifier Int),intra_Syn_CVisit :: !(Exprs),intraVars_Syn_CVisit :: !(Set String),semNames_Syn_CVisit :: !([String])}+wrap_CVisit :: T_CVisit  ->+               Inh_CVisit  ->+               Syn_CVisit +wrap_CVisit (T_CVisit sem ) (Inh_CVisit _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIerrors _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwith_sig )  =+    (let ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames) =+             (sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIerrors _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwith_sig )+     in  (Syn_CVisit _lhsOallTpsFound _lhsOcomments _lhsOdecls _lhsOerrors _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames ))+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+                 _lhsIerrors+                 _lhsIinh+                 _lhsIinstVisitNrs+                 _lhsIisLast+                 _lhsInextIntra+                 _lhsInextIntraVars+                 _lhsInr+                 _lhsInt+                 _lhsIo_case+                 _lhsIo_cata+                 _lhsIo_costcentre+                 _lhsIo_data+                 _lhsIo_linePragmas+                 _lhsIo_newtypes+                 _lhsIo_pretty+                 _lhsIo_rename+                 _lhsIo_sem+                 _lhsIo_sig+                 _lhsIo_splitsems+                 _lhsIo_strictwrap+                 _lhsIo_traces+                 _lhsIo_unbox+                 _lhsIparamInstMap+                 _lhsIparamMap+                 _lhsIprefix+                 _lhsIsyn+                 _lhsIterminals+                 _lhsIunfoldSemDom+                 _lhsIwith_sig ->+                   (let _lhsOintra :: Exprs+                        _lhsOintraVars :: (Set String)+                        _vssOlastExpr :: Expr+                        _intraOlastExpr :: Expr+                        _lhsOdecls :: Decls+                        _lhsOgatherInstVisitNrs :: (Map Identifier Int)+                        _vssOdeclsAbove :: ([Decl])+                        _intraOdeclsAbove :: ([Decl])+                        _lhsOallTpsFound :: Bool+                        _lhsOerrors :: (Seq Error)+                        _lhsOcomments :: ([String])+                        _vssOwhat :: String+                        _intraOwhat :: String+                        _lhsOsemNames :: ([String])+                        _vssOallNts :: (Set NontermIdent)+                        _vssOaroundMap :: (Set Identifier)+                        _vssOchildren :: ([(Identifier,Type,Bool)])+                        _vssOcon :: ConstructorIdent+                        _vssOerrors :: (Seq Error)+                        _vssOhigherOrderChildren :: ([(Identifier,Type,Bool)])+                        _vssOinh :: Attributes+                        _vssOinstVisitNrs :: (Map Identifier Int)+                        _vssOnr :: Int+                        _vssOnt :: NontermIdent+                        _vssOo_case :: Bool+                        _vssOo_cata :: Bool+                        _vssOo_costcentre :: Bool+                        _vssOo_data :: (Maybe Bool)+                        _vssOo_linePragmas :: 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+                        _vssOparamInstMap :: (Map Identifier (NontermIdent, [String]))+                        _vssOparamMap :: ParamMap+                        _vssOprefix :: String+                        _vssOsyn :: Attributes+                        _vssOterminals :: ([Identifier])+                        _vssOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                        _intraOallNts :: (Set NontermIdent)+                        _intraOaroundMap :: (Set Identifier)+                        _intraOchildren :: ([(Identifier,Type,Bool)])+                        _intraOcon :: ConstructorIdent+                        _intraOerrors :: (Seq Error)+                        _intraOhigherOrderChildren :: ([(Identifier,Type,Bool)])+                        _intraOinh :: Attributes+                        _intraOinstVisitNrs :: (Map Identifier Int)+                        _intraOnr :: Int+                        _intraOnt :: NontermIdent+                        _intraOo_case :: Bool+                        _intraOo_cata :: Bool+                        _intraOo_costcentre :: Bool+                        _intraOo_data :: (Maybe Bool)+                        _intraOo_linePragmas :: 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+                        _intraOparamInstMap :: (Map Identifier (NontermIdent, [String]))+                        _intraOparamMap :: ParamMap+                        _intraOprefix :: String+                        _intraOsyn :: Attributes+                        _intraOterminals :: ([Identifier])+                        _intraOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                        _vssIallTpsFound :: Bool+                        _vssIblockDecls :: DeclBlocks+                        _vssIcomments :: ([String])+                        _vssIdecls :: Decls+                        _vssIdeclsAbove :: ([Decl])+                        _vssIdefinedInsts :: ([Identifier])+                        _vssIerrors :: (Seq Error)+                        _vssIexprs :: Exprs+                        _vssItSigs :: ([Decl])+                        _vssItps :: ([Type])+                        _vssIusedVars :: (Set String)+                        _intraIallTpsFound :: Bool+                        _intraIblockDecls :: DeclBlocks+                        _intraIcomments :: ([String])+                        _intraIdecls :: Decls+                        _intraIdeclsAbove :: ([Decl])+                        _intraIdefinedInsts :: ([Identifier])+                        _intraIerrors :: (Seq Error)+                        _intraIexprs :: Exprs+                        _intraItSigs :: ([Decl])+                        _intraItps :: ([Type])+                        _intraIusedVars :: (Set String)+                        -- "GenerateCode.ag"(line 257, column 13)+                        _lhsOintra =+                            {-# LINE 257 "GenerateCode.ag" #-}+                            _intraIexprs+                            {-# LINE 4285 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 258, column 13)+                        _lhsOintraVars =+                            {-# LINE 258 "GenerateCode.ag" #-}+                            _intraIusedVars+                            {-# LINE 4290 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 370, column 13)+                        __tup4 =+                            {-# LINE 370 "GenerateCode.ag" #-}+                            partition (\(_,_,ho) -> ho) _lhsIchildren+                            {-# LINE 4295 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 370, column 13)+                        (_higherOrderChildren,_) =+                            {-# LINE 370 "GenerateCode.ag" #-}+                            __tup4+                            {-# LINE 4300 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 370, column 13)+                        (_,_firstOrderChildren) =+                            {-# LINE 370 "GenerateCode.ag" #-}+                            __tup4+                            {-# LINE 4305 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 371, column 13)+                        _funcname =+                            {-# LINE 371 "GenerateCode.ag" #-}+                            seqSemname _lhsIprefix _lhsInt _lhsIcon _lhsInr+                            {-# LINE 4310 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 372, column 13)+                        _nextVisitName =+                            {-# LINE 372 "GenerateCode.ag" #-}+                            if _lhsIisLast then [] else [visitname _lhsIprefix _lhsInt (_lhsInr+1)]+                            {-# LINE 4315 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 373, column 13)+                        _nextVisitDecl =+                            {-# LINE 373 "GenerateCode.ag" #-}+                            let  lhs = TupleLhs _nextVisitName+                                 rhs = App fun _lhsInextIntra+                                 fun = seqSemname _lhsIprefix _lhsInt _lhsIcon (_lhsInr+1)+                            in if _lhsIisLast+                               then []+                               else [Decl lhs rhs (Set.fromList _nextVisitName) _lhsInextIntraVars]+                            {-# LINE 4325 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 379, column 13)+                        _decls =+                            {-# LINE 379 "GenerateCode.ag" #-}+                            _typeSigs ++ _vssIdecls ++ _nextVisitDecl+                            {-# LINE 4330 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 380, column 13)+                        _vssOlastExpr =+                            {-# LINE 380 "GenerateCode.ag" #-}+                            mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_) $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName+                            {-# LINE 4335 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 381, column 13)+                        _intraOlastExpr =+                            {-# LINE 381 "GenerateCode.ag" #-}+                            error "lastExpr: not used here"+                            {-# LINE 4340 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 382, column 13)+                        _lastExprVars =+                            {-# LINE 382 "GenerateCode.ag" #-}+                            map (lhsname False) (Map.keys syn_) ++ _nextVisitName+                            {-# LINE 4345 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 383, column 13)+                        __tup5 =+                            {-# LINE 383 "GenerateCode.ag" #-}+                            mkPartitionedFunction _funcname     _o_case     _nextVisitDecl     _lastExprVars     _vssIblockDecls+                            {-# LINE 4350 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 383, column 13)+                        (_blockFunDecls,_) =+                            {-# LINE 383 "GenerateCode.ag" #-}+                            __tup5+                            {-# LINE 4355 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 383, column 13)+                        (_,_blockFirstFunCall) =+                            {-# LINE 383 "GenerateCode.ag" #-}+                            __tup5+                            {-# LINE 4360 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 385, column 13)+                        _costCentreDescr =+                            {-# LINE 385 "GenerateCode.ag" #-}+                            "b" ++ ":" ++ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show _lhsInr+                            {-# LINE 4365 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 386, column 13)+                        _addCostCentre =+                            {-# LINE 386 "GenerateCode.ag" #-}+                            \v -> if _lhsIo_costcentre+                                  then PragmaExpr True False ("SCC \"" ++ _costCentreDescr     ++ "\"") v+                                  else v+                            {-# LINE 4372 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 390, column 13)+                        _params =+                            {-# LINE 390 "GenerateCode.ag" #-}+                            map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+                            {-# LINE 4377 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 391, column 13)+                        _semFun =+                            {-# LINE 391 "GenerateCode.ag" #-}+                            let  lhs = Fun _funcname lhs_args+                                 lhs_args = if _lhsInr == 0 then map field _firstOrderChildren     else _intraIexprs+                                 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 $ SimpleType (typeToHaskellString (Just _lhsInt) _params     tp))+                                 mbEvalTp | null _params     = const Nothing+                                          | otherwise        = Just . idEvalType+                                 rhs = wrap+                                     . mkLambda [mkLambdaArg (lhsname True nm) (mbEvalTp $ SimpleType $ typeToHaskellString (Just _lhsInt) _params     tp) | (nm,tp) <- Map.assocs inh_]+                                     $ _addCostCentre+                                     $ if ordered_ && _o_splitsems+                                       then _blockFirstFunCall+                                       else mkLet _o_case _decls+                                            . 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 4406 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 421, column 13)+                        _tsig =+                            {-# LINE 421 "GenerateCode.ag" #-}+                            TSig _funcname _semType+                            {-# LINE 4411 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 422, column 13)+                        _semType =+                            {-# LINE 422 "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) _firstOrderChildren    )+                                   else foldr argType (typeAppStrs (typeName _lhsInt _lhsInr) _params    ) _intraItps+                            {-# LINE 4424 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 433, column 13)+                        _lhsOdecls =+                            {-# LINE 433 "GenerateCode.ag" #-}+                            ( if  _lhsIwith_sig+                              then [_tsig, _semFun]+                              else [_semFun]+                            ) +++                            ( if ordered_ && _o_splitsems+                              then _blockFunDecls+                              else []+                            )+                            {-# LINE 4436 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 441, column 13)+                        _typeSigs =+                            {-# LINE 441 "GenerateCode.ag" #-}+                            if  _lhsIo_sig && not _o_case+                                then  _vssItSigs+                                else  []+                            {-# LINE 4443 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 444, column 13)+                        _o_case =+                            {-# LINE 444 "GenerateCode.ag" #-}+                            _lhsIo_case && ordered_ && not (hasPragma _lhsIallPragmas _lhsInt _lhsIcon _NOCASE)+                            {-# LINE 4448 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 445, column 13)+                        _o_splitsems =+                            {-# LINE 445 "GenerateCode.ag" #-}+                            ordered_ && _lhsIo_splitsems+                            {-# LINE 4453 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 467, column 7)+                        _lhsOgatherInstVisitNrs =+                            {-# LINE 467 "GenerateCode.ag" #-}+                            Map.fromList [(i,_lhsInr) | i <- _vssIdefinedInsts]+                            {-# LINE 4458 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 494, column 7)+                        _vssOdeclsAbove =+                            {-# LINE 494 "GenerateCode.ag" #-}+                            []+                            {-# LINE 4463 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 495, column 7)+                        _intraOdeclsAbove =+                            {-# LINE 495 "GenerateCode.ag" #-}+                            error "declsAbove: not used here"+                            {-# LINE 4468 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 741, column 13)+                        _lhsOallTpsFound =+                            {-# LINE 741 "GenerateCode.ag" #-}+                            _intraIallTpsFound+                            {-# LINE 4473 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 752, column 13)+                        _lhsOerrors =+                            {-# LINE 752 "GenerateCode.ag" #-}+                            _intraIerrors+                            {-# LINE 4478 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 785, column 18)+                        _lhsOcomments =+                            {-# LINE 785 "GenerateCode.ag" #-}+                            let body = map ind (_vssIcomments ++ _intraIcomments)+                            in if null body+                               then []+                               else ("visit " ++ show _lhsInr ++ ":") : body+                            {-# LINE 4486 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 789, column 18)+                        _vssOwhat =+                            {-# LINE 789 "GenerateCode.ag" #-}+                            "local"+                            {-# LINE 4491 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 790, column 18)+                        _intraOwhat =+                            {-# LINE 790 "GenerateCode.ag" #-}+                            "intra"+                            {-# LINE 4496 "GenerateCode.hs" #-}+                        -- "GenerateCode.ag"(line 1024, column 7)+                        _lhsOsemNames =+                            {-# LINE 1024 "GenerateCode.ag" #-}+                            [_funcname    ]+                            {-# LINE 4501 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOallNts =+                            {-# LINE 120 "GenerateCode.ag" #-}+                            _lhsIallNts+                            {-# LINE 4506 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOaroundMap =+                            {-# LINE 479 "GenerateCode.ag" #-}+                            _lhsIaroundMap+                            {-# LINE 4511 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOchildren =+                            {-# LINE 351 "GenerateCode.ag" #-}+                            _lhsIchildren+                            {-# LINE 4516 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOcon =+                            {-# LINE 82 "GenerateCode.ag" #-}+                            _lhsIcon+                            {-# LINE 4521 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOerrors =+                            {-# LINE 748 "GenerateCode.ag" #-}+                            _lhsIerrors+                            {-# LINE 4526 "GenerateCode.hs" #-}+                        -- copy rule (from local)+                        _vssOhigherOrderChildren =+                            {-# LINE 206 "GenerateCode.ag" #-}+                            _higherOrderChildren+                            {-# LINE 4531 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOinh =+                            {-# LINE 77 "GenerateCode.ag" #-}+                            _lhsIinh+                            {-# LINE 4536 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOinstVisitNrs =+                            {-# LINE 459 "GenerateCode.ag" #-}+                            _lhsIinstVisitNrs+                            {-# LINE 4541 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOnr =+                            {-# LINE 225 "GenerateCode.ag" #-}+                            _lhsInr+                            {-# LINE 4546 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOnt =+                            {-# LINE 77 "GenerateCode.ag" #-}+                            _lhsInt+                            {-# LINE 4551 "GenerateCode.hs" #-}+                        -- copy rule (from local)+                        _vssOo_case =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _o_case+                            {-# LINE 4556 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_cata =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_cata+                            {-# LINE 4561 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_costcentre =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_costcentre+                            {-# LINE 4566 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_data =+                            {-# LINE 46 "GenerateCode.ag" #-}+                            _lhsIo_data+                            {-# LINE 4571 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_linePragmas =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_linePragmas+                            {-# LINE 4576 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_newtypes =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_newtypes+                            {-# LINE 4581 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_pretty =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_pretty+                            {-# LINE 4586 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_rename =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_rename+                            {-# LINE 4591 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_sem =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_sem+                            {-# LINE 4596 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_sig =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_sig+                            {-# LINE 4601 "GenerateCode.hs" #-}+                        -- copy rule (from local)+                        _vssOo_splitsems =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _o_splitsems+                            {-# LINE 4606 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_strictwrap =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_strictwrap+                            {-# LINE 4611 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_traces =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_traces+                            {-# LINE 4616 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOo_unbox =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_unbox+                            {-# LINE 4621 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOparamInstMap =+                            {-# LINE 94 "GenerateCode.ag" #-}+                            _lhsIparamInstMap+                            {-# LINE 4626 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOparamMap =+                            {-# LINE 88 "GenerateCode.ag" #-}+                            _lhsIparamMap+                            {-# LINE 4631 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOprefix =+                            {-# LINE 47 "GenerateCode.ag" #-}+                            _lhsIprefix+                            {-# LINE 4636 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOsyn =+                            {-# LINE 77 "GenerateCode.ag" #-}+                            _lhsIsyn+                            {-# LINE 4641 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOterminals =+                            {-# LINE 83 "GenerateCode.ag" #-}+                            _lhsIterminals+                            {-# LINE 4646 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _vssOunfoldSemDom =+                            {-# LINE 646 "GenerateCode.ag" #-}+                            _lhsIunfoldSemDom+                            {-# LINE 4651 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOallNts =+                            {-# LINE 120 "GenerateCode.ag" #-}+                            _lhsIallNts+                            {-# LINE 4656 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOaroundMap =+                            {-# LINE 479 "GenerateCode.ag" #-}+                            _lhsIaroundMap+                            {-# LINE 4661 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOchildren =+                            {-# LINE 351 "GenerateCode.ag" #-}+                            _lhsIchildren+                            {-# LINE 4666 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOcon =+                            {-# LINE 82 "GenerateCode.ag" #-}+                            _lhsIcon+                            {-# LINE 4671 "GenerateCode.hs" #-}+                        -- copy rule (chain)+                        _intraOerrors =+                            {-# LINE 748 "GenerateCode.ag" #-}+                            _vssIerrors+                            {-# LINE 4676 "GenerateCode.hs" #-}+                        -- copy rule (from local)+                        _intraOhigherOrderChildren =+                            {-# LINE 206 "GenerateCode.ag" #-}+                            _higherOrderChildren+                            {-# LINE 4681 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOinh =+                            {-# LINE 77 "GenerateCode.ag" #-}+                            _lhsIinh+                            {-# LINE 4686 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOinstVisitNrs =+                            {-# LINE 459 "GenerateCode.ag" #-}+                            _lhsIinstVisitNrs+                            {-# LINE 4691 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOnr =+                            {-# LINE 225 "GenerateCode.ag" #-}+                            _lhsInr+                            {-# LINE 4696 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOnt =+                            {-# LINE 77 "GenerateCode.ag" #-}+                            _lhsInt+                            {-# LINE 4701 "GenerateCode.hs" #-}+                        -- copy rule (from local)+                        _intraOo_case =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _o_case+                            {-# LINE 4706 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_cata =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_cata+                            {-# LINE 4711 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_costcentre =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_costcentre+                            {-# LINE 4716 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_data =+                            {-# LINE 46 "GenerateCode.ag" #-}+                            _lhsIo_data+                            {-# LINE 4721 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_linePragmas =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_linePragmas+                            {-# LINE 4726 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_newtypes =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_newtypes+                            {-# LINE 4731 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_pretty =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_pretty+                            {-# LINE 4736 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_rename =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_rename+                            {-# LINE 4741 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_sem =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_sem+                            {-# LINE 4746 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_sig =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_sig+                            {-# LINE 4751 "GenerateCode.hs" #-}+                        -- copy rule (from local)+                        _intraOo_splitsems =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _o_splitsems+                            {-# LINE 4756 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_strictwrap =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_strictwrap+                            {-# LINE 4761 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_traces =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_traces+                            {-# LINE 4766 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOo_unbox =+                            {-# LINE 45 "GenerateCode.ag" #-}+                            _lhsIo_unbox+                            {-# LINE 4771 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOparamInstMap =+                            {-# LINE 94 "GenerateCode.ag" #-}+                            _lhsIparamInstMap+                            {-# LINE 4776 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOparamMap =+                            {-# LINE 88 "GenerateCode.ag" #-}+                            _lhsIparamMap+                            {-# LINE 4781 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOprefix =+                            {-# LINE 47 "GenerateCode.ag" #-}+                            _lhsIprefix+                            {-# LINE 4786 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOsyn =+                            {-# LINE 77 "GenerateCode.ag" #-}+                            _lhsIsyn+                            {-# LINE 4791 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOterminals =+                            {-# LINE 83 "GenerateCode.ag" #-}+                            _lhsIterminals+                            {-# LINE 4796 "GenerateCode.hs" #-}+                        -- copy rule (down)+                        _intraOunfoldSemDom =+                            {-# LINE 646 "GenerateCode.ag" #-}+                            _lhsIunfoldSemDom+                            {-# LINE 4801 "GenerateCode.hs" #-}+                        ( _vssIallTpsFound,_vssIblockDecls,_vssIcomments,_vssIdecls,_vssIdeclsAbove,_vssIdefinedInsts,_vssIerrors,_vssIexprs,_vssItSigs,_vssItps,_vssIusedVars) =+                            (vss_ _vssOallNts _vssOaroundMap _vssOchildren _vssOcon _vssOdeclsAbove _vssOerrors _vssOhigherOrderChildren _vssOinh _vssOinstVisitNrs _vssOlastExpr _vssOnr _vssOnt _vssOo_case _vssOo_cata _vssOo_costcentre _vssOo_data _vssOo_linePragmas _vssOo_newtypes _vssOo_pretty _vssOo_rename _vssOo_sem _vssOo_sig _vssOo_splitsems _vssOo_strictwrap _vssOo_traces _vssOo_unbox _vssOparamInstMap _vssOparamMap _vssOprefix _vssOsyn _vssOterminals _vssOunfoldSemDom _vssOwhat )+                        ( _intraIallTpsFound,_intraIblockDecls,_intraIcomments,_intraIdecls,_intraIdeclsAbove,_intraIdefinedInsts,_intraIerrors,_intraIexprs,_intraItSigs,_intraItps,_intraIusedVars) =+                            (intra_ _intraOallNts _intraOaroundMap _intraOchildren _intraOcon _intraOdeclsAbove _intraOerrors _intraOhigherOrderChildren _intraOinh _intraOinstVisitNrs _intraOlastExpr _intraOnr _intraOnt _intraOo_case _intraOo_cata _intraOo_costcentre _intraOo_data _intraOo_linePragmas _intraOo_newtypes _intraOo_pretty _intraOo_rename _intraOo_sem _intraOo_sig _intraOo_splitsems _intraOo_strictwrap _intraOo_traces _intraOo_unbox _intraOparamInstMap _intraOparamMap _intraOprefix _intraOsyn _intraOterminals _intraOunfoldSemDom _intraOwhat )+                    in  ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOsemNames))) )+-- CVisits -----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allNts               : Set NontermIdent+         allPragmas           : PragmaMap+         aroundMap            : Set Identifier+         children             : [(Identifier,Type,Bool)]+         con                  : ConstructorIdent+         contextMap           : ContextMap+         inh                  : Attributes+         instVisitNrs         : Map Identifier Int+         nr                   : Int+         nt                   : NontermIdent+         o_case               : Bool+         o_cata               : Bool+         o_costcentre         : Bool+         o_data               : Maybe Bool+         o_linePragmas        : 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+         paramInstMap         : Map Identifier (NontermIdent, [String])+         paramMap             : ParamMap+         prefix               : String+         syn                  : Attributes+         terminals            : [Identifier]+         unfoldSemDom         : NontermIdent -> Int -> [String] -> Code.Type+         with_sig             : Bool+      chained attribute:+         errors               : Seq Error+      synthesized attributes:+         allTpsFound          : Bool+         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,Bool)]) ->+                                ConstructorIdent ->+                                ContextMap ->+                                (Seq Error) ->+                                Attributes ->+                                (Map Identifier Int) ->+                                Int ->+                                NontermIdent ->+                                Bool ->+                                Bool ->+                                Bool ->+                                (Maybe Bool) ->+                                Bool ->+                                Bool ->+                                Bool ->+                                Bool ->+                                Bool ->+                                Bool ->+                                Bool ->+                                Bool ->+                                Bool ->+                                Bool ->+                                (Map Identifier (NontermIdent, [String])) ->+                                ParamMap ->+                                String ->+                                Attributes ->+                                ([Identifier]) ->+                                (NontermIdent -> Int -> [String] -> Code.Type) ->+                                Bool ->+                                ( Bool,([String]),Decls,(Seq Error),(Map Identifier Int),Exprs,(Set String),Bool,([String])))+data Inh_CVisits  = Inh_CVisits {allNts_Inh_CVisits :: !(Set NontermIdent),allPragmas_Inh_CVisits :: !(PragmaMap),aroundMap_Inh_CVisits :: !(Set Identifier),children_Inh_CVisits :: !([(Identifier,Type,Bool)]),con_Inh_CVisits :: !(ConstructorIdent),contextMap_Inh_CVisits :: !(ContextMap),errors_Inh_CVisits :: !(Seq Error),inh_Inh_CVisits :: !(Attributes),instVisitNrs_Inh_CVisits :: !(Map Identifier Int),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_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),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),with_sig_Inh_CVisits :: !(Bool)}+data Syn_CVisits  = Syn_CVisits {allTpsFound_Syn_CVisits :: !(Bool),comments_Syn_CVisits :: !([String]),decls_Syn_CVisits :: !(Decls),errors_Syn_CVisits :: !(Seq Error),gatherInstVisitNrs_Syn_CVisits :: !(Map Identifier Int),intra_Syn_CVisits :: !(Exprs),intraVars_Syn_CVisits :: !(Set String),isNil_Syn_CVisits :: !(Bool),semNames_Syn_CVisits :: !([String])}+wrap_CVisits :: T_CVisits  ->+                Inh_CVisits  ->+                Syn_CVisits +wrap_CVisits (T_CVisits sem ) (Inh_CVisits _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIerrors _lhsIinh _lhsIinstVisitNrs _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwith_sig )  =+    (let ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames) =+             (sem _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIerrors _lhsIinh _lhsIinstVisitNrs _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwith_sig )+     in  (Syn_CVisits _lhsOallTpsFound _lhsOcomments _lhsOdecls _lhsOerrors _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames ))+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+                  _lhsIerrors+                  _lhsIinh+                  _lhsIinstVisitNrs+                  _lhsInr+                  _lhsInt+                  _lhsIo_case+                  _lhsIo_cata+                  _lhsIo_costcentre+                  _lhsIo_data+                  _lhsIo_linePragmas+                  _lhsIo_newtypes+                  _lhsIo_pretty+                  _lhsIo_rename+                  _lhsIo_sem+                  _lhsIo_sig+                  _lhsIo_splitsems+                  _lhsIo_strictwrap+                  _lhsIo_traces+                  _lhsIo_unbox+                  _lhsIparamInstMap+                  _lhsIparamMap+                  _lhsIprefix+                  _lhsIsyn+                  _lhsIterminals+                  _lhsIunfoldSemDom+                  _lhsIwith_sig ->+                    (let _tlOnr :: Int+                         _lhsOisNil :: Bool+                         _hdOisLast :: Bool+                         _hdOnextIntra :: Exprs+                         _hdOnextIntraVars :: (Set String)+                         _lhsOintra :: Exprs+                         _lhsOintraVars :: (Set String)+                         _lhsOallTpsFound :: Bool+                         _lhsOcomments :: ([String])+                         _lhsOdecls :: Decls+                         _lhsOerrors :: (Seq Error)+                         _lhsOgatherInstVisitNrs :: (Map Identifier Int)+                         _lhsOsemNames :: ([String])+                         _hdOallNts :: (Set NontermIdent)+                         _hdOallPragmas :: PragmaMap+                         _hdOaroundMap :: (Set Identifier)+                         _hdOchildren :: ([(Identifier,Type,Bool)])+                         _hdOcon :: ConstructorIdent+                         _hdOcontextMap :: ContextMap+                         _hdOerrors :: (Seq Error)+                         _hdOinh :: Attributes+                         _hdOinstVisitNrs :: (Map Identifier Int)+                         _hdOnr :: Int+                         _hdOnt :: NontermIdent+                         _hdOo_case :: Bool+                         _hdOo_cata :: Bool+                         _hdOo_costcentre :: Bool+                         _hdOo_data :: (Maybe Bool)+                         _hdOo_linePragmas :: 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+                         _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))+                         _hdOparamMap :: ParamMap+                         _hdOprefix :: String+                         _hdOsyn :: Attributes+                         _hdOterminals :: ([Identifier])+                         _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                         _hdOwith_sig :: Bool+                         _tlOallNts :: (Set NontermIdent)+                         _tlOallPragmas :: PragmaMap+                         _tlOaroundMap :: (Set Identifier)+                         _tlOchildren :: ([(Identifier,Type,Bool)])+                         _tlOcon :: ConstructorIdent+                         _tlOcontextMap :: ContextMap+                         _tlOerrors :: (Seq Error)+                         _tlOinh :: Attributes+                         _tlOinstVisitNrs :: (Map Identifier Int)+                         _tlOnt :: NontermIdent+                         _tlOo_case :: Bool+                         _tlOo_cata :: Bool+                         _tlOo_costcentre :: Bool+                         _tlOo_data :: (Maybe Bool)+                         _tlOo_linePragmas :: 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+                         _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))+                         _tlOparamMap :: ParamMap+                         _tlOprefix :: String+                         _tlOsyn :: Attributes+                         _tlOterminals :: ([Identifier])+                         _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                         _tlOwith_sig :: Bool+                         _hdIallTpsFound :: Bool+                         _hdIcomments :: ([String])+                         _hdIdecls :: Decls+                         _hdIerrors :: (Seq Error)+                         _hdIgatherInstVisitNrs :: (Map Identifier Int)+                         _hdIintra :: Exprs+                         _hdIintraVars :: (Set String)+                         _hdIsemNames :: ([String])+                         _tlIallTpsFound :: Bool+                         _tlIcomments :: ([String])+                         _tlIdecls :: Decls+                         _tlIerrors :: (Seq Error)+                         _tlIgatherInstVisitNrs :: (Map Identifier Int)+                         _tlIintra :: Exprs+                         _tlIintraVars :: (Set String)+                         _tlIisNil :: Bool+                         _tlIsemNames :: ([String])+                         -- "GenerateCode.ag"(line 229, column 11)+                         _tlOnr =+                             {-# LINE 229 "GenerateCode.ag" #-}+                             _lhsInr + 1+                             {-# LINE 5040 "GenerateCode.hs" #-}+                         -- "GenerateCode.ag"(line 242, column 12)+                         _lhsOisNil =+                             {-# LINE 242 "GenerateCode.ag" #-}+                             False+                             {-# LINE 5045 "GenerateCode.hs" #-}+                         -- "GenerateCode.ag"(line 243, column 12)+                         _hdOisLast =+                             {-# LINE 243 "GenerateCode.ag" #-}+                             _tlIisNil+                             {-# LINE 5050 "GenerateCode.hs" #-}+                         -- "GenerateCode.ag"(line 260, column 12)+                         _hdOnextIntra =+                             {-# LINE 260 "GenerateCode.ag" #-}+                             _tlIintra+                             {-# LINE 5055 "GenerateCode.hs" #-}+                         -- "GenerateCode.ag"(line 261, column 12)+                         _hdOnextIntraVars =+                             {-# LINE 261 "GenerateCode.ag" #-}+                             _tlIintraVars+                             {-# LINE 5060 "GenerateCode.hs" #-}+                         -- "GenerateCode.ag"(line 262, column 12)+                         _lhsOintra =+                             {-# LINE 262 "GenerateCode.ag" #-}+                             _hdIintra+                             {-# LINE 5065 "GenerateCode.hs" #-}+                         -- "GenerateCode.ag"(line 263, column 12)+                         _lhsOintraVars =+                             {-# LINE 263 "GenerateCode.ag" #-}+                             _hdIintraVars+                             {-# LINE 5070 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 735, column 39)+                         _lhsOallTpsFound =+                             {-# LINE 735 "GenerateCode.ag" #-}+                             _hdIallTpsFound && _tlIallTpsFound+                             {-# LINE 5075 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 767, column 52)+                         _lhsOcomments =+                             {-# LINE 767 "GenerateCode.ag" #-}+                             _hdIcomments ++ _tlIcomments+                             {-# LINE 5080 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 368, column 33)+                         _lhsOdecls =+                             {-# LINE 368 "GenerateCode.ag" #-}+                             _hdIdecls ++ _tlIdecls+                             {-# LINE 5085 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 748, column 32)+                         _lhsOerrors =+                             {-# LINE 748 "GenerateCode.ag" #-}+                             _hdIerrors Seq.>< _tlIerrors+                             {-# LINE 5090 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 460, column 44)+                         _lhsOgatherInstVisitNrs =+                             {-# LINE 460 "GenerateCode.ag" #-}+                             _hdIgatherInstVisitNrs `Map.union` _tlIgatherInstVisitNrs+                             {-# LINE 5095 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 1014, column 61)+                         _lhsOsemNames =+                             {-# LINE 1014 "GenerateCode.ag" #-}+                             _hdIsemNames ++ _tlIsemNames+                             {-# LINE 5100 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOallNts =+                             {-# LINE 120 "GenerateCode.ag" #-}+                             _lhsIallNts+                             {-# LINE 5105 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOallPragmas =+                             {-# LINE 66 "GenerateCode.ag" #-}+                             _lhsIallPragmas+                             {-# LINE 5110 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOaroundMap =+                             {-# LINE 479 "GenerateCode.ag" #-}+                             _lhsIaroundMap+                             {-# LINE 5115 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOchildren =+                             {-# LINE 351 "GenerateCode.ag" #-}+                             _lhsIchildren+                             {-# LINE 5120 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOcon =+                             {-# LINE 82 "GenerateCode.ag" #-}+                             _lhsIcon+                             {-# LINE 5125 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOcontextMap =+                             {-# LINE 108 "GenerateCode.ag" #-}+                             _lhsIcontextMap+                             {-# LINE 5130 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOerrors =+                             {-# LINE 748 "GenerateCode.ag" #-}+                             _lhsIerrors+                             {-# LINE 5135 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOinh =+                             {-# LINE 77 "GenerateCode.ag" #-}+                             _lhsIinh+                             {-# LINE 5140 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOinstVisitNrs =+                             {-# LINE 459 "GenerateCode.ag" #-}+                             _lhsIinstVisitNrs+                             {-# LINE 5145 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOnr =+                             {-# LINE 225 "GenerateCode.ag" #-}+                             _lhsInr+                             {-# LINE 5150 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOnt =+                             {-# LINE 77 "GenerateCode.ag" #-}+                             _lhsInt+                             {-# LINE 5155 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_case =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_case+                             {-# LINE 5160 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_cata =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_cata+                             {-# LINE 5165 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_costcentre =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_costcentre+                             {-# LINE 5170 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_data =+                             {-# LINE 46 "GenerateCode.ag" #-}+                             _lhsIo_data+                             {-# LINE 5175 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_linePragmas =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_linePragmas+                             {-# LINE 5180 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_newtypes =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_newtypes+                             {-# LINE 5185 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_pretty =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_pretty+                             {-# LINE 5190 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_rename =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_rename+                             {-# LINE 5195 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_sem =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_sem+                             {-# LINE 5200 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_sig =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_sig+                             {-# LINE 5205 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_splitsems =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_splitsems+                             {-# LINE 5210 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_strictwrap =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_strictwrap+                             {-# LINE 5215 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_traces =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_traces+                             {-# LINE 5220 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOo_unbox =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_unbox+                             {-# LINE 5225 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOparamInstMap =+                             {-# LINE 94 "GenerateCode.ag" #-}+                             _lhsIparamInstMap+                             {-# LINE 5230 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOparamMap =+                             {-# LINE 88 "GenerateCode.ag" #-}+                             _lhsIparamMap+                             {-# LINE 5235 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOprefix =+                             {-# LINE 47 "GenerateCode.ag" #-}+                             _lhsIprefix+                             {-# LINE 5240 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOsyn =+                             {-# LINE 77 "GenerateCode.ag" #-}+                             _lhsIsyn+                             {-# LINE 5245 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOterminals =+                             {-# LINE 83 "GenerateCode.ag" #-}+                             _lhsIterminals+                             {-# LINE 5250 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOunfoldSemDom =+                             {-# LINE 646 "GenerateCode.ag" #-}+                             _lhsIunfoldSemDom+                             {-# LINE 5255 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _hdOwith_sig =+                             {-# LINE 738 "GenerateCode.ag" #-}+                             _lhsIwith_sig+                             {-# LINE 5260 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOallNts =+                             {-# LINE 120 "GenerateCode.ag" #-}+                             _lhsIallNts+                             {-# LINE 5265 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOallPragmas =+                             {-# LINE 66 "GenerateCode.ag" #-}+                             _lhsIallPragmas+                             {-# LINE 5270 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOaroundMap =+                             {-# LINE 479 "GenerateCode.ag" #-}+                             _lhsIaroundMap+                             {-# LINE 5275 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOchildren =+                             {-# LINE 351 "GenerateCode.ag" #-}+                             _lhsIchildren+                             {-# LINE 5280 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOcon =+                             {-# LINE 82 "GenerateCode.ag" #-}+                             _lhsIcon+                             {-# LINE 5285 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOcontextMap =+                             {-# LINE 108 "GenerateCode.ag" #-}+                             _lhsIcontextMap+                             {-# LINE 5290 "GenerateCode.hs" #-}+                         -- copy rule (chain)+                         _tlOerrors =+                             {-# LINE 748 "GenerateCode.ag" #-}+                             _hdIerrors+                             {-# LINE 5295 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOinh =+                             {-# LINE 77 "GenerateCode.ag" #-}+                             _lhsIinh+                             {-# LINE 5300 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOinstVisitNrs =+                             {-# LINE 459 "GenerateCode.ag" #-}+                             _lhsIinstVisitNrs+                             {-# LINE 5305 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOnt =+                             {-# LINE 77 "GenerateCode.ag" #-}+                             _lhsInt+                             {-# LINE 5310 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_case =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_case+                             {-# LINE 5315 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_cata =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_cata+                             {-# LINE 5320 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_costcentre =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_costcentre+                             {-# LINE 5325 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_data =+                             {-# LINE 46 "GenerateCode.ag" #-}+                             _lhsIo_data+                             {-# LINE 5330 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_linePragmas =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_linePragmas+                             {-# LINE 5335 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_newtypes =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_newtypes+                             {-# LINE 5340 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_pretty =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_pretty+                             {-# LINE 5345 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_rename =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_rename+                             {-# LINE 5350 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_sem =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_sem+                             {-# LINE 5355 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_sig =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_sig+                             {-# LINE 5360 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_splitsems =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_splitsems+                             {-# LINE 5365 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_strictwrap =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_strictwrap+                             {-# LINE 5370 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_traces =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_traces+                             {-# LINE 5375 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOo_unbox =+                             {-# LINE 45 "GenerateCode.ag" #-}+                             _lhsIo_unbox+                             {-# LINE 5380 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOparamInstMap =+                             {-# LINE 94 "GenerateCode.ag" #-}+                             _lhsIparamInstMap+                             {-# LINE 5385 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOparamMap =+                             {-# LINE 88 "GenerateCode.ag" #-}+                             _lhsIparamMap+                             {-# LINE 5390 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOprefix =+                             {-# LINE 47 "GenerateCode.ag" #-}+                             _lhsIprefix+                             {-# LINE 5395 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOsyn =+                             {-# LINE 77 "GenerateCode.ag" #-}+                             _lhsIsyn+                             {-# LINE 5400 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOterminals =+                             {-# LINE 83 "GenerateCode.ag" #-}+                             _lhsIterminals+                             {-# LINE 5405 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOunfoldSemDom =+                             {-# LINE 646 "GenerateCode.ag" #-}+                             _lhsIunfoldSemDom+                             {-# LINE 5410 "GenerateCode.hs" #-}+                         -- copy rule (down)+                         _tlOwith_sig =+                             {-# LINE 738 "GenerateCode.ag" #-}+                             _lhsIwith_sig+                             {-# LINE 5415 "GenerateCode.hs" #-}+                         ( _hdIallTpsFound,_hdIcomments,_hdIdecls,_hdIerrors,_hdIgatherInstVisitNrs,_hdIintra,_hdIintraVars,_hdIsemNames) =+                             (hd_ _hdOallNts _hdOallPragmas _hdOaroundMap _hdOchildren _hdOcon _hdOcontextMap _hdOerrors _hdOinh _hdOinstVisitNrs _hdOisLast _hdOnextIntra _hdOnextIntraVars _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamInstMap _hdOparamMap _hdOprefix _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOwith_sig )+                         ( _tlIallTpsFound,_tlIcomments,_tlIdecls,_tlIerrors,_tlIgatherInstVisitNrs,_tlIintra,_tlIintraVars,_tlIisNil,_tlIsemNames) =+                             (tl_ _tlOallNts _tlOallPragmas _tlOaroundMap _tlOchildren _tlOcon _tlOcontextMap _tlOerrors _tlOinh _tlOinstVisitNrs _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOparamInstMap _tlOparamMap _tlOprefix _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOwith_sig )+                     in  ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames))) )+sem_CVisits_Nil :: T_CVisits +sem_CVisits_Nil  =+    (T_CVisits (\ _lhsIallNts+                  _lhsIallPragmas+                  _lhsIaroundMap+                  _lhsIchildren+                  _lhsIcon+                  _lhsIcontextMap+                  _lhsIerrors+                  _lhsIinh+                  _lhsIinstVisitNrs+                  _lhsInr+                  _lhsInt+                  _lhsIo_case+                  _lhsIo_cata+                  _lhsIo_costcentre+                  _lhsIo_data+                  _lhsIo_linePragmas+                  _lhsIo_newtypes+                  _lhsIo_pretty+                  _lhsIo_rename+                  _lhsIo_sem+                  _lhsIo_sig+                  _lhsIo_splitsems+                  _lhsIo_strictwrap+                  _lhsIo_traces+                  _lhsIo_unbox+                  _lhsIparamInstMap+                  _lhsIparamMap+                  _lhsIprefix+                  _lhsIsyn+                  _lhsIterminals+                  _lhsIunfoldSemDom+                  _lhsIwith_sig ->+                    (let _lhsOisNil :: Bool+                         _lhsOintra :: Exprs+                         _lhsOintraVars :: (Set String)+                         _lhsOallTpsFound :: Bool+                         _lhsOcomments :: ([String])+                         _lhsOdecls :: Decls+                         _lhsOerrors :: (Seq Error)+                         _lhsOgatherInstVisitNrs :: (Map Identifier Int)+                         _lhsOsemNames :: ([String])+                         -- "GenerateCode.ag"(line 244, column 10)+                         _lhsOisNil =+                             {-# LINE 244 "GenerateCode.ag" #-}+                             True+                             {-# LINE 5468 "GenerateCode.hs" #-}+                         -- "GenerateCode.ag"(line 264, column 10)+                         _lhsOintra =+                             {-# LINE 264 "GenerateCode.ag" #-}+                             []+                             {-# LINE 5473 "GenerateCode.hs" #-}+                         -- "GenerateCode.ag"(line 265, column 10)+                         _lhsOintraVars =+                             {-# LINE 265 "GenerateCode.ag" #-}+                             Set.empty+                             {-# LINE 5478 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 735, column 39)+                         _lhsOallTpsFound =+                             {-# LINE 735 "GenerateCode.ag" #-}+                             True+                             {-# LINE 5483 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 767, column 52)+                         _lhsOcomments =+                             {-# LINE 767 "GenerateCode.ag" #-}+                             []+                             {-# LINE 5488 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 368, column 33)+                         _lhsOdecls =+                             {-# LINE 368 "GenerateCode.ag" #-}+                             []+                             {-# LINE 5493 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 748, column 32)+                         _lhsOerrors =+                             {-# LINE 748 "GenerateCode.ag" #-}+                             Seq.empty+                             {-# LINE 5498 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 460, column 44)+                         _lhsOgatherInstVisitNrs =+                             {-# LINE 460 "GenerateCode.ag" #-}+                             Map.empty+                             {-# LINE 5503 "GenerateCode.hs" #-}+                         -- use rule "GenerateCode.ag"(line 1014, column 61)+                         _lhsOsemNames =+                             {-# LINE 1014 "GenerateCode.ag" #-}+                             []+                             {-# LINE 5508 "GenerateCode.hs" #-}+                     in  ( _lhsOallTpsFound,_lhsOcomments,_lhsOdecls,_lhsOerrors,_lhsOgatherInstVisitNrs,_lhsOintra,_lhsOintraVars,_lhsOisNil,_lhsOsemNames))) )+-- 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 573, column 7)+                            _nextOblockNr =+                                {-# LINE 573 "GenerateCode.ag" #-}+                                _lhsIblockNr + 1+                                {-# LINE 5589 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 578, column 7)+                            _lambdaName =+                                {-# LINE 578 "GenerateCode.ag" #-}+                                _lhsIprefix ++ "_block" ++ show _lhsIblockNr+                                {-# LINE 5594 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 579, column 7)+                            _pragmaDecl =+                                {-# LINE 579 "GenerateCode.ag" #-}+                                PragmaDecl ("NOINLINE " ++ _lambdaName    )+                                {-# LINE 5599 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 580, column 7)+                            _lhsOcallExpr =+                                {-# LINE 580 "GenerateCode.ag" #-}+                                App _lambdaName     (map SimpleExpr _freeVars    )+                                {-# LINE 5604 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 584, column 7)+                            _freeVars =+                                {-# LINE 584 "GenerateCode.ag" #-}+                                freevars _nextIfreeVars (visit_ : defs_)+                                {-# LINE 5609 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 591, column 7)+                            _decl =+                                {-# LINE 591 "GenerateCode.ag" #-}+                                mkBlockLambda _lhsIoptCase _lambdaName     _freeVars     (defs_ ++ [visit_]) _nextIcallExpr+                                {-# LINE 5614 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 592, column 7)+                            _lhsOdecls =+                                {-# LINE 592 "GenerateCode.ag" #-}+                                (if _lhsIblockNr > 1 then [_pragmaDecl    ] else []) ++ [_decl    ] ++ _nextIdecls+                                {-# LINE 5619 "GenerateCode.hs" #-}+                            -- copy rule (from local)+                            _lhsOfreeVars =+                                {-# LINE 575 "GenerateCode.ag" #-}+                                _freeVars+                                {-# LINE 5624 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _nextOlastExprVars =+                                {-# LINE 559 "GenerateCode.ag" #-}+                                _lhsIlastExprVars+                                {-# LINE 5629 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _nextOnextVisitDecls =+                                {-# LINE 559 "GenerateCode.ag" #-}+                                _lhsInextVisitDecls+                                {-# LINE 5634 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _nextOoptCase =+                                {-# LINE 559 "GenerateCode.ag" #-}+                                _lhsIoptCase+                                {-# LINE 5639 "GenerateCode.hs" #-}+                            -- copy rule (down)+                            _nextOprefix =+                                {-# LINE 559 "GenerateCode.ag" #-}+                                _lhsIprefix+                                {-# LINE 5644 "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 578, column 7)+                            _lambdaName =+                                {-# LINE 578 "GenerateCode.ag" #-}+                                _lhsIprefix ++ "_block" ++ show _lhsIblockNr+                                {-# LINE 5664 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 579, column 7)+                            _pragmaDecl =+                                {-# LINE 579 "GenerateCode.ag" #-}+                                PragmaDecl ("NOINLINE " ++ _lambdaName    )+                                {-# LINE 5669 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 580, column 7)+                            _lhsOcallExpr =+                                {-# LINE 580 "GenerateCode.ag" #-}+                                App _lambdaName     (map SimpleExpr _freeVars    )+                                {-# LINE 5674 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 582, column 7)+                            _freeVars =+                                {-# LINE 582 "GenerateCode.ag" #-}+                                freevars _lhsIlastExprVars (defs_ ++ _lhsInextVisitDecls)+                                {-# LINE 5679 "GenerateCode.hs" #-}+                            -- "GenerateCode.ag"(line 589, column 7)+                            _lhsOdecls =+                                {-# LINE 589 "GenerateCode.ag" #-}+                                [ mkBlockLambda _lhsIoptCase _lambdaName     _freeVars     (defs_ ++ _lhsInextVisitDecls) result_ ]+                                {-# LINE 5684 "GenerateCode.hs" #-}+                            -- copy rule (from local)+                            _lhsOfreeVars =+                                {-# LINE 575 "GenerateCode.ag" #-}+                                _freeVars+                                {-# LINE 5689 "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 564, column 7)+                                _lhsOlambdas =+                                    {-# LINE 564 "GenerateCode.ag" #-}+                                    _blocksIdecls+                                    {-# LINE 5747 "GenerateCode.hs" #-}+                                -- "GenerateCode.ag"(line 565, column 7)+                                _lhsOfirstCall =+                                    {-# LINE 565 "GenerateCode.ag" #-}+                                    _blocksIcallExpr+                                    {-# LINE 5752 "GenerateCode.hs" #-}+                                -- "GenerateCode.ag"(line 570, column 7)+                                _blocksOblockNr =+                                    {-# LINE 570 "GenerateCode.ag" #-}+                                    1+                                    {-# LINE 5757 "GenerateCode.hs" #-}+                                -- copy rule (down)+                                _blocksOlastExprVars =+                                    {-# LINE 559 "GenerateCode.ag" #-}+                                    _lhsIlastExprVars+                                    {-# LINE 5762 "GenerateCode.hs" #-}+                                -- copy rule (down)+                                _blocksOnextVisitDecls =+                                    {-# LINE 559 "GenerateCode.ag" #-}+                                    _lhsInextVisitDecls+                                    {-# LINE 5767 "GenerateCode.hs" #-}+                                -- copy rule (down)+                                _blocksOoptCase =+                                    {-# LINE 559 "GenerateCode.ag" #-}+                                    _lhsIoptCase+                                    {-# LINE 5772 "GenerateCode.hs" #-}+                                -- copy rule (down)+                                _blocksOprefix =+                                    {-# LINE 559 "GenerateCode.ag" #-}+                                    _lhsIprefix+                                    {-# LINE 5777 "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 210, column 11)+                    _lhsOdefinedInsts =+                        {-# LINE 210 "GenerateCode.ag" #-}+                        (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts+                        {-# LINE 5858 "GenerateCode.hs" #-}+                    -- "GenerateCode.ag"(line 218, column 7)+                    _lhsOpatternAttributes =+                        {-# LINE 218 "GenerateCode.ag" #-}+                        (field_,attr_) : (_patIpatternAttributes ++ _partsIpatternAttributes)+                        {-# LINE 5863 "GenerateCode.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Alias field_ attr_ _patIcopy _partsIcopy+                        {-# LINE 5868 "GenerateCode.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 5873 "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 208, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 208 "GenerateCode.ag" #-}+                        _patsIdefinedInsts+                        {-# LINE 5893 "GenerateCode.hs" #-}+                    -- use rule "GenerateCode.ag"(line 215, column 47)+                    _lhsOpatternAttributes =+                        {-# LINE 215 "GenerateCode.ag" #-}+                        _patsIpatternAttributes+                        {-# LINE 5898 "GenerateCode.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Constr name_ _patsIcopy+                        {-# LINE 5903 "GenerateCode.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 5908 "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 208, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 208 "GenerateCode.ag" #-}+                        _patIdefinedInsts+                        {-# LINE 5925 "GenerateCode.hs" #-}+                    -- use rule "GenerateCode.ag"(line 215, column 47)+                    _lhsOpatternAttributes =+                        {-# LINE 215 "GenerateCode.ag" #-}+                        _patIpatternAttributes+                        {-# LINE 5930 "GenerateCode.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Irrefutable _patIcopy+                        {-# LINE 5935 "GenerateCode.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 5940 "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 208, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 208 "GenerateCode.ag" #-}+                        _patsIdefinedInsts+                        {-# LINE 5958 "GenerateCode.hs" #-}+                    -- use rule "GenerateCode.ag"(line 215, column 47)+                    _lhsOpatternAttributes =+                        {-# LINE 215 "GenerateCode.ag" #-}+                        _patsIpatternAttributes+                        {-# LINE 5963 "GenerateCode.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Product pos_ _patsIcopy+                        {-# LINE 5968 "GenerateCode.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 5973 "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 208, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 208 "GenerateCode.ag" #-}+                        []+                        {-# LINE 5987 "GenerateCode.hs" #-}+                    -- use rule "GenerateCode.ag"(line 215, column 47)+                    _lhsOpatternAttributes =+                        {-# LINE 215 "GenerateCode.ag" #-}+                        []+                        {-# LINE 5992 "GenerateCode.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Underscore pos_+                        {-# LINE 5997 "GenerateCode.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 6002 "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 208, column 55)+                     _lhsOdefinedInsts =+                         {-# LINE 208 "GenerateCode.ag" #-}+                         _hdIdefinedInsts ++ _tlIdefinedInsts+                         {-# LINE 6054 "GenerateCode.hs" #-}+                     -- use rule "GenerateCode.ag"(line 215, column 47)+                     _lhsOpatternAttributes =+                         {-# LINE 215 "GenerateCode.ag" #-}+                         _hdIpatternAttributes ++ _tlIpatternAttributes+                         {-# LINE 6059 "GenerateCode.hs" #-}+                     -- self rule+                     _copy =+                         {-# LINE 23 "./Patterns.ag" #-}+                         (:) _hdIcopy _tlIcopy+                         {-# LINE 6064 "GenerateCode.hs" #-}+                     -- self rule+                     _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}+                         _copy+                         {-# LINE 6069 "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 208, column 55)+                     _lhsOdefinedInsts =+                         {-# LINE 208 "GenerateCode.ag" #-}+                         []+                         {-# LINE 6084 "GenerateCode.hs" #-}+                     -- use rule "GenerateCode.ag"(line 215, column 47)+                     _lhsOpatternAttributes =+                         {-# LINE 215 "GenerateCode.ag" #-}+                         []+                         {-# LINE 6089 "GenerateCode.hs" #-}+                     -- self rule+                     _copy =+                         {-# LINE 23 "./Patterns.ag" #-}+                         []+                         {-# LINE 6094 "GenerateCode.hs" #-}+                     -- self rule+                     _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}+                         _copy+                         {-# LINE 6099 "GenerateCode.hs" #-}+                 in  ( _lhsOcopy,_lhsOdefinedInsts,_lhsOpatternAttributes)) )+-- Sequence ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allNts               : Set NontermIdent+         aroundMap            : Set Identifier+         children             : [(Identifier,Type,Bool)]+         con                  : ConstructorIdent+         higherOrderChildren  : [(Identifier,Type,Bool)]+         inh                  : Attributes+         instVisitNrs         : Map Identifier Int+         lastExpr             : Expr+         nr                   : Int+         nt                   : NontermIdent+         o_case               : Bool+         o_cata               : Bool+         o_costcentre         : Bool+         o_data               : Maybe Bool+         o_linePragmas        : 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+         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]+         errors               : Seq Error+      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,Bool)]) ->+                                  ConstructorIdent ->+                                  ([Decl]) ->+                                  (Seq Error) ->+                                  ([(Identifier,Type,Bool)]) ->+                                  Attributes ->+                                  (Map Identifier Int) ->+                                  Expr ->+                                  Int ->+                                  NontermIdent ->+                                  Bool ->+                                  Bool ->+                                  Bool ->+                                  (Maybe Bool) ->+                                  Bool ->+                                  Bool ->+                                  Bool ->+                                  Bool ->+                                  Bool ->+                                  Bool ->+                                  Bool ->+                                  Bool ->+                                  Bool ->+                                  Bool ->+                                  (Map Identifier (NontermIdent, [String])) ->+                                  ParamMap ->+                                  String ->+                                  Attributes ->+                                  ([Identifier]) ->+                                  (NontermIdent -> Int -> [String] -> Code.Type) ->+                                  String ->+                                  ( Bool,DeclBlocks,([String]),Decls,([Decl]),([Identifier]),(Seq Error),Exprs,([Decl]),([Type]),(Set String)))+data Inh_Sequence  = Inh_Sequence {allNts_Inh_Sequence :: !(Set NontermIdent),aroundMap_Inh_Sequence :: !(Set Identifier),children_Inh_Sequence :: !([(Identifier,Type,Bool)]),con_Inh_Sequence :: !(ConstructorIdent),declsAbove_Inh_Sequence :: !([Decl]),errors_Inh_Sequence :: !(Seq Error),higherOrderChildren_Inh_Sequence :: !([(Identifier,Type,Bool)]),inh_Inh_Sequence :: !(Attributes),instVisitNrs_Inh_Sequence :: !(Map Identifier Int),lastExpr_Inh_Sequence :: !(Expr),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_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),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),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]),errors_Syn_Sequence :: !(Seq Error),exprs_Syn_Sequence :: !(Exprs),tSigs_Syn_Sequence :: !([Decl]),tps_Syn_Sequence :: !([Type]),usedVars_Syn_Sequence :: !(Set String)}+wrap_Sequence :: T_Sequence  ->+                 Inh_Sequence  ->+                 Syn_Sequence +wrap_Sequence (T_Sequence sem ) (Inh_Sequence _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIerrors _lhsIhigherOrderChildren _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwhat )  =+    (let ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars) =+             (sem _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIerrors _lhsIhigherOrderChildren _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIwhat )+     in  (Syn_Sequence _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOerrors _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars ))+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+                   _lhsIerrors+                   _lhsIhigherOrderChildren+                   _lhsIinh+                   _lhsIinstVisitNrs+                   _lhsIlastExpr+                   _lhsInr+                   _lhsInt+                   _lhsIo_case+                   _lhsIo_cata+                   _lhsIo_costcentre+                   _lhsIo_data+                   _lhsIo_linePragmas+                   _lhsIo_newtypes+                   _lhsIo_pretty+                   _lhsIo_rename+                   _lhsIo_sem+                   _lhsIo_sig+                   _lhsIo_splitsems+                   _lhsIo_strictwrap+                   _lhsIo_traces+                   _lhsIo_unbox+                   _lhsIparamInstMap+                   _lhsIparamMap+                   _lhsIprefix+                   _lhsIsyn+                   _lhsIterminals+                   _lhsIunfoldSemDom+                   _lhsIwhat ->+                     (let _lhsOblockDecls :: DeclBlocks+                          _lhsOallTpsFound :: Bool+                          _lhsOcomments :: ([String])+                          _lhsOdecls :: Decls+                          _lhsOdefinedInsts :: ([Identifier])+                          _lhsOerrors :: (Seq Error)+                          _lhsOexprs :: Exprs+                          _lhsOtSigs :: ([Decl])+                          _lhsOtps :: ([Type])+                          _lhsOusedVars :: (Set String)+                          _lhsOdeclsAbove :: ([Decl])+                          _hdOallNts :: (Set NontermIdent)+                          _hdOaroundMap :: (Set Identifier)+                          _hdOchildren :: ([(Identifier,Type,Bool)])+                          _hdOcon :: ConstructorIdent+                          _hdOdeclsAbove :: ([Decl])+                          _hdOerrors :: (Seq Error)+                          _hdOhigherOrderChildren :: ([(Identifier,Type,Bool)])+                          _hdOinh :: Attributes+                          _hdOinstVisitNrs :: (Map Identifier Int)+                          _hdOnr :: Int+                          _hdOnt :: NontermIdent+                          _hdOo_case :: Bool+                          _hdOo_cata :: Bool+                          _hdOo_costcentre :: Bool+                          _hdOo_data :: (Maybe Bool)+                          _hdOo_linePragmas :: 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+                          _hdOparamInstMap :: (Map Identifier (NontermIdent, [String]))+                          _hdOparamMap :: ParamMap+                          _hdOprefix :: String+                          _hdOsyn :: Attributes+                          _hdOterminals :: ([Identifier])+                          _hdOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                          _hdOwhat :: String+                          _tlOallNts :: (Set NontermIdent)+                          _tlOaroundMap :: (Set Identifier)+                          _tlOchildren :: ([(Identifier,Type,Bool)])+                          _tlOcon :: ConstructorIdent+                          _tlOdeclsAbove :: ([Decl])+                          _tlOerrors :: (Seq Error)+                          _tlOhigherOrderChildren :: ([(Identifier,Type,Bool)])+                          _tlOinh :: Attributes+                          _tlOinstVisitNrs :: (Map Identifier Int)+                          _tlOlastExpr :: Expr+                          _tlOnr :: Int+                          _tlOnt :: NontermIdent+                          _tlOo_case :: Bool+                          _tlOo_cata :: Bool+                          _tlOo_costcentre :: Bool+                          _tlOo_data :: (Maybe Bool)+                          _tlOo_linePragmas :: 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+                          _tlOparamInstMap :: (Map Identifier (NontermIdent, [String]))+                          _tlOparamMap :: ParamMap+                          _tlOprefix :: String+                          _tlOsyn :: Attributes+                          _tlOterminals :: ([Identifier])+                          _tlOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type)+                          _tlOwhat :: String+                          _hdIallTpsFound :: Bool+                          _hdIbldBlocksFun :: (DeclBlocks -> DeclBlocks)+                          _hdIcomments :: ([String])+                          _hdIdecls :: Decls+                          _hdIdeclsAbove :: ([Decl])+                          _hdIdefinedInsts :: ([Identifier])+                          _hdIerrors :: (Seq Error)+                          _hdIexprs :: Exprs+                          _hdItSigs :: ([Decl])+                          _hdItps :: ([Type])+                          _hdIusedVars :: (Set String)+                          _tlIallTpsFound :: Bool+                          _tlIblockDecls :: DeclBlocks+                          _tlIcomments :: ([String])+                          _tlIdecls :: Decls+                          _tlIdeclsAbove :: ([Decl])+                          _tlIdefinedInsts :: ([Identifier])+                          _tlIerrors :: (Seq Error)+                          _tlIexprs :: Exprs+                          _tlItSigs :: ([Decl])+                          _tlItps :: ([Type])+                          _tlIusedVars :: (Set String)+                          -- "GenerateCode.ag"(line 505, column 7)+                          _lhsOblockDecls =+                              {-# LINE 505 "GenerateCode.ag" #-}+                              _hdIbldBlocksFun _tlIblockDecls+                              {-# LINE 6343 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 357, column 39)+                          _lhsOallTpsFound =+                              {-# LINE 357 "GenerateCode.ag" #-}+                              _hdIallTpsFound && _tlIallTpsFound+                              {-# LINE 6348 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 767, column 52)+                          _lhsOcomments =+                              {-# LINE 767 "GenerateCode.ag" #-}+                              _hdIcomments ++ _tlIcomments+                              {-# LINE 6353 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 138, column 34)+                          _lhsOdecls =+                              {-# LINE 138 "GenerateCode.ag" #-}+                              _hdIdecls ++ _tlIdecls+                              {-# LINE 6358 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 208, column 55)+                          _lhsOdefinedInsts =+                              {-# LINE 208 "GenerateCode.ag" #-}+                              _hdIdefinedInsts ++ _tlIdefinedInsts+                              {-# LINE 6363 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 748, column 32)+                          _lhsOerrors =+                              {-# LINE 748 "GenerateCode.ag" #-}+                              _hdIerrors Seq.>< _tlIerrors+                              {-# LINE 6368 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 281, column 34)+                          _lhsOexprs =+                              {-# LINE 281 "GenerateCode.ag" #-}+                              _hdIexprs ++ _tlIexprs+                              {-# LINE 6373 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 310, column 33)+                          _lhsOtSigs =+                              {-# LINE 310 "GenerateCode.ag" #-}+                              _hdItSigs ++ _tlItSigs+                              {-# LINE 6378 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 356, column 31)+                          _lhsOtps =+                              {-# LINE 356 "GenerateCode.ag" #-}+                              _hdItps ++ _tlItps+                              {-# LINE 6383 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 299, column 37)+                          _lhsOusedVars =+                              {-# LINE 299 "GenerateCode.ag" #-}+                              _hdIusedVars `Set.union` _tlIusedVars+                              {-# LINE 6388 "GenerateCode.hs" #-}+                          -- copy rule (up)+                          _lhsOdeclsAbove =+                              {-# LINE 491 "GenerateCode.ag" #-}+                              _tlIdeclsAbove+                              {-# LINE 6393 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOallNts =+                              {-# LINE 120 "GenerateCode.ag" #-}+                              _lhsIallNts+                              {-# LINE 6398 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOaroundMap =+                              {-# LINE 479 "GenerateCode.ag" #-}+                              _lhsIaroundMap+                              {-# LINE 6403 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOchildren =+                              {-# LINE 351 "GenerateCode.ag" #-}+                              _lhsIchildren+                              {-# LINE 6408 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOcon =+                              {-# LINE 82 "GenerateCode.ag" #-}+                              _lhsIcon+                              {-# LINE 6413 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOdeclsAbove =+                              {-# LINE 491 "GenerateCode.ag" #-}+                              _lhsIdeclsAbove+                              {-# LINE 6418 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOerrors =+                              {-# LINE 748 "GenerateCode.ag" #-}+                              _lhsIerrors+                              {-# LINE 6423 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOhigherOrderChildren =+                              {-# LINE 206 "GenerateCode.ag" #-}+                              _lhsIhigherOrderChildren+                              {-# LINE 6428 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOinh =+                              {-# LINE 77 "GenerateCode.ag" #-}+                              _lhsIinh+                              {-# LINE 6433 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOinstVisitNrs =+                              {-# LINE 459 "GenerateCode.ag" #-}+                              _lhsIinstVisitNrs+                              {-# LINE 6438 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOnr =+                              {-# LINE 225 "GenerateCode.ag" #-}+                              _lhsInr+                              {-# LINE 6443 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOnt =+                              {-# LINE 77 "GenerateCode.ag" #-}+                              _lhsInt+                              {-# LINE 6448 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_case =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_case+                              {-# LINE 6453 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_cata =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_cata+                              {-# LINE 6458 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_costcentre =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_costcentre+                              {-# LINE 6463 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_data =+                              {-# LINE 46 "GenerateCode.ag" #-}+                              _lhsIo_data+                              {-# LINE 6468 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_linePragmas =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_linePragmas+                              {-# LINE 6473 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_newtypes =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_newtypes+                              {-# LINE 6478 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_pretty =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_pretty+                              {-# LINE 6483 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_rename =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_rename+                              {-# LINE 6488 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_sem =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_sem+                              {-# LINE 6493 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_sig =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_sig+                              {-# LINE 6498 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_splitsems =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_splitsems+                              {-# LINE 6503 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_strictwrap =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_strictwrap+                              {-# LINE 6508 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_traces =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_traces+                              {-# LINE 6513 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOo_unbox =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_unbox+                              {-# LINE 6518 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOparamInstMap =+                              {-# LINE 94 "GenerateCode.ag" #-}+                              _lhsIparamInstMap+                              {-# LINE 6523 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOparamMap =+                              {-# LINE 88 "GenerateCode.ag" #-}+                              _lhsIparamMap+                              {-# LINE 6528 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOprefix =+                              {-# LINE 47 "GenerateCode.ag" #-}+                              _lhsIprefix+                              {-# LINE 6533 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOsyn =+                              {-# LINE 77 "GenerateCode.ag" #-}+                              _lhsIsyn+                              {-# LINE 6538 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOterminals =+                              {-# LINE 83 "GenerateCode.ag" #-}+                              _lhsIterminals+                              {-# LINE 6543 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOunfoldSemDom =+                              {-# LINE 646 "GenerateCode.ag" #-}+                              _lhsIunfoldSemDom+                              {-# LINE 6548 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _hdOwhat =+                              {-# LINE 769 "GenerateCode.ag" #-}+                              _lhsIwhat+                              {-# LINE 6553 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOallNts =+                              {-# LINE 120 "GenerateCode.ag" #-}+                              _lhsIallNts+                              {-# LINE 6558 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOaroundMap =+                              {-# LINE 479 "GenerateCode.ag" #-}+                              _lhsIaroundMap+                              {-# LINE 6563 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOchildren =+                              {-# LINE 351 "GenerateCode.ag" #-}+                              _lhsIchildren+                              {-# LINE 6568 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOcon =+                              {-# LINE 82 "GenerateCode.ag" #-}+                              _lhsIcon+                              {-# LINE 6573 "GenerateCode.hs" #-}+                          -- copy rule (chain)+                          _tlOdeclsAbove =+                              {-# LINE 491 "GenerateCode.ag" #-}+                              _hdIdeclsAbove+                              {-# LINE 6578 "GenerateCode.hs" #-}+                          -- copy rule (chain)+                          _tlOerrors =+                              {-# LINE 748 "GenerateCode.ag" #-}+                              _hdIerrors+                              {-# LINE 6583 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOhigherOrderChildren =+                              {-# LINE 206 "GenerateCode.ag" #-}+                              _lhsIhigherOrderChildren+                              {-# LINE 6588 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOinh =+                              {-# LINE 77 "GenerateCode.ag" #-}+                              _lhsIinh+                              {-# LINE 6593 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOinstVisitNrs =+                              {-# LINE 459 "GenerateCode.ag" #-}+                              _lhsIinstVisitNrs+                              {-# LINE 6598 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOlastExpr =+                              {-# LINE 489 "GenerateCode.ag" #-}+                              _lhsIlastExpr+                              {-# LINE 6603 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOnr =+                              {-# LINE 225 "GenerateCode.ag" #-}+                              _lhsInr+                              {-# LINE 6608 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOnt =+                              {-# LINE 77 "GenerateCode.ag" #-}+                              _lhsInt+                              {-# LINE 6613 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_case =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_case+                              {-# LINE 6618 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_cata =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_cata+                              {-# LINE 6623 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_costcentre =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_costcentre+                              {-# LINE 6628 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_data =+                              {-# LINE 46 "GenerateCode.ag" #-}+                              _lhsIo_data+                              {-# LINE 6633 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_linePragmas =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_linePragmas+                              {-# LINE 6638 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_newtypes =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_newtypes+                              {-# LINE 6643 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_pretty =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_pretty+                              {-# LINE 6648 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_rename =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_rename+                              {-# LINE 6653 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_sem =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_sem+                              {-# LINE 6658 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_sig =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_sig+                              {-# LINE 6663 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_splitsems =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_splitsems+                              {-# LINE 6668 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_strictwrap =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_strictwrap+                              {-# LINE 6673 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_traces =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_traces+                              {-# LINE 6678 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOo_unbox =+                              {-# LINE 45 "GenerateCode.ag" #-}+                              _lhsIo_unbox+                              {-# LINE 6683 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOparamInstMap =+                              {-# LINE 94 "GenerateCode.ag" #-}+                              _lhsIparamInstMap+                              {-# LINE 6688 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOparamMap =+                              {-# LINE 88 "GenerateCode.ag" #-}+                              _lhsIparamMap+                              {-# LINE 6693 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOprefix =+                              {-# LINE 47 "GenerateCode.ag" #-}+                              _lhsIprefix+                              {-# LINE 6698 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOsyn =+                              {-# LINE 77 "GenerateCode.ag" #-}+                              _lhsIsyn+                              {-# LINE 6703 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOterminals =+                              {-# LINE 83 "GenerateCode.ag" #-}+                              _lhsIterminals+                              {-# LINE 6708 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOunfoldSemDom =+                              {-# LINE 646 "GenerateCode.ag" #-}+                              _lhsIunfoldSemDom+                              {-# LINE 6713 "GenerateCode.hs" #-}+                          -- copy rule (down)+                          _tlOwhat =+                              {-# LINE 769 "GenerateCode.ag" #-}+                              _lhsIwhat+                              {-# LINE 6718 "GenerateCode.hs" #-}+                          ( _hdIallTpsFound,_hdIbldBlocksFun,_hdIcomments,_hdIdecls,_hdIdeclsAbove,_hdIdefinedInsts,_hdIerrors,_hdIexprs,_hdItSigs,_hdItps,_hdIusedVars) =+                              (hd_ _hdOallNts _hdOaroundMap _hdOchildren _hdOcon _hdOdeclsAbove _hdOerrors _hdOhigherOrderChildren _hdOinh _hdOinstVisitNrs _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOparamInstMap _hdOparamMap _hdOprefix _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOwhat )+                          ( _tlIallTpsFound,_tlIblockDecls,_tlIcomments,_tlIdecls,_tlIdeclsAbove,_tlIdefinedInsts,_tlIerrors,_tlIexprs,_tlItSigs,_tlItps,_tlIusedVars) =+                              (tl_ _tlOallNts _tlOaroundMap _tlOchildren _tlOcon _tlOdeclsAbove _tlOerrors _tlOhigherOrderChildren _tlOinh _tlOinstVisitNrs _tlOlastExpr _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOparamInstMap _tlOparamMap _tlOprefix _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOwhat )+                      in  ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars))) )+sem_Sequence_Nil :: T_Sequence +sem_Sequence_Nil  =+    (T_Sequence (\ _lhsIallNts+                   _lhsIaroundMap+                   _lhsIchildren+                   _lhsIcon+                   _lhsIdeclsAbove+                   _lhsIerrors+                   _lhsIhigherOrderChildren+                   _lhsIinh+                   _lhsIinstVisitNrs+                   _lhsIlastExpr+                   _lhsInr+                   _lhsInt+                   _lhsIo_case+                   _lhsIo_cata+                   _lhsIo_costcentre+                   _lhsIo_data+                   _lhsIo_linePragmas+                   _lhsIo_newtypes+                   _lhsIo_pretty+                   _lhsIo_rename+                   _lhsIo_sem+                   _lhsIo_sig+                   _lhsIo_splitsems+                   _lhsIo_strictwrap+                   _lhsIo_traces+                   _lhsIo_unbox+                   _lhsIparamInstMap+                   _lhsIparamMap+                   _lhsIprefix+                   _lhsIsyn+                   _lhsIterminals+                   _lhsIunfoldSemDom+                   _lhsIwhat ->+                     (let _lhsOblockDecls :: DeclBlocks+                          _lhsOallTpsFound :: Bool+                          _lhsOcomments :: ([String])+                          _lhsOdecls :: Decls+                          _lhsOdefinedInsts :: ([Identifier])+                          _lhsOerrors :: (Seq Error)+                          _lhsOexprs :: Exprs+                          _lhsOtSigs :: ([Decl])+                          _lhsOtps :: ([Type])+                          _lhsOusedVars :: (Set String)+                          _lhsOdeclsAbove :: ([Decl])+                          -- "GenerateCode.ag"(line 507, column 7)+                          _lhsOblockDecls =+                              {-# LINE 507 "GenerateCode.ag" #-}+                              DeclTerminator _lhsIdeclsAbove _lhsIlastExpr+                              {-# LINE 6774 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 357, column 39)+                          _lhsOallTpsFound =+                              {-# LINE 357 "GenerateCode.ag" #-}+                              True+                              {-# LINE 6779 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 767, column 52)+                          _lhsOcomments =+                              {-# LINE 767 "GenerateCode.ag" #-}+                              []+                              {-# LINE 6784 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 138, column 34)+                          _lhsOdecls =+                              {-# LINE 138 "GenerateCode.ag" #-}+                              []+                              {-# LINE 6789 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 208, column 55)+                          _lhsOdefinedInsts =+                              {-# LINE 208 "GenerateCode.ag" #-}+                              []+                              {-# LINE 6794 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 748, column 32)+                          _lhsOerrors =+                              {-# LINE 748 "GenerateCode.ag" #-}+                              Seq.empty+                              {-# LINE 6799 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 281, column 34)+                          _lhsOexprs =+                              {-# LINE 281 "GenerateCode.ag" #-}+                              []+                              {-# LINE 6804 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 310, column 33)+                          _lhsOtSigs =+                              {-# LINE 310 "GenerateCode.ag" #-}+                              []+                              {-# LINE 6809 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 356, column 31)+                          _lhsOtps =+                              {-# LINE 356 "GenerateCode.ag" #-}+                              []+                              {-# LINE 6814 "GenerateCode.hs" #-}+                          -- use rule "GenerateCode.ag"(line 299, column 37)+                          _lhsOusedVars =+                              {-# LINE 299 "GenerateCode.ag" #-}+                              Set.empty+                              {-# LINE 6819 "GenerateCode.hs" #-}+                          -- copy rule (chain)+                          _lhsOdeclsAbove =+                              {-# LINE 491 "GenerateCode.ag" #-}+                              _lhsIdeclsAbove+                              {-# LINE 6824 "GenerateCode.hs" #-}                       in  ( _lhsOallTpsFound,_lhsOblockDecls,_lhsOcomments,_lhsOdecls,_lhsOdeclsAbove,_lhsOdefinedInsts,_lhsOerrors,_lhsOexprs,_lhsOtSigs,_lhsOtps,_lhsOusedVars))) )
src-derived/HsToken.hs view
@@ -2,9 +2,11 @@  -- UUAGC 0.9.14 (HsToken.ag) module HsToken where+{-# LINE 2 "HsToken.ag" #-}  import CommonTypes import UU.Scanner.Position(Pos)+{-# LINE 10 "../src-derived/HsToken.hs" #-} -- HsToken ----------------------------------------------------- {-    alternatives:
src-derived/Interfaces.hs view
@@ -2,9 +2,11 @@  -- UUAGC 0.9.14 (Interfaces.ag) module Interfaces where+{-# LINE 2 "Interfaces.ag" #-}  import CommonTypes import SequentialTypes+{-# LINE 10 "../src-derived/Interfaces.hs" #-} -- IRoot ------------------------------------------------------- {-    alternatives:
src-derived/InterfacesRules.hs view
@@ -2,6 +2,7 @@  -- UUAGC 0.9.14 (InterfacesRules.lag) module InterfacesRules where+{-# LINE 10 "InterfacesRules.lag" #-}  import Interfaces import SequentialTypes@@ -22,18 +23,26 @@ 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@@ -42,22 +51,32 @@                               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@@ -66,6 +85,7 @@             (seg:remain) = drop n segs             CSegment inh syn = seg                        last = null remain+{-# LINE 89 "../src-derived/InterfacesRules.hs" #-} -- IRoot ------------------------------------------------------- {-    visit 0:@@ -110,40 +130,66 @@     (T_IRoot (\ (!_lhsIdpr)                 (!_lhsIinfo)                 (!_lhsItdp) ->-                  (case (_lhsIinfo) of+                  (case ({-# LINE 83 "InterfacesRules.lag" #-}+                         _lhsIinfo+                         {-# LINE 136 "InterfacesRules.hs" #-}) of                    { !_intersOinfo ->-                   (case (snd (bounds _lhsItdp) + 1) of+                   (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 (let terminals = [ v | (v,cr) <- assocs (ruleTable _lhsIinfo), not (getHasCode cr), isLocal cr ]-                            in _intersIfirstvisitvertices ++ terminals) of+                     (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 (toList _intersInewedges) of+                      (case ({-# LINE 71 "InterfacesRules.lag" #-}+                             toList _intersInewedges+                             {-# LINE 151 "InterfacesRules.hs" #-}) of                        { !_newedges ->-                       (case (let graph = buildG (0,_intersIv-1) es+                       (case ({-# LINE 72 "InterfacesRules.lag" #-}+                              let graph = buildG (0,_intersIv-1) es                                   es = _newedges ++ edges _lhsItdp-                              in transposeG graph) of+                              in transposeG graph+                              {-# LINE 157 "InterfacesRules.hs" #-}) of                         { !_visitssGraph ->-                        (case (_visitssGraph) of+                        (case ({-# LINE 218 "InterfacesRules.lag" #-}+                               _visitssGraph+                               {-# LINE 161 "InterfacesRules.hs" #-}) of                          { !_intersOvssGraph ->-                         (case (toList _intersIdescr) of+                         (case ({-# LINE 147 "InterfacesRules.lag" #-}+                                toList _intersIdescr+                                {-# LINE 165 "InterfacesRules.hs" #-}) of                           { !_descr ->-                          (case (Map.fromList _descr) of+                          (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 (_intersIinters) of+                            (case ({-# LINE 380 "InterfacesRules.lag" #-}+                                   _intersIinters+                                   {-# LINE 175 "InterfacesRules.hs" #-}) of                              { !_intersOallInters ->-                             (case (buildG (0,_intersIv-1) (map swap (_lhsIdpr ++ _newedges))) of+                             (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 (toList _intersIedp) of+                               (case ({-# LINE 442 "InterfacesRules.lag" #-}+                                      toList _intersIedp+                                      {-# LINE 185 "InterfacesRules.hs" #-}) of                                 { !_lhsOedp ->-                                (case (_intersIinters) of+                                (case ({-# LINE 382 "InterfacesRules.lag" #-}+                                       _intersIinters+                                       {-# LINE 189 "InterfacesRules.hs" #-}) of                                  { !_lhsOinters ->-                                 (case (_intersIvisits) of+                                 (case ({-# LINE 383 "InterfacesRules.lag" #-}+                                        _intersIvisits+                                        {-# LINE 193 "InterfacesRules.hs" #-}) of                                   { !_lhsOvisits ->                                   ( _lhsOedp,_lhsOinters,_lhsOvisits) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) ) -- Interface ---------------------------------------------------@@ -220,31 +266,55 @@ sem_Interface_Interface !nt_ !cons_ !(T_Segments seg_ )  =     (T_Interface (\ (!_lhsIinfo)                     (!_lhsIv) ->-                      (case (_lhsIinfo) of+                      (case ({-# LINE 83 "InterfacesRules.lag" #-}+                             _lhsIinfo+                             {-# LINE 272 "InterfacesRules.hs" #-}) of                        { !_segOinfo ->-                       (case (0) of+                       (case ({-# LINE 205 "InterfacesRules.lag" #-}+                              0+                              {-# LINE 276 "InterfacesRules.hs" #-}) of                         { !_segOn ->-                        (case (\a -> ruleTable _lhsIinfo ! a) of+                        (case ({-# LINE 195 "InterfacesRules.lag" #-}+                               \a -> ruleTable _lhsIinfo ! a+                               {-# LINE 280 "InterfacesRules.hs" #-}) of                          { !_look ->-                         (case (_lhsIv) of+                         (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 (_segIv + length _segInewvertices) of+                           (case ({-# LINE 188 "InterfacesRules.lag" #-}+                                  _segIv + length _segInewvertices+                                  {-# LINE 290 "InterfacesRules.hs" #-}) of                             { !_v ->-                            (case ([_segIv .. _v-1]) of+                            (case ({-# LINE 190 "InterfacesRules.lag" #-}+                                   [_segIv .. _v-1]+                                   {-# LINE 294 "InterfacesRules.hs" #-}) of                              { !_firstvisitvertices ->-                             (case (zipWith (cv _look (-1)) _firstvisitvertices _segIgroups) of+                             (case ({-# LINE 196 "InterfacesRules.lag" #-}+                                    zipWith (cv _look (-1)) _firstvisitvertices _segIgroups+                                    {-# LINE 298 "InterfacesRules.hs" #-}) of                               { !_descr ->-                              (case (_segIdescr Seq.>< Seq.fromList _descr) of+                              (case ({-# LINE 197 "InterfacesRules.lag" #-}+                                     _segIdescr Seq.>< Seq.fromList _descr+                                     {-# LINE 302 "InterfacesRules.hs" #-}) of                                { !_lhsOdescr ->-                               (case (_firstvisitvertices) of+                               (case ({-# LINE 258 "InterfacesRules.lag" #-}+                                      _firstvisitvertices+                                      {-# LINE 306 "InterfacesRules.hs" #-}) of                                 { !_lhsOfirstvisitvertices ->-                                (case (zip _firstvisitvertices _segInewvertices) of+                                (case ({-# LINE 191 "InterfacesRules.lag" #-}+                                       zip _firstvisitvertices _segInewvertices+                                       {-# LINE 310 "InterfacesRules.hs" #-}) of                                  { !_newedges ->-                                 (case (_segInewedges Seq.>< Seq.fromList _newedges) of+                                 (case ({-# LINE 192 "InterfacesRules.lag" #-}+                                        _segInewedges Seq.>< Seq.fromList _newedges+                                        {-# LINE 314 "InterfacesRules.hs" #-}) of                                   { !_lhsOnewedges ->-                                  (case (_v) of+                                  (case ({-# LINE 189 "InterfacesRules.lag" #-}+                                         _v+                                         {-# LINE 318 "InterfacesRules.hs" #-}) of                                    { !_lhsOv ->                                    (case ((sem_Interface_Interface_1 cons_ (T_Segments_1 seg_1 ) nt_ )) of                                     { ( !sem_Interface_1) ->@@ -257,19 +327,31 @@     (T_Interface_1 (\ (!_lhsIprev)                       (!_lhsIvisitDescr)                       (!_lhsIvssGraph) ->-                        (case (_lhsIvssGraph) of+                        (case ({-# LINE 216 "InterfacesRules.lag" #-}+                               _lhsIvssGraph+                               {-# LINE 333 "InterfacesRules.hs" #-}) of                          { !_segOvssGraph ->-                         (case (_lhsIvisitDescr) of+                         (case ({-# LINE 125 "InterfacesRules.lag" #-}+                                _lhsIvisitDescr+                                {-# LINE 337 "InterfacesRules.hs" #-}) of                           { !_segOvisitDescr ->-                          (case (_lhsIprev) of+                          (case ({-# LINE 263 "InterfacesRules.lag" #-}+                                 _lhsIprev+                                 {-# LINE 341 "InterfacesRules.hs" #-}) of                            { !_segOprev ->-                           (case (cons_) of+                           (case ({-# LINE 237 "InterfacesRules.lag" #-}+                                  cons_+                                  {-# LINE 345 "InterfacesRules.hs" #-}) of                             { !_segOcons ->                             (case ((seg_1 _segOcons _segOprev _segOvisitDescr _segOvssGraph )) of                              { ( !_segIsegs,!T_Segments_2 seg_2) ->-                             (case (CInterface _segIsegs) of+                             (case ({-# LINE 395 "InterfacesRules.lag" #-}+                                    CInterface _segIsegs+                                    {-# LINE 351 "InterfacesRules.hs" #-}) of                               { !_lhsOinter ->-                              (case (nt_) of+                              (case ({-# LINE 391 "InterfacesRules.lag" #-}+                                     nt_+                                     {-# LINE 355 "InterfacesRules.hs" #-}) of                                { !_lhsOnt ->                                (case ((sem_Interface_Interface_2 _lhsIprev (T_Segments_2 seg_2 ) cons_ )) of                                 { ( !sem_Interface_2) ->@@ -281,19 +363,31 @@ sem_Interface_Interface_2 !_lhsIprev !(T_Segments_2 seg_2 ) !cons_  =     (T_Interface_2 (\ (!_lhsIallInters)                       (!_lhsIddp) ->-                        (case (_lhsIddp) of+                        (case ({-# LINE 341 "InterfacesRules.lag" #-}+                               _lhsIddp+                               {-# LINE 369 "InterfacesRules.hs" #-}) of                          { !_segOddp ->-                         (case (_lhsIallInters) of+                         (case ({-# LINE 378 "InterfacesRules.lag" #-}+                                _lhsIallInters+                                {-# LINE 373 "InterfacesRules.hs" #-}) of                           { !_segOallInters ->-                          (case (_lhsIprev) of+                          (case ({-# LINE 351 "InterfacesRules.lag" #-}+                                 _lhsIprev+                                 {-# LINE 377 "InterfacesRules.hs" #-}) of                            { !_segOfromLhs ->-                           (case (True) of+                           (case ({-# LINE 314 "InterfacesRules.lag" #-}+                                  True+                                  {-# LINE 381 "InterfacesRules.hs" #-}) of                             { !_segOisFirst ->                             (case ((seg_2 _segOallInters _segOddp _segOfromLhs _segOisFirst )) of                              { ( !_segIcvisits,!_segIedp,!_segIfirstInh,!_segIhdIntravisits,!_segIprev) ->-                             (case (_segIedp) of+                             (case ({-# LINE 437 "InterfacesRules.lag" #-}+                                    _segIedp+                                    {-# LINE 387 "InterfacesRules.hs" #-}) of                               { !_lhsOedp ->-                              (case (Map.fromList (zip cons_ (transpose _segIcvisits))) of+                              (case ({-# LINE 396 "InterfacesRules.lag" #-}+                                     Map.fromList (zip cons_ (transpose _segIcvisits))+                                     {-# LINE 391 "InterfacesRules.hs" #-}) of                                { !_lhsOvisits ->                                ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) })) ) -- Interfaces --------------------------------------------------@@ -362,25 +456,41 @@ sem_Interfaces_Cons !(T_Interface hd_ ) !(T_Interfaces tl_ )  =     (T_Interfaces (\ (!_lhsIinfo)                      (!_lhsIv) ->-                       (case (_lhsIv) of+                       (case ({-# LINE 82 "InterfacesRules.lag" #-}+                              _lhsIv+                              {-# LINE 462 "InterfacesRules.hs" #-}) of                         { !_hdOv ->-                        (case (_lhsIinfo) of+                        (case ({-# LINE 83 "InterfacesRules.lag" #-}+                               _lhsIinfo+                               {-# LINE 466 "InterfacesRules.hs" #-}) of                          { !_hdOinfo ->                          (case ((hd_ _hdOinfo _hdOv )) of                           { ( !_hdIdescr,!_hdIfirstvisitvertices,!_hdInewedges,!_hdIv,!T_Interface_1 hd_1) ->-                          (case (_hdIv) of+                          (case ({-# LINE 82 "InterfacesRules.lag" #-}+                                 _hdIv+                                 {-# LINE 472 "InterfacesRules.hs" #-}) of                            { !_tlOv ->-                           (case (_lhsIinfo) of+                           (case ({-# LINE 83 "InterfacesRules.lag" #-}+                                  _lhsIinfo+                                  {-# LINE 476 "InterfacesRules.hs" #-}) of                             { !_tlOinfo ->                             (case ((tl_ _tlOinfo _tlOv )) of                              { ( !_tlIdescr,!_tlIfirstvisitvertices,!_tlInewedges,!_tlIv,!T_Interfaces_1 tl_1) ->-                             (case (_hdIdescr Seq.>< _tlIdescr) of+                             (case ({-# LINE 130 "InterfacesRules.lag" #-}+                                    _hdIdescr Seq.>< _tlIdescr+                                    {-# LINE 482 "InterfacesRules.hs" #-}) of                               { !_lhsOdescr ->-                              (case (_hdIfirstvisitvertices ++ _tlIfirstvisitvertices) of+                              (case ({-# LINE 258 "InterfacesRules.lag" #-}+                                     _hdIfirstvisitvertices ++ _tlIfirstvisitvertices+                                     {-# LINE 486 "InterfacesRules.hs" #-}) of                                { !_lhsOfirstvisitvertices ->-                               (case (_hdInewedges Seq.>< _tlInewedges) of+                               (case ({-# LINE 129 "InterfacesRules.lag" #-}+                                      _hdInewedges Seq.>< _tlInewedges+                                      {-# LINE 490 "InterfacesRules.hs" #-}) of                                 { !_lhsOnewedges ->-                                (case (_tlIv) of+                                (case ({-# LINE 82 "InterfacesRules.lag" #-}+                                       _tlIv+                                       {-# LINE 494 "InterfacesRules.hs" #-}) of                                  { !_lhsOv ->                                  (case ((sem_Interfaces_Cons_1 (T_Interfaces_1 tl_1 ) (T_Interface_1 hd_1 ) )) of                                   { ( !sem_Interfaces_1) ->@@ -392,23 +502,37 @@     (T_Interfaces_1 (\ (!_lhsIprev)                        (!_lhsIvisitDescr)                        (!_lhsIvssGraph) ->-                         (case (_lhsIvssGraph) of+                         (case ({-# LINE 216 "InterfacesRules.lag" #-}+                                _lhsIvssGraph+                                {-# LINE 508 "InterfacesRules.hs" #-}) of                           { !_tlOvssGraph ->-                          (case (_lhsIvisitDescr) of+                          (case ({-# LINE 125 "InterfacesRules.lag" #-}+                                 _lhsIvisitDescr+                                 {-# LINE 512 "InterfacesRules.hs" #-}) of                            { !_tlOvisitDescr ->-                           (case (_lhsIprev) of+                           (case ({-# LINE 258 "InterfacesRules.lag" #-}+                                  _lhsIprev+                                  {-# LINE 516 "InterfacesRules.hs" #-}) of                             { !_tlOprev ->-                            (case (_lhsIvssGraph) of+                            (case ({-# LINE 216 "InterfacesRules.lag" #-}+                                   _lhsIvssGraph+                                   {-# LINE 520 "InterfacesRules.hs" #-}) of                              { !_hdOvssGraph ->-                             (case (_lhsIvisitDescr) of+                             (case ({-# LINE 125 "InterfacesRules.lag" #-}+                                    _lhsIvisitDescr+                                    {-# LINE 524 "InterfacesRules.hs" #-}) of                               { !_hdOvisitDescr ->-                              (case (_lhsIprev) of+                              (case ({-# LINE 258 "InterfacesRules.lag" #-}+                                     _lhsIprev+                                     {-# LINE 528 "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 (Map.insert _hdInt _hdIinter _tlIinters) of+                                 (case ({-# LINE 385 "InterfacesRules.lag" #-}+                                        Map.insert _hdInt _hdIinter _tlIinters+                                        {-# LINE 536 "InterfacesRules.hs" #-}) of                                   { !_lhsOinters ->                                   (case ((sem_Interfaces_Cons_2 (T_Interfaces_2 tl_2 ) (T_Interface_2 hd_2 ) _hdInt )) of                                    { ( !sem_Interfaces_2) ->@@ -420,34 +544,54 @@ sem_Interfaces_Cons_2 !(T_Interfaces_2 tl_2 ) !(T_Interface_2 hd_2 ) !_hdInt  =     (T_Interfaces_2 (\ (!_lhsIallInters)                        (!_lhsIddp) ->-                         (case (_lhsIddp) of+                         (case ({-# LINE 341 "InterfacesRules.lag" #-}+                                _lhsIddp+                                {-# LINE 550 "InterfacesRules.hs" #-}) of                           { !_tlOddp ->-                          (case (_lhsIallInters) of+                          (case ({-# LINE 378 "InterfacesRules.lag" #-}+                                 _lhsIallInters+                                 {-# LINE 554 "InterfacesRules.hs" #-}) of                            { !_tlOallInters ->                            (case ((tl_2 _tlOallInters _tlOddp )) of                             { ( !_tlIedp,!_tlIvisits) ->-                            (case (_lhsIddp) of+                            (case ({-# LINE 341 "InterfacesRules.lag" #-}+                                   _lhsIddp+                                   {-# LINE 560 "InterfacesRules.hs" #-}) of                              { !_hdOddp ->-                             (case (_lhsIallInters) of+                             (case ({-# LINE 378 "InterfacesRules.lag" #-}+                                    _lhsIallInters+                                    {-# LINE 564 "InterfacesRules.hs" #-}) of                               { !_hdOallInters ->                               (case ((hd_2 _hdOallInters _hdOddp )) of                                { ( !_hdIedp,!_hdIvisits) ->-                               (case (_hdIedp Seq.>< _tlIedp) of+                               (case ({-# LINE 437 "InterfacesRules.lag" #-}+                                      _hdIedp Seq.>< _tlIedp+                                      {-# LINE 570 "InterfacesRules.hs" #-}) of                                 { !_lhsOedp ->-                                (case (Map.insert _hdInt _hdIvisits _tlIvisits) of+                                (case ({-# LINE 386 "InterfacesRules.lag" #-}+                                       Map.insert _hdInt _hdIvisits _tlIvisits+                                       {-# LINE 574 "InterfacesRules.hs" #-}) of                                  { !_lhsOvisits ->                                  ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) }) })) ) sem_Interfaces_Nil :: T_Interfaces  sem_Interfaces_Nil  =     (T_Interfaces (\ (!_lhsIinfo)                      (!_lhsIv) ->-                       (case (Seq.empty) of+                       (case ({-# LINE 130 "InterfacesRules.lag" #-}+                              Seq.empty+                              {-# LINE 583 "InterfacesRules.hs" #-}) of                         { !_lhsOdescr ->-                        (case ([]) of+                        (case ({-# LINE 258 "InterfacesRules.lag" #-}+                               []+                               {-# LINE 587 "InterfacesRules.hs" #-}) of                          { !_lhsOfirstvisitvertices ->-                         (case (Seq.empty) of+                         (case ({-# LINE 129 "InterfacesRules.lag" #-}+                                Seq.empty+                                {-# LINE 591 "InterfacesRules.hs" #-}) of                           { !_lhsOnewedges ->-                          (case (_lhsIv) of+                          (case ({-# LINE 82 "InterfacesRules.lag" #-}+                                 _lhsIv+                                 {-# LINE 595 "InterfacesRules.hs" #-}) of                            { !_lhsOv ->                            (case ((sem_Interfaces_Nil_1 )) of                             { ( !sem_Interfaces_1) ->@@ -457,7 +601,9 @@     (T_Interfaces_1 (\ (!_lhsIprev)                        (!_lhsIvisitDescr)                        (!_lhsIvssGraph) ->-                         (case (Map.empty) of+                         (case ({-# LINE 387 "InterfacesRules.lag" #-}+                                Map.empty+                                {-# LINE 607 "InterfacesRules.hs" #-}) of                           { !_lhsOinters ->                           (case ((sem_Interfaces_Nil_2 )) of                            { ( !sem_Interfaces_2) ->@@ -466,9 +612,13 @@ sem_Interfaces_Nil_2  =     (T_Interfaces_2 (\ (!_lhsIallInters)                        (!_lhsIddp) ->-                         (case (Seq.empty) of+                         (case ({-# LINE 437 "InterfacesRules.lag" #-}+                                Seq.empty+                                {-# LINE 618 "InterfacesRules.hs" #-}) of                           { !_lhsOedp ->-                          (case (Map.empty) of+                          (case ({-# LINE 388 "InterfacesRules.lag" #-}+                                 Map.empty+                                 {-# LINE 622 "InterfacesRules.hs" #-}) of                            { !_lhsOvisits ->                            ( _lhsOedp,_lhsOvisits) }) })) ) -- Segment -----------------------------------------------------@@ -592,18 +742,28 @@ sem_Segment_Segment !inh_ !syn_  =     (T_Segment (\ (!_lhsIinfo)                   (!_lhsIv) ->-                    (case (\a -> ruleTable _lhsIinfo ! a) of+                    (case ({-# LINE 106 "InterfacesRules.lag" #-}+                           \a -> ruleTable _lhsIinfo ! a+                           {-# LINE 748 "InterfacesRules.hs" #-}) of                      { !_look ->-                     (case (\p us -> [ a  |  u <- us+                     (case ({-# LINE 109 "InterfacesRules.lag" #-}+                            \p us -> [ a  |  u <- us                                           ,  a <- tdsToTdp _lhsIinfo ! u-                                          ,  p (_look a)]) of+                                          ,  p (_look a)]+                            {-# LINE 754 "InterfacesRules.hs" #-}) of                       { !_occurAs ->-                      (case (let group as = gather _lhsIinfo (_occurAs isRhs as)-                             in map (partition (isInh . _look)) (group (inh_ ++ syn_))) of+                      (case ({-# LINE 113 "InterfacesRules.lag" #-}+                             let group as = gather _lhsIinfo (_occurAs isRhs as)+                             in map (partition (isInh . _look)) (group (inh_ ++ syn_))+                             {-# LINE 759 "InterfacesRules.hs" #-}) of                        { !_groups ->-                       (case (_lhsIv + length _groups) of+                       (case ({-# LINE 116 "InterfacesRules.lag" #-}+                              _lhsIv + length _groups+                              {-# LINE 763 "InterfacesRules.hs" #-}) of                         { !_v ->-                        (case (_v) of+                        (case ({-# LINE 82 "InterfacesRules.lag" #-}+                               _v+                               {-# LINE 767 "InterfacesRules.hs" #-}) of                          { !_lhsOv ->                          (case ((sem_Segment_Segment_1 _v _lhsIv _groups _look syn_ _occurAs _lhsIinfo inh_ )) of                           { ( !sem_Segment_1) ->@@ -620,19 +780,33 @@ sem_Segment_Segment_1 !_v !_lhsIv !_groups !_look !syn_ !_occurAs !_lhsIinfo !inh_  =     (T_Segment_1 (\ (!_lhsIn)                     (!_lhsInextNewvertices) ->-                      (case ([_lhsIv .. _v    -1]) of+                      (case ({-# LINE 117 "InterfacesRules.lag" #-}+                             [_lhsIv .. _v    -1]+                             {-# LINE 786 "InterfacesRules.hs" #-}) of                        { !_newvertices ->-                       (case (Seq.fromList $ zipWith (cv _look _lhsIn) _newvertices _groups) of+                       (case ({-# LINE 132 "InterfacesRules.lag" #-}+                              Seq.fromList $ zipWith (cv _look _lhsIn) _newvertices _groups+                              {-# LINE 790 "InterfacesRules.hs" #-}) of                         { !_lhsOdescr ->-                        (case (_groups) of+                        (case ({-# LINE 182 "InterfacesRules.lag" #-}+                               _groups+                               {-# LINE 794 "InterfacesRules.hs" #-}) of                          { !_lhsOgroups ->-                         (case (zip _newvertices _lhsInextNewvertices) of+                         (case ({-# LINE 174 "InterfacesRules.lag" #-}+                                zip _newvertices _lhsInextNewvertices+                                {-# LINE 798 "InterfacesRules.hs" #-}) of                           { !_visitedges ->-                          (case (concat (zipWith ed _newvertices _groups)) of+                          (case ({-# LINE 155 "InterfacesRules.lag" #-}+                                 concat (zipWith ed _newvertices _groups)+                                 {-# LINE 802 "InterfacesRules.hs" #-}) of                            { !_attredges ->-                           (case (Seq.fromList _attredges Seq.>< Seq.fromList _visitedges) of+                           (case ({-# LINE 175 "InterfacesRules.lag" #-}+                                  Seq.fromList _attredges Seq.>< Seq.fromList _visitedges+                                  {-# LINE 806 "InterfacesRules.hs" #-}) of                             { !_lhsOnewedges ->-                            (case (_newvertices) of+                            (case ({-# LINE 166 "InterfacesRules.lag" #-}+                                   _newvertices+                                   {-# LINE 810 "InterfacesRules.hs" #-}) of                              { !_lhsOnewvertices ->                              (case ((sem_Segment_Segment_2 syn_ _occurAs _lhsIinfo inh_ )) of                               { ( !sem_Segment_2) ->@@ -647,17 +821,24 @@                     (!_lhsIprev)                     (!_lhsIvisitDescr)                     (!_lhsIvssGraph) ->-                      (case (gather _lhsIinfo (_occurAs isLhs syn_)) of+                      (case ({-# LINE 229 "InterfacesRules.lag" #-}+                             gather _lhsIinfo (_occurAs isLhs syn_)+                             {-# LINE 827 "InterfacesRules.hs" #-}) of                        { !_synOccur ->-                       (case (let hasCode v | inRange (bounds (ruleTable _lhsIinfo)) v =  getHasCode (ruleTable _lhsIinfo ! v)+                       (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) of+                                     else map (filter hasCode . topSort' _lhsIvssGraph) _synOccur+                              {-# LINE 835 "InterfacesRules.hs" #-}) of                         { !_vss ->-                        (case (map (\\ _lhsIprev) _vss) of+                        (case ({-# LINE 270 "InterfacesRules.lag" #-}+                               map (\\ _lhsIprev) _vss+                               {-# LINE 839 "InterfacesRules.hs" #-}) of                          { !_visitss' ->-                         (case (let  rem :: [(Identifier,Identifier,Maybe Type)] -> [Vertex] -> [Vertex]+                         (case ({-# LINE 284 "InterfacesRules.lag" #-}+                                let  rem :: [(Identifier,Identifier,Maybe Type)] -> [Vertex] -> [Vertex]                                      rem prev [] = []                                      rem prev (v:vs)                                        | inRange (bounds table) v@@ -672,24 +853,37 @@                                              in addV (rem (def ++ prev) vs)                                        | otherwise = v:rem prev vs                                      table = ruleTable _lhsIinfo-                                in map (rem []) _visitss') of+                                in map (rem []) _visitss'+                                {-# LINE 858 "InterfacesRules.hs" #-}) of                           { !_visitss ->-                          (case (let defines v = case Map.lookup v _lhsIvisitDescr of+                          (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) of+                                 in concatMap (concatMap defines) _visitss+                                 {-# LINE 865 "InterfacesRules.hs" #-}) of                            { !_defined ->-                           (case (_lhsIprev ++ _defined) of+                           (case ({-# LINE 275 "InterfacesRules.lag" #-}+                                  _lhsIprev ++ _defined+                                  {-# LINE 869 "InterfacesRules.hs" #-}) of                             { !_lhsOprev ->-                            (case (let makemap = Map.fromList . map findType+                            (case ({-# LINE 409 "InterfacesRules.lag" #-}+                                   let makemap = Map.fromList . map findType                                        findType v = getNtaNameType (attrTable _lhsIinfo ! v)-                                   in (makemap inh_,makemap syn_)) of+                                   in (makemap inh_,makemap syn_)+                                   {-# LINE 875 "InterfacesRules.hs" #-}) of                              { !__tup1 ->-                             (case (__tup1) of+                             (case ({-# LINE 409 "InterfacesRules.lag" #-}+                                    __tup1+                                    {-# LINE 879 "InterfacesRules.hs" #-}) of                               { !(_,!_synmap) ->-                              (case (__tup1) of+                              (case ({-# LINE 409 "InterfacesRules.lag" #-}+                                     __tup1+                                     {-# LINE 883 "InterfacesRules.hs" #-}) of                                { !(!_inhmap,_) ->-                               (case (if False then undefined _lhsIvssGraph _lhsIvisitDescr _lhsIprev else CSegment _inhmap _synmap) of+                               (case ({-# LINE 405 "InterfacesRules.lag" #-}+                                      if False then undefined _lhsIvssGraph _lhsIvisitDescr _lhsIprev else CSegment _inhmap _synmap+                                      {-# LINE 887 "InterfacesRules.hs" #-}) of                                 { !_lhsOseg ->                                 (case ((sem_Segment_Segment_3 _visitss _lhsIinfo _lhsIvisitDescr inh_ _occurAs _synmap _inhmap syn_ )) of                                  { ( !sem_Segment_3) ->@@ -710,34 +904,52 @@                     (!_lhsIisFirst)                     (!_lhsInextInh)                     (!_lhsInextIntravisits) ->-                      (case (let computes v = case Map.lookup v _lhsIvisitDescr of+                      (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) of+                             in concatMap (concatMap computes) _visitss+                             {-# LINE 913 "InterfacesRules.hs" #-}) of                        { !_computed ->-                       (case (_occurAs isLhs inh_ ++ _lhsIfromLhs) of+                       (case ({-# LINE 356 "InterfacesRules.lag" #-}+                              _occurAs isLhs inh_ ++ _lhsIfromLhs+                              {-# LINE 917 "InterfacesRules.hs" #-}) of                         { !_fromLhs ->-                        (case (\vs next ->+                        (case ({-# LINE 362 "InterfacesRules.lag" #-}+                               \vs next ->                                  let needed = concatMap (_lhsIddp !) vs-                                 in nub (needed ++ next) \\ (_fromLhs ++ _computed)) of+                                 in nub (needed ++ next) \\ (_fromLhs ++ _computed)+                               {-# LINE 923 "InterfacesRules.hs" #-}) of                          { !_iv ->-                         (case (zipWith _iv _visitss _lhsInextIntravisits) of+                         (case ({-# LINE 361 "InterfacesRules.lag" #-}+                                zipWith _iv _visitss _lhsInextIntravisits+                                {-# LINE 927 "InterfacesRules.hs" #-}) of                           { !_intravisits ->-                          (case (let  mkVisit vss intra = CVisit _inhmap _synmap (mkSequence vss) (mkSequence intra) True+                          (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) of+                                 in zipWith mkVisit _visitss _intravisits+                                 {-# LINE 936 "InterfacesRules.hs" #-}) of                            { !_lhsOcvisits ->-                           (case (Seq.fromList [(i,s) | i <- inh_, s <- syn_]-                                  Seq.>< Seq.fromList [(s,i) | s <- syn_, i <- _lhsInextInh ]) of+                           (case ({-# LINE 439 "InterfacesRules.lag" #-}+                                  Seq.fromList [(i,s) | i <- inh_, s <- syn_]+                                  Seq.>< Seq.fromList [(s,i) | s <- syn_, i <- _lhsInextInh ]+                                  {-# LINE 941 "InterfacesRules.hs" #-}) of                             { !_lhsOedp ->-                            (case (inh_) of+                            (case ({-# LINE 444 "InterfacesRules.lag" #-}+                                   inh_+                                   {-# LINE 945 "InterfacesRules.hs" #-}) of                              { !_lhsOinh ->-                             (case (_intravisits) of+                             (case ({-# LINE 327 "InterfacesRules.lag" #-}+                                    _intravisits+                                    {-# LINE 949 "InterfacesRules.hs" #-}) of                               { !_lhsOintravisits ->-                              (case (_visitss) of+                              (case ({-# LINE 269 "InterfacesRules.lag" #-}+                                     _visitss+                                     {-# LINE 953 "InterfacesRules.hs" #-}) of                                { !_lhsOvisitss ->                                ( _lhsOcvisits,_lhsOedp,_lhsOinh,_lhsOintravisits,_lhsOvisitss) }) }) }) }) }) }) }) }) })) ) -- Segments ----------------------------------------------------@@ -819,35 +1031,59 @@     (T_Segments (\ (!_lhsIinfo)                    (!_lhsIn)                    (!_lhsIv) ->-                     (case (_lhsIv) of+                     (case ({-# LINE 82 "InterfacesRules.lag" #-}+                            _lhsIv+                            {-# LINE 1037 "InterfacesRules.hs" #-}) of                       { !_hdOv ->-                      (case (_lhsIinfo) of+                      (case ({-# LINE 83 "InterfacesRules.lag" #-}+                             _lhsIinfo+                             {-# LINE 1041 "InterfacesRules.hs" #-}) of                        { !_hdOinfo ->                        (case ((hd_ _hdOinfo _hdOv )) of                         { ( !_hdIv,!T_Segment_1 hd_1) ->-                        (case (_hdIv) of+                        (case ({-# LINE 82 "InterfacesRules.lag" #-}+                               _hdIv+                               {-# LINE 1047 "InterfacesRules.hs" #-}) of                          { !_tlOv ->-                         (case (_lhsIinfo) of+                         (case ({-# LINE 83 "InterfacesRules.lag" #-}+                                _lhsIinfo+                                {-# LINE 1051 "InterfacesRules.hs" #-}) of                           { !_tlOinfo ->-                          (case (_lhsIn) of+                          (case ({-# LINE 203 "InterfacesRules.lag" #-}+                                 _lhsIn+                                 {-# LINE 1055 "InterfacesRules.hs" #-}) of                            { !_hdOn ->-                           (case (_lhsIn + 1) of+                           (case ({-# LINE 207 "InterfacesRules.lag" #-}+                                  _lhsIn + 1+                                  {-# LINE 1059 "InterfacesRules.hs" #-}) of                             { !_tlOn ->                             (case ((tl_ _tlOinfo _tlOn _tlOv )) of                              { ( !_tlIdescr,!_tlIgroups,!_tlInewedges,!_tlInewvertices,!_tlIv,!T_Segments_1 tl_1) ->-                             (case (_tlInewvertices) of+                             (case ({-# LINE 169 "InterfacesRules.lag" #-}+                                    _tlInewvertices+                                    {-# LINE 1065 "InterfacesRules.hs" #-}) of                               { !_hdOnextNewvertices ->                               (case ((hd_1 _hdOn _hdOnextNewvertices )) of                                { ( !_hdIdescr,!_hdIgroups,!_hdInewedges,!_hdInewvertices,!T_Segment_2 hd_2) ->-                               (case (_hdIdescr Seq.>< _tlIdescr) of+                               (case ({-# LINE 130 "InterfacesRules.lag" #-}+                                      _hdIdescr Seq.>< _tlIdescr+                                      {-# LINE 1071 "InterfacesRules.hs" #-}) of                                 { !_lhsOdescr ->-                                (case (_hdIgroups) of+                                (case ({-# LINE 184 "InterfacesRules.lag" #-}+                                       _hdIgroups+                                       {-# LINE 1075 "InterfacesRules.hs" #-}) of                                  { !_lhsOgroups ->-                                 (case (_hdInewedges Seq.>< _tlInewedges) of+                                 (case ({-# LINE 129 "InterfacesRules.lag" #-}+                                        _hdInewedges Seq.>< _tlInewedges+                                        {-# LINE 1079 "InterfacesRules.hs" #-}) of                                   { !_lhsOnewedges ->-                                  (case (_hdInewvertices) of+                                  (case ({-# LINE 170 "InterfacesRules.lag" #-}+                                         _hdInewvertices+                                         {-# LINE 1083 "InterfacesRules.hs" #-}) of                                    { !_lhsOnewvertices ->-                                   (case (_tlIv) of+                                   (case ({-# LINE 82 "InterfacesRules.lag" #-}+                                          _tlIv+                                          {-# LINE 1087 "InterfacesRules.hs" #-}) of                                     { !_lhsOv ->                                     (case ((sem_Segments_Cons_1 (T_Segment_2 hd_2 ) (T_Segments_1 tl_1 ) )) of                                      { ( !sem_Segments_1) ->@@ -860,27 +1096,45 @@                      (!_lhsIprev)                      (!_lhsIvisitDescr)                      (!_lhsIvssGraph) ->-                       (case (_lhsIvssGraph) of+                       (case ({-# LINE 216 "InterfacesRules.lag" #-}+                              _lhsIvssGraph+                              {-# LINE 1102 "InterfacesRules.hs" #-}) of                         { !_tlOvssGraph ->-                        (case (_lhsIvisitDescr) of+                        (case ({-# LINE 125 "InterfacesRules.lag" #-}+                               _lhsIvisitDescr+                               {-# LINE 1106 "InterfacesRules.hs" #-}) of                          { !_tlOvisitDescr ->-                         (case (_lhsIvssGraph) of+                         (case ({-# LINE 216 "InterfacesRules.lag" #-}+                                _lhsIvssGraph+                                {-# LINE 1110 "InterfacesRules.hs" #-}) of                           { !_hdOvssGraph ->-                          (case (_lhsIvisitDescr) of+                          (case ({-# LINE 125 "InterfacesRules.lag" #-}+                                 _lhsIvisitDescr+                                 {-# LINE 1114 "InterfacesRules.hs" #-}) of                            { !_hdOvisitDescr ->-                           (case (_lhsIprev) of+                           (case ({-# LINE 263 "InterfacesRules.lag" #-}+                                  _lhsIprev+                                  {-# LINE 1118 "InterfacesRules.hs" #-}) of                             { !_hdOprev ->-                            (case (_lhsIcons) of+                            (case ({-# LINE 235 "InterfacesRules.lag" #-}+                                   _lhsIcons+                                   {-# LINE 1122 "InterfacesRules.hs" #-}) of                              { !_hdOcons ->                              (case ((hd_2 _hdOcons _hdOprev _hdOvisitDescr _hdOvssGraph )) of                               { ( !_hdIprev,!_hdIseg,!T_Segment_3 hd_3) ->-                              (case (_hdIprev) of+                              (case ({-# LINE 263 "InterfacesRules.lag" #-}+                                     _hdIprev+                                     {-# LINE 1128 "InterfacesRules.hs" #-}) of                                { !_tlOprev ->-                               (case (_lhsIcons) of+                               (case ({-# LINE 235 "InterfacesRules.lag" #-}+                                      _lhsIcons+                                      {-# LINE 1132 "InterfacesRules.hs" #-}) of                                 { !_tlOcons ->                                 (case ((tl_1 _tlOcons _tlOprev _tlOvisitDescr _tlOvssGraph )) of                                  { ( !_tlIsegs,!T_Segments_2 tl_2) ->-                                 (case (_hdIseg : _tlIsegs) of+                                 (case ({-# LINE 400 "InterfacesRules.lag" #-}+                                        _hdIseg : _tlIsegs+                                        {-# LINE 1138 "InterfacesRules.hs" #-}) of                                   { !_lhsOsegs ->                                   (case ((sem_Segments_Cons_2 (T_Segments_2 tl_2 ) (T_Segment_3 hd_3 ) )) of                                    { ( !sem_Segments_2) ->@@ -893,39 +1147,69 @@                      (!_lhsIddp)                      (!_lhsIfromLhs)                      (!_lhsIisFirst) ->-                       (case (_lhsIddp) of+                       (case ({-# LINE 341 "InterfacesRules.lag" #-}+                              _lhsIddp+                              {-# LINE 1153 "InterfacesRules.hs" #-}) of                         { !_tlOddp ->-                        (case (_lhsIallInters) of+                        (case ({-# LINE 378 "InterfacesRules.lag" #-}+                               _lhsIallInters+                               {-# LINE 1157 "InterfacesRules.hs" #-}) of                          { !_tlOallInters ->-                         (case (_lhsIddp) of+                         (case ({-# LINE 341 "InterfacesRules.lag" #-}+                                _lhsIddp+                                {-# LINE 1161 "InterfacesRules.hs" #-}) of                           { !_hdOddp ->-                          (case (_lhsIallInters) of+                          (case ({-# LINE 378 "InterfacesRules.lag" #-}+                                 _lhsIallInters+                                 {-# LINE 1165 "InterfacesRules.hs" #-}) of                            { !_hdOallInters ->-                           (case ([]) of+                           (case ({-# LINE 354 "InterfacesRules.lag" #-}+                                  []+                                  {-# LINE 1169 "InterfacesRules.hs" #-}) of                             { !_tlOfromLhs ->-                            (case (_lhsIfromLhs) of+                            (case ({-# LINE 353 "InterfacesRules.lag" #-}+                                   _lhsIfromLhs+                                   {-# LINE 1173 "InterfacesRules.hs" #-}) of                              { !_hdOfromLhs ->-                             (case (False) of+                             (case ({-# LINE 316 "InterfacesRules.lag" #-}+                                    False+                                    {-# LINE 1177 "InterfacesRules.hs" #-}) of                               { !_tlOisFirst ->                               (case ((tl_2 _tlOallInters _tlOddp _tlOfromLhs _tlOisFirst )) of                                { ( !_tlIcvisits,!_tlIedp,!_tlIfirstInh,!_tlIhdIntravisits,!_tlIprev) ->-                               (case (_tlIhdIntravisits) of+                               (case ({-# LINE 329 "InterfacesRules.lag" #-}+                                      _tlIhdIntravisits+                                      {-# LINE 1183 "InterfacesRules.hs" #-}) of                                 { !_hdOnextIntravisits ->-                                (case (_lhsIisFirst) of+                                (case ({-# LINE 312 "InterfacesRules.lag" #-}+                                       _lhsIisFirst+                                       {-# LINE 1187 "InterfacesRules.hs" #-}) of                                  { !_hdOisFirst ->-                                 (case (_tlIfirstInh) of+                                 (case ({-# LINE 446 "InterfacesRules.lag" #-}+                                        _tlIfirstInh+                                        {-# LINE 1191 "InterfacesRules.hs" #-}) of                                   { !_hdOnextInh ->                                   (case ((hd_3 _hdOallInters _hdOddp _hdOfromLhs _hdOisFirst _hdOnextInh _hdOnextIntravisits )) of                                    { ( !_hdIcvisits,!_hdIedp,!_hdIinh,!_hdIintravisits,!_hdIvisitss) ->-                                   (case (_hdIcvisits : _tlIcvisits) of+                                   (case ({-# LINE 399 "InterfacesRules.lag" #-}+                                          _hdIcvisits : _tlIcvisits+                                          {-# LINE 1197 "InterfacesRules.hs" #-}) of                                     { !_lhsOcvisits ->-                                    (case (_hdIedp Seq.>< _tlIedp) of+                                    (case ({-# LINE 437 "InterfacesRules.lag" #-}+                                           _hdIedp Seq.>< _tlIedp+                                           {-# LINE 1201 "InterfacesRules.hs" #-}) of                                      { !_lhsOedp ->-                                     (case (_hdIinh) of+                                     (case ({-# LINE 447 "InterfacesRules.lag" #-}+                                            _hdIinh+                                            {-# LINE 1205 "InterfacesRules.hs" #-}) of                                       { !_lhsOfirstInh ->-                                      (case (_hdIintravisits) of+                                      (case ({-# LINE 330 "InterfacesRules.lag" #-}+                                             _hdIintravisits+                                             {-# LINE 1209 "InterfacesRules.hs" #-}) of                                        { !_lhsOhdIntravisits ->-                                       (case (_tlIprev) of+                                       (case ({-# LINE 263 "InterfacesRules.lag" #-}+                                              _tlIprev+                                              {-# LINE 1213 "InterfacesRules.hs" #-}) of                                         { !_lhsOprev ->                                         ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) ) sem_Segments_Nil :: T_Segments @@ -933,15 +1217,25 @@     (T_Segments (\ (!_lhsIinfo)                    (!_lhsIn)                    (!_lhsIv) ->-                     (case (Seq.empty) of+                     (case ({-# LINE 130 "InterfacesRules.lag" #-}+                            Seq.empty+                            {-# LINE 1223 "InterfacesRules.hs" #-}) of                       { !_lhsOdescr ->-                      (case ([]) of+                      (case ({-# LINE 185 "InterfacesRules.lag" #-}+                             []+                             {-# LINE 1227 "InterfacesRules.hs" #-}) of                        { !_lhsOgroups ->-                       (case (Seq.empty) of+                       (case ({-# LINE 129 "InterfacesRules.lag" #-}+                              Seq.empty+                              {-# LINE 1231 "InterfacesRules.hs" #-}) of                         { !_lhsOnewedges ->-                        (case ([]) of+                        (case ({-# LINE 171 "InterfacesRules.lag" #-}+                               []+                               {-# LINE 1235 "InterfacesRules.hs" #-}) of                          { !_lhsOnewvertices ->-                         (case (_lhsIv) of+                         (case ({-# LINE 82 "InterfacesRules.lag" #-}+                                _lhsIv+                                {-# LINE 1239 "InterfacesRules.hs" #-}) of                           { !_lhsOv ->                           (case ((sem_Segments_Nil_1 )) of                            { ( !sem_Segments_1) ->@@ -952,7 +1246,9 @@                      (!_lhsIprev)                      (!_lhsIvisitDescr)                      (!_lhsIvssGraph) ->-                       (case ([]) of+                       (case ({-# LINE 401 "InterfacesRules.lag" #-}+                              []+                              {-# LINE 1252 "InterfacesRules.hs" #-}) of                         { !_lhsOsegs ->                         (case ((sem_Segments_Nil_2 _lhsIprev )) of                          { ( !sem_Segments_2) ->@@ -964,14 +1260,24 @@                      (!_lhsIddp)                      (!_lhsIfromLhs)                      (!_lhsIisFirst) ->-                       (case ([]) of+                       (case ({-# LINE 399 "InterfacesRules.lag" #-}+                              []+                              {-# LINE 1266 "InterfacesRules.hs" #-}) of                         { !_lhsOcvisits ->-                        (case (Seq.empty) of+                        (case ({-# LINE 437 "InterfacesRules.lag" #-}+                               Seq.empty+                               {-# LINE 1270 "InterfacesRules.hs" #-}) of                          { !_lhsOedp ->-                         (case ([]) of+                         (case ({-# LINE 448 "InterfacesRules.lag" #-}+                                []+                                {-# LINE 1274 "InterfacesRules.hs" #-}) of                           { !_lhsOfirstInh ->-                          (case (repeat []) of+                          (case ({-# LINE 331 "InterfacesRules.lag" #-}+                                 repeat []+                                 {-# LINE 1278 "InterfacesRules.hs" #-}) of                            { !_lhsOhdIntravisits ->-                           (case (_lhsIprev) of+                           (case ({-# LINE 263 "InterfacesRules.lag" #-}+                                  _lhsIprev+                                  {-# LINE 1282 "InterfacesRules.hs" #-}) of                             { !_lhsOprev ->                             ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) })) )
src-derived/Order.hs view
@@ -2,3537 +2,4692 @@  -- UUAGC 0.9.14 (Order.ag) module Order where---- 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----- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)---import UU.Scanner.Position(Pos)-import HsToken----- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns    (Pattern(..),Patterns)-import Expression  (Expression(..))-import CommonTypes---- 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---getNtName :: Type -> NontermIdent-getNtName (NT nt _) = maybe nt id (deforestedNt nt)-getNtName _         = nullIdent---data AltAttr = AltAttr Identifier Identifier Bool -               deriving (Eq, Ord, Show)---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))) ++ ")" ))---lookupVertices :: Identifier -> Identifier -> Map AltAttr Int -> [Int]-lookupVertices fld nm attrs-  = catMaybes (  [Map.lookup (AltAttr fld nm False) attrs]  -- look for all "out" attributes-              ++ if fld == _LOC-                 then [Map.lookup (AltAttr fld nm True) attrs]-                 else []-              )---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)--- Child --------------------------------------------------------{--   visit 0:-      inherited attributes:-         allfields            : [(Identifier,Type,Bool)]-         allnts               : [Identifier]-         attrs                : [(Identifier,Identifier)]-         con                  : Identifier-         inh                  : Attributes-         nt                   : Identifier-         o_unbox              : Bool-         syn                  : Attributes-      synthesized attributes:-         attributes           : [(Identifier,Attributes,Attributes)]-         collectChildrenSyns  : Map Identifier Attributes -         errors               : Seq Error-         field                : (Identifier,Type,Bool)-         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 higherOrder    : {Bool}-         visit 0:-            local maptolocal  : _-            local gathRules   : _--}--- cata-sem_Child :: Child  ->-             T_Child -sem_Child (Child _name _tp _inh _syn _higherOrder )  =-    (sem_Child_Child _name _tp _inh _syn _higherOrder )--- semantic domain-newtype T_Child  = T_Child (([(Identifier,Type,Bool)]) ->-                            ([Identifier]) ->-                            ([(Identifier,Identifier)]) ->-                            Identifier ->-                            Attributes ->-                            Identifier ->-                            Bool ->-                            Attributes ->-                            ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Seq Error),((Identifier,Type,Bool)),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))-data Inh_Child  = Inh_Child {allfields_Inh_Child :: !([(Identifier,Type,Bool)]),allnts_Inh_Child :: !([Identifier]),attrs_Inh_Child :: !([(Identifier,Identifier)]),con_Inh_Child :: !(Identifier),inh_Inh_Child :: !(Attributes),nt_Inh_Child :: !(Identifier),o_unbox_Inh_Child :: !(Bool),syn_Inh_Child :: !(Attributes)}-data Syn_Child  = Syn_Child {attributes_Syn_Child :: !([(Identifier,Attributes,Attributes)]),collectChildrenSyns_Syn_Child :: !(Map Identifier Attributes ),errors_Syn_Child :: !(Seq Error),field_Syn_Child :: !((Identifier,Type,Bool)),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 _lhsInt _lhsIo_unbox _lhsIsyn )  =-    (let ( _lhsOattributes,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) =-             (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsInt _lhsIo_unbox _lhsIsyn )-     in  (Syn_Child _lhsOattributes _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals ))-sem_Child_Child :: Identifier ->-                   Type ->-                   Attributes ->-                   Attributes ->-                   Bool ->-                   T_Child -sem_Child_Child name_ tp_ inh_ syn_ higherOrder_  =-    (T_Child (\ _lhsIallfields-                _lhsIallnts-                _lhsIattrs-                _lhsIcon-                _lhsIinh-                _lhsInt-                _lhsIo_unbox-                _lhsIsyn ->-                  (let _lhsOgathAltAttrs :: ([AltAttr])-                       _lhsOnts :: (Seq (Identifier,NontermIdent))-                       _lhsOinhs :: (Seq (Identifier,Attributes))-                       _lhsOcollectChildrenSyns :: (Map Identifier Attributes )-                       _lhsOsinglevisits :: ([CRule])-                       _lhsOterminals :: ([Identifier])-                       _lhsOattributes :: ([(Identifier,Attributes,Attributes)])-                       _lhsOfield :: ((Identifier,Type,Bool))-                       _lhsOerrors :: (Seq Error)-                       _lhsOgathRules :: (Seq CRule)-                       -- "Order.ag"(line 157, column 13)-                       _maptolocal =-                           case tp_ of-                             NT nt _ -> Map.null syn_-                             _       -> True-                       -- "Order.ag"(line 160, column 13)-                       _lhsOgathAltAttrs =-                           if  _maptolocal-                               then [ AltAttr _LOC name_ True ]-                               else [ AltAttr name_ syn True | syn <- Map.keys syn_ ]-                       -- "Order.ag"(line 175, column 13)-                       _lhsOnts =-                           Seq.singleton (name_,getNtName tp_)-                       -- "Order.ag"(line 176, column 13)-                       _lhsOinhs =-                           Seq.singleton (name_,inh_)-                       -- "Order.ag"(line 192, column 13)-                       _gathRules =-                           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_]-                       -- "Order.ag"(line 317, column 12)-                       _lhsOcollectChildrenSyns =-                           Map.singleton name_ syn_-                       -- "Order.ag"(line 477, column 11)-                       _lhsOsinglevisits =-                           if  _maptolocal-                               then []-                               else [CChildVisit name_ (getNtName tp_) 0 inh_ syn_ True]-                       -- "Order.ag"(line 498, column 11)-                       _lhsOterminals =-                           if _maptolocal-                           then [name_]-                           else []-                       -- "Order.ag"(line 527, column 11)-                       _lhsOattributes =-                           [(name_, inh_, syn_)]-                       -- "Order.ag"(line 531, column 11)-                       _lhsOfield =-                           (name_, tp_, higherOrder_)-                       -- use rule "Order.ag"(line 64, column 70)-                       _lhsOerrors =-                           Seq.empty-                       -- use rule "Order.ag"(line 186, column 23)-                       _lhsOgathRules =-                           _gathRules-                   in  ( _lhsOattributes,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )--- Children -----------------------------------------------------{--   visit 0:-      inherited attributes:-         allfields            : [(Identifier,Type,Bool)]-         allnts               : [Identifier]-         attrs                : [(Identifier,Identifier)]-         con                  : Identifier-         inh                  : Attributes-         nt                   : Identifier-         o_unbox              : Bool-         syn                  : Attributes-      synthesized attributes:-         attributes           : [(Identifier,Attributes,Attributes)]-         collectChildrenSyns  : Map Identifier Attributes -         errors               : Seq Error-         fields               : [(Identifier,Type,Bool)]-         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,Bool)]) ->-                                  ([Identifier]) ->-                                  ([(Identifier,Identifier)]) ->-                                  Identifier ->-                                  Attributes ->-                                  Identifier ->-                                  Bool ->-                                  Attributes ->-                                  ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Seq Error),([(Identifier,Type,Bool)]),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))-data Inh_Children  = Inh_Children {allfields_Inh_Children :: !([(Identifier,Type,Bool)]),allnts_Inh_Children :: !([Identifier]),attrs_Inh_Children :: !([(Identifier,Identifier)]),con_Inh_Children :: !(Identifier),inh_Inh_Children :: !(Attributes),nt_Inh_Children :: !(Identifier),o_unbox_Inh_Children :: !(Bool),syn_Inh_Children :: !(Attributes)}-data Syn_Children  = Syn_Children {attributes_Syn_Children :: !([(Identifier,Attributes,Attributes)]),collectChildrenSyns_Syn_Children :: !(Map Identifier Attributes ),errors_Syn_Children :: !(Seq Error),fields_Syn_Children :: !([(Identifier,Type,Bool)]),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 _lhsInt _lhsIo_unbox _lhsIsyn )  =-    (let ( _lhsOattributes,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) =-             (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsInt _lhsIo_unbox _lhsIsyn )-     in  (Syn_Children _lhsOattributes _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-                   _lhsInt-                   _lhsIo_unbox-                   _lhsIsyn ->-                     (let _lhsOfields :: ([(Identifier,Type,Bool)])-                          _lhsOattributes :: ([(Identifier,Attributes,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,Bool)])-                          _hdOallnts :: ([Identifier])-                          _hdOattrs :: ([(Identifier,Identifier)])-                          _hdOcon :: Identifier-                          _hdOinh :: Attributes-                          _hdOnt :: Identifier-                          _hdOo_unbox :: Bool-                          _hdOsyn :: Attributes-                          _tlOallfields :: ([(Identifier,Type,Bool)])-                          _tlOallnts :: ([Identifier])-                          _tlOattrs :: ([(Identifier,Identifier)])-                          _tlOcon :: Identifier-                          _tlOinh :: Attributes-                          _tlOnt :: Identifier-                          _tlOo_unbox :: Bool-                          _tlOsyn :: Attributes-                          _hdIattributes :: ([(Identifier,Attributes,Attributes)])-                          _hdIcollectChildrenSyns :: (Map Identifier Attributes )-                          _hdIerrors :: (Seq Error)-                          _hdIfield :: ((Identifier,Type,Bool))-                          _hdIgathAltAttrs :: ([AltAttr])-                          _hdIgathRules :: (Seq CRule)-                          _hdIinhs :: (Seq (Identifier,Attributes))-                          _hdInts :: (Seq (Identifier,NontermIdent))-                          _hdIsinglevisits :: ([CRule])-                          _hdIterminals :: ([Identifier])-                          _tlIattributes :: ([(Identifier,Attributes,Attributes)])-                          _tlIcollectChildrenSyns :: (Map Identifier Attributes )-                          _tlIerrors :: (Seq Error)-                          _tlIfields :: ([(Identifier,Type,Bool)])-                          _tlIgathAltAttrs :: ([AltAttr])-                          _tlIgathRules :: (Seq CRule)-                          _tlIinhs :: (Seq (Identifier,Attributes))-                          _tlInts :: (Seq (Identifier,NontermIdent))-                          _tlIsinglevisits :: ([CRule])-                          _tlIterminals :: ([Identifier])-                          -- "Order.ag"(line 534, column 11)-                          _lhsOfields =-                              _hdIfield : _tlIfields-                          -- use rule "Order.ag"(line 525, column 32)-                          _lhsOattributes =-                              _hdIattributes ++ _tlIattributes-                          -- use rule "Order.ag"(line 315, column 47)-                          _lhsOcollectChildrenSyns =-                              _hdIcollectChildrenSyns `Map.union` _tlIcollectChildrenSyns-                          -- use rule "Order.ag"(line 64, column 70)-                          _lhsOerrors =-                              _hdIerrors Seq.>< _tlIerrors-                          -- use rule "Order.ag"(line 150, column 68)-                          _lhsOgathAltAttrs =-                              _hdIgathAltAttrs ++ _tlIgathAltAttrs-                          -- use rule "Order.ag"(line 186, column 23)-                          _lhsOgathRules =-                              _hdIgathRules Seq.>< _tlIgathRules-                          -- use rule "Order.ag"(line 173, column 20)-                          _lhsOinhs =-                              _hdIinhs Seq.>< _tlIinhs-                          -- use rule "Order.ag"(line 172, column 19)-                          _lhsOnts =-                              _hdInts Seq.>< _tlInts-                          -- use rule "Order.ag"(line 475, column 40)-                          _lhsOsinglevisits =-                              _hdIsinglevisits ++ _tlIsinglevisits-                          -- use rule "Order.ag"(line 496, column 38)-                          _lhsOterminals =-                              _hdIterminals ++ _tlIterminals-                          -- copy rule (down)-                          _hdOallfields =-                              _lhsIallfields-                          -- copy rule (down)-                          _hdOallnts =-                              _lhsIallnts-                          -- copy rule (down)-                          _hdOattrs =-                              _lhsIattrs-                          -- copy rule (down)-                          _hdOcon =-                              _lhsIcon-                          -- copy rule (down)-                          _hdOinh =-                              _lhsIinh-                          -- copy rule (down)-                          _hdOnt =-                              _lhsInt-                          -- copy rule (down)-                          _hdOo_unbox =-                              _lhsIo_unbox-                          -- copy rule (down)-                          _hdOsyn =-                              _lhsIsyn-                          -- copy rule (down)-                          _tlOallfields =-                              _lhsIallfields-                          -- copy rule (down)-                          _tlOallnts =-                              _lhsIallnts-                          -- copy rule (down)-                          _tlOattrs =-                              _lhsIattrs-                          -- copy rule (down)-                          _tlOcon =-                              _lhsIcon-                          -- copy rule (down)-                          _tlOinh =-                              _lhsIinh-                          -- copy rule (down)-                          _tlOnt =-                              _lhsInt-                          -- copy rule (down)-                          _tlOo_unbox =-                              _lhsIo_unbox-                          -- copy rule (down)-                          _tlOsyn =-                              _lhsIsyn-                          ( _hdIattributes,_hdIcollectChildrenSyns,_hdIerrors,_hdIfield,_hdIgathAltAttrs,_hdIgathRules,_hdIinhs,_hdInts,_hdIsinglevisits,_hdIterminals) =-                              (hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOnt _hdOo_unbox _hdOsyn )-                          ( _tlIattributes,_tlIcollectChildrenSyns,_tlIerrors,_tlIfields,_tlIgathAltAttrs,_tlIgathRules,_tlIinhs,_tlInts,_tlIsinglevisits,_tlIterminals) =-                              (tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOnt _tlOo_unbox _tlOsyn )-                      in  ( _lhsOattributes,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )-sem_Children_Nil :: T_Children -sem_Children_Nil  =-    (T_Children (\ _lhsIallfields-                   _lhsIallnts-                   _lhsIattrs-                   _lhsIcon-                   _lhsIinh-                   _lhsInt-                   _lhsIo_unbox-                   _lhsIsyn ->-                     (let _lhsOfields :: ([(Identifier,Type,Bool)])-                          _lhsOattributes :: ([(Identifier,Attributes,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 535, column 11)-                          _lhsOfields =-                              []-                          -- use rule "Order.ag"(line 525, column 32)-                          _lhsOattributes =-                              []-                          -- use rule "Order.ag"(line 315, column 47)-                          _lhsOcollectChildrenSyns =-                              Map.empty-                          -- use rule "Order.ag"(line 64, column 70)-                          _lhsOerrors =-                              Seq.empty-                          -- use rule "Order.ag"(line 150, column 68)-                          _lhsOgathAltAttrs =-                              []-                          -- use rule "Order.ag"(line 186, column 23)-                          _lhsOgathRules =-                              Seq.empty-                          -- use rule "Order.ag"(line 173, column 20)-                          _lhsOinhs =-                              Seq.empty-                          -- use rule "Order.ag"(line 172, column 19)-                          _lhsOnts =-                              Seq.empty-                          -- use rule "Order.ag"(line 475, column 40)-                          _lhsOsinglevisits =-                              []-                          -- use rule "Order.ag"(line 496, column 38)-                          _lhsOterminals =-                              []-                      in  ( _lhsOattributes,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )--- Expression ---------------------------------------------------{--   visit 0:-      inherited attributes:-         allfields            : [(Identifier,Type,Bool)]-         allnts               : [Identifier]-         attrs                : [(Identifier,Identifier)]-         con                  : 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,Bool)]) ->-                                      ([Identifier]) ->-                                      ([(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,Bool)]),allnts_Inh_Expression :: !([Identifier]),attrs_Inh_Expression :: !([(Identifier,Identifier)]),con_Inh_Expression :: !(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 _lhsInt )  =-    (let ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) =-             (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _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-                     _lhsInt ->-                       (let _lhsOallRhsVars :: (Set (Identifier,Identifier))-                            _lhsOcopy :: Expression-                            _lhsOerrors :: (Seq Error)-                            _lhsOtextLines :: ([String])-                            _lhsOusedAttrs :: ([(Identifier,Identifier)])-                            _lhsOusedFields :: ([Identifier])-                            _lhsOusedLocals :: ([Identifier])-                            -- "Order.ag"(line 337, column 21)-                            __tup1 =-                                let inherited = Inh_HsTokensRoot-                                                { attrs_Inh_HsTokensRoot      = _lhsIattrs-                                                , 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-                                      }  -> (errors,textLines,usedAttrs,usedLocals,usedFields)-                            -- "Order.ag"(line 337, column 21)-                            (_errors,_,_,_,_) =-                                __tup1-                            -- "Order.ag"(line 337, column 21)-                            (_,_textLines,_,_,_) =-                                __tup1-                            -- "Order.ag"(line 337, column 21)-                            (_,_,_usedAttrs,_,_) =-                                __tup1-                            -- "Order.ag"(line 337, column 21)-                            (_,_,_,_usedLocals,_) =-                                __tup1-                            -- "Order.ag"(line 337, column 21)-                            (_,_,_,_,_usedFields) =-                                __tup1-                            -- "Order.ag"(line 355, column 17)-                            _lhsOallRhsVars =-                                Set.fromList _usedAttrs-                                `Set.union`-                                Set.fromList [ (_LOC, l) | l <- _usedLocals    ]-                                `Set.union`-                                Set.fromList [ (_FIELD, fld) | fld <- _usedFields    ]-                            -- self rule-                            _copy =-                                Expression pos_ tks_-                            -- self rule-                            _lhsOcopy =-                                _copy-                            -- copy rule (from local)-                            _lhsOerrors =-                                _errors-                            -- copy rule (from local)-                            _lhsOtextLines =-                                _textLines-                            -- copy rule (from local)-                            _lhsOusedAttrs =-                                _usedAttrs-                            -- copy rule (from local)-                            _lhsOusedFields =-                                _usedFields-                            -- copy rule (from local)-                            _lhsOusedLocals =-                                _usedLocals-                        in  ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )--- Grammar ------------------------------------------------------{--   visit 0:-      inherited attribute:-         options              : Options-      synthesized attributes:-         errors               : Seq Error-         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]))}-         visit 0:-            local ruleTable   : _-            local attrTable   : _-            local attrVertex  : _-            local tdpToTds    : _-            local tdsToTdp    : _-            local directDep   : _-            local instDep     : _-            local info        : _-            local _tup2       : _-            local cInterfaceMap : _-            local cVisitsMap  : _-            local cyclesErrors : _--}--- cata-sem_Grammar :: Grammar  ->-               T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )  =-    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )--- semantic domain-newtype T_Grammar  = T_Grammar (Options ->-                                ( (Seq Error),CGrammar))-data Inh_Grammar  = Inh_Grammar {options_Inh_Grammar :: !(Options)}-data Syn_Grammar  = Syn_Grammar {errors_Syn_Grammar :: !(Seq Error),output_Syn_Grammar :: !(CGrammar)}-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]))) ->-                       T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_  =-    (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_dovisit :: Bool-                         _nontsOo_unbox :: Bool-                         _nontsOo_case :: Bool-                         _nontsOprefix :: String-                         _nontsOvcount :: Int-                         _nontsOmanualAttrDepMap :: AttrOrderMap-                         _nontsOacount :: Int-                         _lhsOerrors :: (Seq Error)-                         _lhsOoutput :: CGrammar-                         _nontsOallnts :: ([Identifier])-                         _nontsOcInterfaceMap :: CInterfaceMap-                         _nontsOcVisitsMap :: CVisitsMap-                         _nontsIacount :: Int-                         _nontsIadditionalDep :: (Seq Edge)-                         _nontsIaranges :: (Seq (Int,Int,Int))-                         _nontsIcNonterminals :: CNonterminals-                         _nontsIdirectDep :: (Seq Edge)-                         _nontsIerrors :: (Seq Error)-                         _nontsIinstDep :: (Seq Edge)-                         _nontsInonts :: ([(NontermIdent,[ConstructorIdent])])-                         _nontsIntattrs :: (Seq (Vertex,NTAttr))-                         _nontsIrules :: (Seq (Vertex,CRule))-                         _nontsIvcount :: Int-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_cata =-                             folds     _lhsIoptions-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_data =-                             dataTypes _lhsIoptions-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_sig =-                             typeSigs  _lhsIoptions-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_sem =-                             semfuns   _lhsIoptions-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_rename =-                             rename    _lhsIoptions-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_newtypes =-                             newtypes  _lhsIoptions-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_wantvisit =-                             visit   _lhsIoptions-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_dovisit =-                             visit     _lhsIoptions && null _cyclesErrors-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_unbox =-                             unbox     _lhsIoptions-                         -- "Order.ag"(line 103, column 17)-                         _nontsOo_case =-                             cases     _lhsIoptions-                         -- "Order.ag"(line 103, column 17)-                         _nontsOprefix =-                             prefix    _lhsIoptions-                         -- "Order.ag"(line 241, column 15)-                         _nontsOvcount =-                             0-                         -- "Order.ag"(line 266, column 7)-                         _nontsOmanualAttrDepMap =-                             manualAttrOrderMap_-                         -- "Order.ag"(line 369, column 13)-                         _nontsOacount =-                             0-                         -- "Order.ag"(line 407, column 13)-                         _ruleTable =-                             Array.array (0,_nontsIvcount-1) (toList _nontsIrules)-                         -- "Order.ag"(line 408, column 13)-                         _attrTable =-                             Array.array (0,_nontsIacount-1) (toList _nontsIntattrs)-                         -- "Order.ag"(line 409, column 13)-                         _attrVertex =-                             Map.fromList (map swap (toList _nontsIntattrs))-                         -- "Order.ag"(line 410, column 13)-                         _tdpToTds =-                             [ (s, maybe (-1) (\v -> findWithErr1 "Grammar.tdpToTds" v _attrVertex) (ntattr cr))-                             | (s,cr) <- toList _nontsIrules]-                         -- "Order.ag"(line 412, column 13)-                         _tdsToTdp =-                             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)-                         -- "Order.ag"(line 416, column 13)-                         _directDep =-                             toList (_nontsIdirectDep Seq.>< _nontsIadditionalDep)-                         -- "Order.ag"(line 417, column 13)-                         _instDep =-                             toList _nontsIinstDep-                         -- "Order.ag"(line 418, column 13)-                         _info =-                             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_-                                      }-                         -- "Order.ag"(line 429, column 17)-                         __tup2 =-                             case computeSequential _info _directDep _instDep 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-                                                                    )-                         -- "Order.ag"(line 429, column 17)-                         (_cInterfaceMap,_,_) =-                             __tup2-                         -- "Order.ag"(line 429, column 17)-                         (_,_cVisitsMap,_) =-                             __tup2-                         -- "Order.ag"(line 429, column 17)-                         (_,_,_cyclesErrors) =-                             __tup2-                         -- "Order.ag"(line 451, column 13)-                         _lhsOerrors =-                             (if withCycle _lhsIoptions then Seq.fromList _cyclesErrors else Seq.empty)-                             Seq.>< _nontsIerrors-                         -- "Order.ag"(line 483, column 15)-                         _lhsOoutput =-                             CGrammar typeSyns_ derivings_ wrappers_ _nontsIcNonterminals pragmas_ paramMap_ contextMap_-                         -- "Order.ag"(line 510, column 13)-                         _nontsOallnts =-                             map fst (_nontsInonts)-                         -- copy rule (from local)-                         _nontsOcInterfaceMap =-                             _cInterfaceMap-                         -- copy rule (from local)-                         _nontsOcVisitsMap =-                             _cVisitsMap-                         ( _nontsIacount,_nontsIadditionalDep,_nontsIaranges,_nontsIcNonterminals,_nontsIdirectDep,_nontsIerrors,_nontsIinstDep,_nontsInonts,_nontsIntattrs,_nontsIrules,_nontsIvcount) =-                             (nonts_ _nontsOacount _nontsOallnts _nontsOcInterfaceMap _nontsOcVisitsMap _nontsOmanualAttrDepMap _nontsOo_case _nontsOo_cata _nontsOo_data _nontsOo_dovisit _nontsOo_newtypes _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_unbox _nontsOo_wantvisit _nontsOprefix _nontsOvcount )-                     in  ( _lhsOerrors,_lhsOoutput))) )--- Nonterminal --------------------------------------------------{--   visit 0:-      inherited attributes:-         allnts               : [Identifier]-         cInterfaceMap        : CInterfaceMap-         cVisitsMap           : CVisitsMap-         manualAttrDepMap     : AttrOrderMap-         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)-         cNonterminal         : CNonterminal-         directDep            : Seq Edge-         errors               : Seq Error-         instDep              : Seq Edge-         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 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]) ->-                                        CInterfaceMap ->-                                        CVisitsMap ->-                                        AttrOrderMap ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        String ->-                                        Int ->-                                        ( Int,(Seq Edge),(Seq (Int,Int,Int)),CNonterminal,(Seq Edge),(Seq Error),(Seq Edge),([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),Int))-data Inh_Nonterminal  = Inh_Nonterminal {acount_Inh_Nonterminal :: !(Int),allnts_Inh_Nonterminal :: !([Identifier]),cInterfaceMap_Inh_Nonterminal :: !(CInterfaceMap),cVisitsMap_Inh_Nonterminal :: !(CVisitsMap),manualAttrDepMap_Inh_Nonterminal :: !(AttrOrderMap),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)),cNonterminal_Syn_Nonterminal :: !(CNonterminal),directDep_Syn_Nonterminal :: !(Seq Edge),errors_Syn_Nonterminal :: !(Seq Error),instDep_Syn_Nonterminal :: !(Seq Edge),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 _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _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,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount) =-             (sem _lhsIacount _lhsIallnts _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _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 _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinstDep _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-                      _lhsIcInterfaceMap-                      _lhsIcVisitsMap-                      _lhsImanualAttrDepMap-                      _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)-                             _lhsOdirectDep :: (Seq Edge)-                             _lhsOerrors :: (Seq Error)-                             _lhsOinstDep :: (Seq Edge)-                             _lhsOrules :: (Seq (Vertex,CRule))-                             _lhsOvcount :: Int-                             _prodsOallnts :: ([Identifier])-                             _prodsOcVisitsMap :: CVisitsMap-                             _prodsOmanualAttrDepMap :: AttrOrderMap-                             _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)-                             _prodsIcProductions :: CProductions-                             _prodsIcons :: ([ConstructorIdent])-                             _prodsIdirectDep :: (Seq Edge)-                             _prodsIerrors :: (Seq Error)-                             _prodsIinstDep :: (Seq Edge)-                             _prodsIrules :: (Seq (Vertex,CRule))-                             _prodsIvcount :: Int-                             -- "Order.ag"(line 77, column 17)-                             _prodsOnt =-                                 nt_-                             -- "Order.ag"(line 80, column 17)-                             _prodsOinh =-                                 inh_-                             -- "Order.ag"(line 81, column 17)-                             _prodsOsyn =-                                 syn_-                             -- "Order.ag"(line 372, column 17)-                             _ntattrs =-                                 [ NTAInh nt_ inh tp | (inh,tp) <- Map.assocs inh_ ]-                                 ++ [NTASyn nt_ syn tp | (syn,tp) <- Map.assocs syn_ ]-                             -- "Order.ag"(line 374, column 17)-                             _lhsOntattrs =-                                 Seq.fromList (zip [_lhsIacount ..] _ntattrs)-                             -- "Order.ag"(line 375, column 17)-                             _lhsOacount =-                                 _lhsIacount + Map.size inh_ + Map.size syn_-                             -- "Order.ag"(line 376, column 17)-                             _lhsOaranges =-                                 Seq.singleton-                                  (_lhsIacount-                                  ,_lhsIacount + Map.size inh_-                                  ,_lhsIacount + Map.size syn_ + Map.size inh_ - 1)-                             -- "Order.ag"(line 385, column 19)-                             _lhsOnonts =-                                 [(nt_,_prodsIcons)]-                             -- "Order.ag"(line 460, column 19)-                             _cInter =-                                 if  _lhsIo_dovisit-                                        then findWithErr1 "Nonterminal.cInter" nt_ _lhsIcInterfaceMap-                                        else CInterface [CSegment inh_ syn_]-                             -- "Order.ag"(line 488, column 19)-                             _lhsOcNonterminal =-                                 CNonterminal nt_ params_ inh_ syn_ _prodsIcProductions _cInter-                             -- use rule "Order.ag"(line 263, column 71)-                             _lhsOadditionalDep =-                                 _prodsIadditionalDep-                             -- use rule "Order.ag"(line 249, column 33)-                             _lhsOdirectDep =-                                 _prodsIdirectDep-                             -- use rule "Order.ag"(line 64, column 70)-                             _lhsOerrors =-                                 _prodsIerrors-                             -- use rule "Order.ag"(line 296, column 31)-                             _lhsOinstDep =-                                 _prodsIinstDep-                             -- use rule "Order.ag"(line 239, column 18)-                             _lhsOrules =-                                 _prodsIrules-                             -- copy rule (up)-                             _lhsOvcount =-                                 _prodsIvcount-                             -- copy rule (down)-                             _prodsOallnts =-                                 _lhsIallnts-                             -- copy rule (down)-                             _prodsOcVisitsMap =-                                 _lhsIcVisitsMap-                             -- copy rule (down)-                             _prodsOmanualAttrDepMap =-                                 _lhsImanualAttrDepMap-                             -- copy rule (down)-                             _prodsOo_case =-                                 _lhsIo_case-                             -- copy rule (down)-                             _prodsOo_cata =-                                 _lhsIo_cata-                             -- copy rule (down)-                             _prodsOo_dovisit =-                                 _lhsIo_dovisit-                             -- copy rule (down)-                             _prodsOo_newtypes =-                                 _lhsIo_newtypes-                             -- copy rule (down)-                             _prodsOo_rename =-                                 _lhsIo_rename-                             -- copy rule (down)-                             _prodsOo_sem =-                                 _lhsIo_sem-                             -- copy rule (down)-                             _prodsOo_sig =-                                 _lhsIo_sig-                             -- copy rule (down)-                             _prodsOo_unbox =-                                 _lhsIo_unbox-                             -- copy rule (down)-                             _prodsOo_wantvisit =-                                 _lhsIo_wantvisit-                             -- copy rule (down)-                             _prodsOprefix =-                                 _lhsIprefix-                             -- copy rule (down)-                             _prodsOvcount =-                                 _lhsIvcount-                             ( _prodsIadditionalDep,_prodsIcProductions,_prodsIcons,_prodsIdirectDep,_prodsIerrors,_prodsIinstDep,_prodsIrules,_prodsIvcount) =-                                 (prods_ _prodsOallnts _prodsOcVisitsMap _prodsOinh _prodsOmanualAttrDepMap _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,_lhsOcNonterminal,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount))) )--- Nonterminals -------------------------------------------------{--   visit 0:-      inherited attributes:-         allnts               : [Identifier]-         cInterfaceMap        : CInterfaceMap-         cVisitsMap           : CVisitsMap-         manualAttrDepMap     : AttrOrderMap-         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)-         cNonterminals        : CNonterminals-         directDep            : Seq Edge-         errors               : Seq Error-         instDep              : Seq Edge-         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]) ->-                                          CInterfaceMap ->-                                          CVisitsMap ->-                                          AttrOrderMap ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          Bool ->-                                          String ->-                                          Int ->-                                          ( Int,(Seq Edge),(Seq (Int,Int,Int)),CNonterminals,(Seq Edge),(Seq Error),(Seq Edge),([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),Int))-data Inh_Nonterminals  = Inh_Nonterminals {acount_Inh_Nonterminals :: !(Int),allnts_Inh_Nonterminals :: !([Identifier]),cInterfaceMap_Inh_Nonterminals :: !(CInterfaceMap),cVisitsMap_Inh_Nonterminals :: !(CVisitsMap),manualAttrDepMap_Inh_Nonterminals :: !(AttrOrderMap),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)),cNonterminals_Syn_Nonterminals :: !(CNonterminals),directDep_Syn_Nonterminals :: !(Seq Edge),errors_Syn_Nonterminals :: !(Seq Error),instDep_Syn_Nonterminals :: !(Seq Edge),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 _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _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,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount) =-             (sem _lhsIacount _lhsIallnts _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _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 _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinstDep _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-                       _lhsIcInterfaceMap-                       _lhsIcVisitsMap-                       _lhsImanualAttrDepMap-                       _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))-                              _lhsOdirectDep :: (Seq Edge)-                              _lhsOerrors :: (Seq Error)-                              _lhsOinstDep :: (Seq Edge)-                              _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])-                              _lhsOntattrs :: (Seq (Vertex,NTAttr))-                              _lhsOrules :: (Seq (Vertex,CRule))-                              _lhsOacount :: Int-                              _lhsOvcount :: Int-                              _hdOacount :: Int-                              _hdOallnts :: ([Identifier])-                              _hdOcInterfaceMap :: CInterfaceMap-                              _hdOcVisitsMap :: CVisitsMap-                              _hdOmanualAttrDepMap :: AttrOrderMap-                              _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])-                              _tlOcInterfaceMap :: CInterfaceMap-                              _tlOcVisitsMap :: CVisitsMap-                              _tlOmanualAttrDepMap :: AttrOrderMap-                              _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))-                              _hdIcNonterminal :: CNonterminal-                              _hdIdirectDep :: (Seq Edge)-                              _hdIerrors :: (Seq Error)-                              _hdIinstDep :: (Seq Edge)-                              _hdInonts :: ([(NontermIdent,[ConstructorIdent])])-                              _hdIntattrs :: (Seq (Vertex,NTAttr))-                              _hdIrules :: (Seq (Vertex,CRule))-                              _hdIvcount :: Int-                              _tlIacount :: Int-                              _tlIadditionalDep :: (Seq Edge)-                              _tlIaranges :: (Seq (Int,Int,Int))-                              _tlIcNonterminals :: CNonterminals-                              _tlIdirectDep :: (Seq Edge)-                              _tlIerrors :: (Seq Error)-                              _tlIinstDep :: (Seq Edge)-                              _tlInonts :: ([(NontermIdent,[ConstructorIdent])])-                              _tlIntattrs :: (Seq (Vertex,NTAttr))-                              _tlIrules :: (Seq (Vertex,CRule))-                              _tlIvcount :: Int-                              -- "Order.ag"(line 485, column 12)-                              _lhsOcNonterminals =-                                  _hdIcNonterminal : _tlIcNonterminals-                              -- use rule "Order.ag"(line 263, column 71)-                              _lhsOadditionalDep =-                                  _hdIadditionalDep Seq.>< _tlIadditionalDep-                              -- use rule "Order.ag"(line 366, column 36)-                              _lhsOaranges =-                                  _hdIaranges Seq.>< _tlIaranges-                              -- use rule "Order.ag"(line 249, column 33)-                              _lhsOdirectDep =-                                  _hdIdirectDep Seq.>< _tlIdirectDep-                              -- use rule "Order.ag"(line 64, column 70)-                              _lhsOerrors =-                                  _hdIerrors Seq.>< _tlIerrors-                              -- use rule "Order.ag"(line 296, column 31)-                              _lhsOinstDep =-                                  _hdIinstDep Seq.>< _tlIinstDep-                              -- use rule "Order.ag"(line 383, column 43)-                              _lhsOnonts =-                                  _hdInonts ++ _tlInonts-                              -- use rule "Order.ag"(line 365, column 35)-                              _lhsOntattrs =-                                  _hdIntattrs Seq.>< _tlIntattrs-                              -- use rule "Order.ag"(line 239, column 18)-                              _lhsOrules =-                                  _hdIrules Seq.>< _tlIrules-                              -- copy rule (up)-                              _lhsOacount =-                                  _tlIacount-                              -- copy rule (up)-                              _lhsOvcount =-                                  _tlIvcount-                              -- copy rule (down)-                              _hdOacount =-                                  _lhsIacount-                              -- copy rule (down)-                              _hdOallnts =-                                  _lhsIallnts-                              -- copy rule (down)-                              _hdOcInterfaceMap =-                                  _lhsIcInterfaceMap-                              -- copy rule (down)-                              _hdOcVisitsMap =-                                  _lhsIcVisitsMap-                              -- copy rule (down)-                              _hdOmanualAttrDepMap =-                                  _lhsImanualAttrDepMap-                              -- copy rule (down)-                              _hdOo_case =-                                  _lhsIo_case-                              -- copy rule (down)-                              _hdOo_cata =-                                  _lhsIo_cata-                              -- copy rule (down)-                              _hdOo_data =-                                  _lhsIo_data-                              -- copy rule (down)-                              _hdOo_dovisit =-                                  _lhsIo_dovisit-                              -- copy rule (down)-                              _hdOo_newtypes =-                                  _lhsIo_newtypes-                              -- copy rule (down)-                              _hdOo_rename =-                                  _lhsIo_rename-                              -- copy rule (down)-                              _hdOo_sem =-                                  _lhsIo_sem-                              -- copy rule (down)-                              _hdOo_sig =-                                  _lhsIo_sig-                              -- copy rule (down)-                              _hdOo_unbox =-                                  _lhsIo_unbox-                              -- copy rule (down)-                              _hdOo_wantvisit =-                                  _lhsIo_wantvisit-                              -- copy rule (down)-                              _hdOprefix =-                                  _lhsIprefix-                              -- copy rule (down)-                              _hdOvcount =-                                  _lhsIvcount-                              -- copy rule (chain)-                              _tlOacount =-                                  _hdIacount-                              -- copy rule (down)-                              _tlOallnts =-                                  _lhsIallnts-                              -- copy rule (down)-                              _tlOcInterfaceMap =-                                  _lhsIcInterfaceMap-                              -- copy rule (down)-                              _tlOcVisitsMap =-                                  _lhsIcVisitsMap-                              -- copy rule (down)-                              _tlOmanualAttrDepMap =-                                  _lhsImanualAttrDepMap-                              -- copy rule (down)-                              _tlOo_case =-                                  _lhsIo_case-                              -- copy rule (down)-                              _tlOo_cata =-                                  _lhsIo_cata-                              -- copy rule (down)-                              _tlOo_data =-                                  _lhsIo_data-                              -- copy rule (down)-                              _tlOo_dovisit =-                                  _lhsIo_dovisit-                              -- copy rule (down)-                              _tlOo_newtypes =-                                  _lhsIo_newtypes-                              -- copy rule (down)-                              _tlOo_rename =-                                  _lhsIo_rename-                              -- copy rule (down)-                              _tlOo_sem =-                                  _lhsIo_sem-                              -- copy rule (down)-                              _tlOo_sig =-                                  _lhsIo_sig-                              -- copy rule (down)-                              _tlOo_unbox =-                                  _lhsIo_unbox-                              -- copy rule (down)-                              _tlOo_wantvisit =-                                  _lhsIo_wantvisit-                              -- copy rule (down)-                              _tlOprefix =-                                  _lhsIprefix-                              -- copy rule (chain)-                              _tlOvcount =-                                  _hdIvcount-                              ( _hdIacount,_hdIadditionalDep,_hdIaranges,_hdIcNonterminal,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdInonts,_hdIntattrs,_hdIrules,_hdIvcount) =-                                  (hd_ _hdOacount _hdOallnts _hdOcInterfaceMap _hdOcVisitsMap _hdOmanualAttrDepMap _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,_tlIcNonterminals,_tlIdirectDep,_tlIerrors,_tlIinstDep,_tlInonts,_tlIntattrs,_tlIrules,_tlIvcount) =-                                  (tl_ _tlOacount _tlOallnts _tlOcInterfaceMap _tlOcVisitsMap _tlOmanualAttrDepMap _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,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount))) )-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil  =-    (T_Nonterminals (\ _lhsIacount-                       _lhsIallnts-                       _lhsIcInterfaceMap-                       _lhsIcVisitsMap-                       _lhsImanualAttrDepMap-                       _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))-                              _lhsOdirectDep :: (Seq Edge)-                              _lhsOerrors :: (Seq Error)-                              _lhsOinstDep :: (Seq Edge)-                              _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])-                              _lhsOntattrs :: (Seq (Vertex,NTAttr))-                              _lhsOrules :: (Seq (Vertex,CRule))-                              _lhsOacount :: Int-                              _lhsOvcount :: Int-                              -- "Order.ag"(line 486, column 12)-                              _lhsOcNonterminals =-                                  []-                              -- use rule "Order.ag"(line 263, column 71)-                              _lhsOadditionalDep =-                                  Seq.empty-                              -- use rule "Order.ag"(line 366, column 36)-                              _lhsOaranges =-                                  Seq.empty-                              -- use rule "Order.ag"(line 249, column 33)-                              _lhsOdirectDep =-                                  Seq.empty-                              -- use rule "Order.ag"(line 64, column 70)-                              _lhsOerrors =-                                  Seq.empty-                              -- use rule "Order.ag"(line 296, column 31)-                              _lhsOinstDep =-                                  Seq.empty-                              -- use rule "Order.ag"(line 383, column 43)-                              _lhsOnonts =-                                  []-                              -- use rule "Order.ag"(line 365, column 35)-                              _lhsOntattrs =-                                  Seq.empty-                              -- use rule "Order.ag"(line 239, column 18)-                              _lhsOrules =-                                  Seq.empty-                              -- copy rule (chain)-                              _lhsOacount =-                                  _lhsIacount-                              -- copy rule (chain)-                              _lhsOvcount =-                                  _lhsIvcount-                          in  ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_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 164, column 12)-                         _lhsOgathAltAttrs =-                             [AltAttr field_ attr_ (field_ == _LOC || field_ == _INST)]-                         -- "Order.ag"(line 232, column 12)-                         _lhsOpatternAttrs =-                             [(field_,attr_,(field_ == _LOC || field_ == _INST),_partsIcopy)]-                         -- "Order.ag"(line 540, column 14)-                         _lhsOlocVars =-                             if field_ == _LOC-                                then [attr_]-                                else []-                         -- "Order.ag"(line 543, column 14)-                         _lhsOinstVars =-                             if field_ == _INST-                                then [attr_]-                                else []-                         -- use rule "Order.ag"(line 64, column 70)-                         _lhsOerrors =-                             _patIerrors Seq.>< _partsIerrors-                         -- self rule-                         _copy =-                             Alias field_ attr_ _patIcopy _partsIcopy-                         -- self rule-                         _lhsOcopy =-                             _copy-                         -- copy rule (down)-                         _patOallTypeSigs =-                             _lhsIallTypeSigs-                         -- copy rule (down)-                         _patOaltAttrs =-                             _lhsIaltAttrs-                         -- copy rule (down)-                         _patOcon =-                             _lhsIcon-                         -- copy rule (down)-                         _patOinh =-                             _lhsIinh-                         -- copy rule (down)-                         _patOnt =-                             _lhsInt-                         -- copy rule (down)-                         _patOsyn =-                             _lhsIsyn-                         -- copy rule (down)-                         _partsOallTypeSigs =-                             _lhsIallTypeSigs-                         -- copy rule (down)-                         _partsOaltAttrs =-                             _lhsIaltAttrs-                         -- copy rule (down)-                         _partsOcon =-                             _lhsIcon-                         -- copy rule (down)-                         _partsOinh =-                             _lhsIinh-                         -- copy rule (down)-                         _partsOnt =-                             _lhsInt-                         -- copy rule (down)-                         _partsOsyn =-                             _lhsIsyn-                         ( _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 64, column 70)-                         _lhsOerrors =-                             _patsIerrors-                         -- use rule "Order.ag"(line 150, column 68)-                         _lhsOgathAltAttrs =-                             _patsIgathAltAttrs-                         -- use rule "Order.ag"(line 537, column 86)-                         _lhsOinstVars =-                             _patsIinstVars-                         -- use rule "Order.ag"(line 537, column 48)-                         _lhsOlocVars =-                             _patsIlocVars-                         -- use rule "Order.ag"(line 229, column 42)-                         _lhsOpatternAttrs =-                             _patsIpatternAttrs-                         -- self rule-                         _copy =-                             Constr name_ _patsIcopy-                         -- self rule-                         _lhsOcopy =-                             _copy-                         -- copy rule (down)-                         _patsOallTypeSigs =-                             _lhsIallTypeSigs-                         -- copy rule (down)-                         _patsOaltAttrs =-                             _lhsIaltAttrs-                         -- copy rule (down)-                         _patsOcon =-                             _lhsIcon-                         -- copy rule (down)-                         _patsOinh =-                             _lhsIinh-                         -- copy rule (down)-                         _patsOnt =-                             _lhsInt-                         -- copy rule (down)-                         _patsOsyn =-                             _lhsIsyn-                         ( _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 64, column 70)-                         _lhsOerrors =-                             _patIerrors-                         -- use rule "Order.ag"(line 150, column 68)-                         _lhsOgathAltAttrs =-                             _patIgathAltAttrs-                         -- use rule "Order.ag"(line 537, column 86)-                         _lhsOinstVars =-                             _patIinstVars-                         -- use rule "Order.ag"(line 537, column 48)-                         _lhsOlocVars =-                             _patIlocVars-                         -- use rule "Order.ag"(line 229, column 42)-                         _lhsOpatternAttrs =-                             _patIpatternAttrs-                         -- self rule-                         _copy =-                             Irrefutable _patIcopy-                         -- self rule-                         _lhsOcopy =-                             _copy-                         -- copy rule (down)-                         _patOallTypeSigs =-                             _lhsIallTypeSigs-                         -- copy rule (down)-                         _patOaltAttrs =-                             _lhsIaltAttrs-                         -- copy rule (down)-                         _patOcon =-                             _lhsIcon-                         -- copy rule (down)-                         _patOinh =-                             _lhsIinh-                         -- copy rule (down)-                         _patOnt =-                             _lhsInt-                         -- copy rule (down)-                         _patOsyn =-                             _lhsIsyn-                         ( _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 64, column 70)-                         _lhsOerrors =-                             _patsIerrors-                         -- use rule "Order.ag"(line 150, column 68)-                         _lhsOgathAltAttrs =-                             _patsIgathAltAttrs-                         -- use rule "Order.ag"(line 537, column 86)-                         _lhsOinstVars =-                             _patsIinstVars-                         -- use rule "Order.ag"(line 537, column 48)-                         _lhsOlocVars =-                             _patsIlocVars-                         -- use rule "Order.ag"(line 229, column 42)-                         _lhsOpatternAttrs =-                             _patsIpatternAttrs-                         -- self rule-                         _copy =-                             Product pos_ _patsIcopy-                         -- self rule-                         _lhsOcopy =-                             _copy-                         -- copy rule (down)-                         _patsOallTypeSigs =-                             _lhsIallTypeSigs-                         -- copy rule (down)-                         _patsOaltAttrs =-                             _lhsIaltAttrs-                         -- copy rule (down)-                         _patsOcon =-                             _lhsIcon-                         -- copy rule (down)-                         _patsOinh =-                             _lhsIinh-                         -- copy rule (down)-                         _patsOnt =-                             _lhsInt-                         -- copy rule (down)-                         _patsOsyn =-                             _lhsIsyn-                         ( _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 64, column 70)-                         _lhsOerrors =-                             Seq.empty-                         -- use rule "Order.ag"(line 150, column 68)-                         _lhsOgathAltAttrs =-                             []-                         -- use rule "Order.ag"(line 537, column 86)-                         _lhsOinstVars =-                             []-                         -- use rule "Order.ag"(line 537, column 48)-                         _lhsOlocVars =-                             []-                         -- use rule "Order.ag"(line 229, column 42)-                         _lhsOpatternAttrs =-                             []-                         -- self rule-                         _copy =-                             Underscore pos_-                         -- self rule-                         _lhsOcopy =-                             _copy-                     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 64, column 70)-                          _lhsOerrors =-                              _hdIerrors Seq.>< _tlIerrors-                          -- use rule "Order.ag"(line 150, column 68)-                          _lhsOgathAltAttrs =-                              _hdIgathAltAttrs ++ _tlIgathAltAttrs-                          -- use rule "Order.ag"(line 537, column 86)-                          _lhsOinstVars =-                              _hdIinstVars ++ _tlIinstVars-                          -- use rule "Order.ag"(line 537, column 48)-                          _lhsOlocVars =-                              _hdIlocVars ++ _tlIlocVars-                          -- use rule "Order.ag"(line 229, column 42)-                          _lhsOpatternAttrs =-                              _hdIpatternAttrs ++ _tlIpatternAttrs-                          -- self rule-                          _copy =-                              (:) _hdIcopy _tlIcopy-                          -- self rule-                          _lhsOcopy =-                              _copy-                          -- copy rule (down)-                          _hdOallTypeSigs =-                              _lhsIallTypeSigs-                          -- copy rule (down)-                          _hdOaltAttrs =-                              _lhsIaltAttrs-                          -- copy rule (down)-                          _hdOcon =-                              _lhsIcon-                          -- copy rule (down)-                          _hdOinh =-                              _lhsIinh-                          -- copy rule (down)-                          _hdOnt =-                              _lhsInt-                          -- copy rule (down)-                          _hdOsyn =-                              _lhsIsyn-                          -- copy rule (down)-                          _tlOallTypeSigs =-                              _lhsIallTypeSigs-                          -- copy rule (down)-                          _tlOaltAttrs =-                              _lhsIaltAttrs-                          -- copy rule (down)-                          _tlOcon =-                              _lhsIcon-                          -- copy rule (down)-                          _tlOinh =-                              _lhsIinh-                          -- copy rule (down)-                          _tlOnt =-                              _lhsInt-                          -- copy rule (down)-                          _tlOsyn =-                              _lhsIsyn-                          ( _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 64, column 70)-                          _lhsOerrors =-                              Seq.empty-                          -- use rule "Order.ag"(line 150, column 68)-                          _lhsOgathAltAttrs =-                              []-                          -- use rule "Order.ag"(line 537, column 86)-                          _lhsOinstVars =-                              []-                          -- use rule "Order.ag"(line 537, column 48)-                          _lhsOlocVars =-                              []-                          -- use rule "Order.ag"(line 229, column 42)-                          _lhsOpatternAttrs =-                              []-                          -- self rule-                          _copy =-                              []-                          -- self rule-                          _lhsOcopy =-                              _copy-                      in  ( _lhsOcopy,_lhsOerrors,_lhsOgathAltAttrs,_lhsOinstVars,_lhsOlocVars,_lhsOpatternAttrs))) )--- Production ---------------------------------------------------{--   visit 0:-      inherited attributes:-         allnts               : [Identifier]-         cVisitsMap           : CVisitsMap-         inh                  : Attributes-         manualAttrDepMap     : AttrOrderMap-         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-         cProduction          : CProduction-         cons                 : [ConstructorIdent]-         directDep            : Seq Edge-         errors               : Seq Error-         instDep              : Seq Edge-         rules                : Seq (Vertex,CRule)-   alternatives:-      alternative Production:-         child con            : {ConstructorIdent}-         child children       : Children -         child rules          : Rules -         child typeSigs       : TypeSigs -         visit 0:-            local gathAltAttrs : _-            local inhRules    : _-            local gathRules   : _-            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]) ->-                                      CVisitsMap ->-                                      Attributes ->-                                      AttrOrderMap ->-                                      Identifier ->-                                      Bool ->-                                      Bool ->-                                      Bool ->-                                      Bool ->-                                      Bool ->-                                      Bool ->-                                      Bool ->-                                      Bool ->-                                      Bool ->-                                      String ->-                                      Attributes ->-                                      Int ->-                                      ( (Seq Edge),CProduction,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq (Vertex,CRule)),Int))-data Inh_Production  = Inh_Production {allnts_Inh_Production :: !([Identifier]),cVisitsMap_Inh_Production :: !(CVisitsMap),inh_Inh_Production :: !(Attributes),manualAttrDepMap_Inh_Production :: !(AttrOrderMap),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),cProduction_Syn_Production :: !(CProduction),cons_Syn_Production :: !([ConstructorIdent]),directDep_Syn_Production :: !(Seq Edge),errors_Syn_Production :: !(Seq Error),instDep_Syn_Production :: !(Seq Edge),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 _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount )  =-    (let ( _lhsOadditionalDep,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOrules,_lhsOvcount) =-             (sem _lhsIallnts _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _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 _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _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-                     _lhsIcVisitsMap-                     _lhsIinh-                     _lhsImanualAttrDepMap-                     _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-                            _rulesOaltAttrs :: (Map AltAttr Vertex)-                            _rulesOchildNts :: (Map Identifier NontermIdent)-                            _rulesOchildInhs :: (Map Identifier Attributes)-                            _lhsOrules :: (Seq (Vertex,CRule))-                            _lhsOvcount :: Int-                            _rulesOsynsOfChildren :: (Map Identifier Attributes)-                            _lhsOcons :: ([ConstructorIdent])-                            _typeSigsOtypeSigs :: (Map Identifier Type)-                            _rulesOallTypeSigs :: (Map Identifier Type)-                            _lhsOcProduction :: CProduction-                            _lhsOadditionalDep :: (Seq Edge)-                            _lhsOdirectDep :: (Seq Edge)-                            _lhsOerrors :: (Seq Error)-                            _lhsOinstDep :: (Seq Edge)-                            _childrenOallfields :: ([(Identifier,Type,Bool)])-                            _childrenOallnts :: ([Identifier])-                            _childrenOattrs :: ([(Identifier,Identifier)])-                            _childrenOinh :: Attributes-                            _childrenOnt :: Identifier-                            _childrenOo_unbox :: Bool-                            _childrenOsyn :: Attributes-                            _rulesOallfields :: ([(Identifier,Type,Bool)])-                            _rulesOallnts :: ([Identifier])-                            _rulesOattrs :: ([(Identifier,Identifier)])-                            _rulesOinh :: Attributes-                            _rulesOmanualAttrDepMap :: AttrOrderMap-                            _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)])-                            _childrenIcollectChildrenSyns :: (Map Identifier Attributes )-                            _childrenIerrors :: (Seq Error)-                            _childrenIfields :: ([(Identifier,Type,Bool)])-                            _childrenIgathAltAttrs :: ([AltAttr])-                            _childrenIgathRules :: (Seq CRule)-                            _childrenIinhs :: (Seq (Identifier,Attributes))-                            _childrenInts :: (Seq (Identifier,NontermIdent))-                            _childrenIsinglevisits :: ([CRule])-                            _childrenIterminals :: ([Identifier])-                            _rulesIadditionalDep :: (Seq Edge)-                            _rulesIdirectDep :: (Seq Edge)-                            _rulesIerrors :: (Seq Error)-                            _rulesIgathAltAttrs :: ([AltAttr])-                            _rulesIgathRules :: (Seq CRule)-                            _rulesIinstDep :: (Seq Edge)-                            _rulesIinstVars :: ([Identifier])-                            _rulesIlocVars :: ([Identifier])-                            _typeSigsItypeSigs :: (Map Identifier Type)-                            -- "Order.ag"(line 73, column 16)-                            _childrenOcon =-                                con_-                            -- "Order.ag"(line 75, column 16)-                            _rulesOcon =-                                con_-                            -- "Order.ag"(line 152, column 18)-                            _gathAltAttrs =-                                [ AltAttr _LHS inh True | inh <- Map.keys _lhsIinh ]-                                 ++ _childrenIgathAltAttrs-                                 ++ _rulesIgathAltAttrs-                            -- "Order.ag"(line 168, column 17)-                            _rulesOaltAttrs =-                                Map.fromList (zip _gathAltAttrs [_lhsIvcount..])-                            -- "Order.ag"(line 181, column 18)-                            _rulesOchildNts =-                                Map.fromList (toList _childrenInts)-                            -- "Order.ag"(line 182, column 19)-                            _rulesOchildInhs =-                                Map.fromList (toList _childrenIinhs)-                            -- "Order.ag"(line 188, column 18)-                            _inhRules =-                                [ cRuleLhsInh inh _lhsInt con_ tp | (inh,tp) <- Map.assocs _lhsIinh ]-                            -- "Order.ag"(line 189, column 19)-                            _gathRules =-                                _inhRules ++ toList (_childrenIgathRules Seq.>< _rulesIgathRules)-                            -- "Order.ag"(line 243, column 18)-                            _lhsOrules =-                                Seq.fromList (zip [_lhsIvcount..] _gathRules)-                            -- "Order.ag"(line 244, column 19)-                            _lhsOvcount =-                                _lhsIvcount + length _gathRules-                            -- "Order.ag"(line 313, column 17)-                            _rulesOsynsOfChildren =-                                _childrenIcollectChildrenSyns-                            -- "Order.ag"(line 388, column 18)-                            _lhsOcons =-                                [con_]-                            -- "Order.ag"(line 395, column 16)-                            _typeSigsOtypeSigs =-                                Map.empty-                            -- "Order.ag"(line 401, column 17)-                            _rulesOallTypeSigs =-                                _typeSigsItypeSigs-                            -- "Order.ag"(line 467, column 17)-                            _cVisits =-                                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]-                            -- "Order.ag"(line 493, column 18)-                            _lhsOcProduction =-                                CProduction con_ _cVisits _childrenIfields _childrenIterminals-                            -- "Order.ag"(line 517, column 16)-                            _allfields =-                                _childrenIfields-                            -- "Order.ag"(line 517, column 16)-                            _attrs =-                                map ((,) _LOC)  _rulesIlocVars ++-                                map ((,) _INST) _rulesIinstVars ++-                                map ((,) _LHS)  _inhnames ++-                                concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]-                            -- "Order.ag"(line 517, column 16)-                            _inhnames =-                                Map.keys _lhsIinh-                            -- "Order.ag"(line 517, column 16)-                            _synnames =-                                Map.keys _lhsIsyn-                            -- use rule "Order.ag"(line 263, column 71)-                            _lhsOadditionalDep =-                                _rulesIadditionalDep-                            -- use rule "Order.ag"(line 249, column 33)-                            _lhsOdirectDep =-                                _rulesIdirectDep-                            -- use rule "Order.ag"(line 64, column 70)-                            _lhsOerrors =-                                _childrenIerrors Seq.>< _rulesIerrors-                            -- use rule "Order.ag"(line 296, column 31)-                            _lhsOinstDep =-                                _rulesIinstDep-                            -- copy rule (from local)-                            _childrenOallfields =-                                _allfields-                            -- copy rule (down)-                            _childrenOallnts =-                                _lhsIallnts-                            -- copy rule (from local)-                            _childrenOattrs =-                                _attrs-                            -- copy rule (down)-                            _childrenOinh =-                                _lhsIinh-                            -- copy rule (down)-                            _childrenOnt =-                                _lhsInt-                            -- copy rule (down)-                            _childrenOo_unbox =-                                _lhsIo_unbox-                            -- copy rule (down)-                            _childrenOsyn =-                                _lhsIsyn-                            -- copy rule (from local)-                            _rulesOallfields =-                                _allfields-                            -- copy rule (down)-                            _rulesOallnts =-                                _lhsIallnts-                            -- copy rule (from local)-                            _rulesOattrs =-                                _attrs-                            -- copy rule (down)-                            _rulesOinh =-                                _lhsIinh-                            -- copy rule (down)-                            _rulesOmanualAttrDepMap =-                                _lhsImanualAttrDepMap-                            -- copy rule (down)-                            _rulesOnt =-                                _lhsInt-                            -- copy rule (down)-                            _rulesOo_case =-                                _lhsIo_case-                            -- copy rule (down)-                            _rulesOo_cata =-                                _lhsIo_cata-                            -- copy rule (down)-                            _rulesOo_dovisit =-                                _lhsIo_dovisit-                            -- copy rule (down)-                            _rulesOo_newtypes =-                                _lhsIo_newtypes-                            -- copy rule (down)-                            _rulesOo_rename =-                                _lhsIo_rename-                            -- copy rule (down)-                            _rulesOo_sem =-                                _lhsIo_sem-                            -- copy rule (down)-                            _rulesOo_sig =-                                _lhsIo_sig-                            -- copy rule (down)-                            _rulesOo_wantvisit =-                                _lhsIo_wantvisit-                            -- copy rule (down)-                            _rulesOprefix =-                                _lhsIprefix-                            -- copy rule (down)-                            _rulesOsyn =-                                _lhsIsyn-                            ( _childrenIattributes,_childrenIcollectChildrenSyns,_childrenIerrors,_childrenIfields,_childrenIgathAltAttrs,_childrenIgathRules,_childrenIinhs,_childrenInts,_childrenIsinglevisits,_childrenIterminals) =-                                (children_ _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOnt _childrenOo_unbox _childrenOsyn )-                            ( _rulesIadditionalDep,_rulesIdirectDep,_rulesIerrors,_rulesIgathAltAttrs,_rulesIgathRules,_rulesIinstDep,_rulesIinstVars,_rulesIlocVars) =-                                (rules_ _rulesOallTypeSigs _rulesOallfields _rulesOallnts _rulesOaltAttrs _rulesOattrs _rulesOchildInhs _rulesOchildNts _rulesOcon _rulesOinh _rulesOmanualAttrDepMap _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,_lhsOcProduction,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOrules,_lhsOvcount))) )--- Productions --------------------------------------------------{--   visit 0:-      inherited attributes:-         allnts               : [Identifier]-         cVisitsMap           : CVisitsMap-         inh                  : Attributes-         manualAttrDepMap     : AttrOrderMap-         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-         cProductions         : CProductions-         cons                 : [ConstructorIdent]-         directDep            : Seq Edge-         errors               : Seq Error-         instDep              : Seq Edge-         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]) ->-                                        CVisitsMap ->-                                        Attributes ->-                                        AttrOrderMap ->-                                        Identifier ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        Bool ->-                                        String ->-                                        Attributes ->-                                        Int ->-                                        ( (Seq Edge),CProductions,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),(Seq (Vertex,CRule)),Int))-data Inh_Productions  = Inh_Productions {allnts_Inh_Productions :: !([Identifier]),cVisitsMap_Inh_Productions :: !(CVisitsMap),inh_Inh_Productions :: !(Attributes),manualAttrDepMap_Inh_Productions :: !(AttrOrderMap),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),cProductions_Syn_Productions :: !(CProductions),cons_Syn_Productions :: !([ConstructorIdent]),directDep_Syn_Productions :: !(Seq Edge),errors_Syn_Productions :: !(Seq Error),instDep_Syn_Productions :: !(Seq Edge),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 _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIvcount )  =-    (let ( _lhsOadditionalDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOrules,_lhsOvcount) =-             (sem _lhsIallnts _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _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 _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOrules _lhsOvcount ))-sem_Productions_Cons :: T_Production  ->-                        T_Productions  ->-                        T_Productions -sem_Productions_Cons (T_Production hd_ ) (T_Productions tl_ )  =-    (T_Productions (\ _lhsIallnts-                      _lhsIcVisitsMap-                      _lhsIinh-                      _lhsImanualAttrDepMap-                      _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)-                             _lhsOcons :: ([ConstructorIdent])-                             _lhsOdirectDep :: (Seq Edge)-                             _lhsOerrors :: (Seq Error)-                             _lhsOinstDep :: (Seq Edge)-                             _lhsOrules :: (Seq (Vertex,CRule))-                             _lhsOvcount :: Int-                             _hdOallnts :: ([Identifier])-                             _hdOcVisitsMap :: CVisitsMap-                             _hdOinh :: Attributes-                             _hdOmanualAttrDepMap :: AttrOrderMap-                             _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])-                             _tlOcVisitsMap :: CVisitsMap-                             _tlOinh :: Attributes-                             _tlOmanualAttrDepMap :: AttrOrderMap-                             _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)-                             _hdIcProduction :: CProduction-                             _hdIcons :: ([ConstructorIdent])-                             _hdIdirectDep :: (Seq Edge)-                             _hdIerrors :: (Seq Error)-                             _hdIinstDep :: (Seq Edge)-                             _hdIrules :: (Seq (Vertex,CRule))-                             _hdIvcount :: Int-                             _tlIadditionalDep :: (Seq Edge)-                             _tlIcProductions :: CProductions-                             _tlIcons :: ([ConstructorIdent])-                             _tlIdirectDep :: (Seq Edge)-                             _tlIerrors :: (Seq Error)-                             _tlIinstDep :: (Seq Edge)-                             _tlIrules :: (Seq (Vertex,CRule))-                             _tlIvcount :: Int-                             -- "Order.ag"(line 490, column 12)-                             _lhsOcProductions =-                                 _hdIcProduction : _tlIcProductions-                             -- use rule "Order.ag"(line 263, column 71)-                             _lhsOadditionalDep =-                                 _hdIadditionalDep Seq.>< _tlIadditionalDep-                             -- use rule "Order.ag"(line 386, column 40)-                             _lhsOcons =-                                 _hdIcons ++ _tlIcons-                             -- use rule "Order.ag"(line 249, column 33)-                             _lhsOdirectDep =-                                 _hdIdirectDep Seq.>< _tlIdirectDep-                             -- use rule "Order.ag"(line 64, column 70)-                             _lhsOerrors =-                                 _hdIerrors Seq.>< _tlIerrors-                             -- use rule "Order.ag"(line 296, column 31)-                             _lhsOinstDep =-                                 _hdIinstDep Seq.>< _tlIinstDep-                             -- use rule "Order.ag"(line 239, column 18)-                             _lhsOrules =-                                 _hdIrules Seq.>< _tlIrules-                             -- copy rule (up)-                             _lhsOvcount =-                                 _tlIvcount-                             -- copy rule (down)-                             _hdOallnts =-                                 _lhsIallnts-                             -- copy rule (down)-                             _hdOcVisitsMap =-                                 _lhsIcVisitsMap-                             -- copy rule (down)-                             _hdOinh =-                                 _lhsIinh-                             -- copy rule (down)-                             _hdOmanualAttrDepMap =-                                 _lhsImanualAttrDepMap-                             -- copy rule (down)-                             _hdOnt =-                                 _lhsInt-                             -- copy rule (down)-                             _hdOo_case =-                                 _lhsIo_case-                             -- copy rule (down)-                             _hdOo_cata =-                                 _lhsIo_cata-                             -- copy rule (down)-                             _hdOo_dovisit =-                                 _lhsIo_dovisit-                             -- copy rule (down)-                             _hdOo_newtypes =-                                 _lhsIo_newtypes-                             -- copy rule (down)-                             _hdOo_rename =-                                 _lhsIo_rename-                             -- copy rule (down)-                             _hdOo_sem =-                                 _lhsIo_sem-                             -- copy rule (down)-                             _hdOo_sig =-                                 _lhsIo_sig-                             -- copy rule (down)-                             _hdOo_unbox =-                                 _lhsIo_unbox-                             -- copy rule (down)-                             _hdOo_wantvisit =-                                 _lhsIo_wantvisit-                             -- copy rule (down)-                             _hdOprefix =-                                 _lhsIprefix-                             -- copy rule (down)-                             _hdOsyn =-                                 _lhsIsyn-                             -- copy rule (down)-                             _hdOvcount =-                                 _lhsIvcount-                             -- copy rule (down)-                             _tlOallnts =-                                 _lhsIallnts-                             -- copy rule (down)-                             _tlOcVisitsMap =-                                 _lhsIcVisitsMap-                             -- copy rule (down)-                             _tlOinh =-                                 _lhsIinh-                             -- copy rule (down)-                             _tlOmanualAttrDepMap =-                                 _lhsImanualAttrDepMap-                             -- copy rule (down)-                             _tlOnt =-                                 _lhsInt-                             -- copy rule (down)-                             _tlOo_case =-                                 _lhsIo_case-                             -- copy rule (down)-                             _tlOo_cata =-                                 _lhsIo_cata-                             -- copy rule (down)-                             _tlOo_dovisit =-                                 _lhsIo_dovisit-                             -- copy rule (down)-                             _tlOo_newtypes =-                                 _lhsIo_newtypes-                             -- copy rule (down)-                             _tlOo_rename =-                                 _lhsIo_rename-                             -- copy rule (down)-                             _tlOo_sem =-                                 _lhsIo_sem-                             -- copy rule (down)-                             _tlOo_sig =-                                 _lhsIo_sig-                             -- copy rule (down)-                             _tlOo_unbox =-                                 _lhsIo_unbox-                             -- copy rule (down)-                             _tlOo_wantvisit =-                                 _lhsIo_wantvisit-                             -- copy rule (down)-                             _tlOprefix =-                                 _lhsIprefix-                             -- copy rule (down)-                             _tlOsyn =-                                 _lhsIsyn-                             -- copy rule (chain)-                             _tlOvcount =-                                 _hdIvcount-                             ( _hdIadditionalDep,_hdIcProduction,_hdIcons,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdIrules,_hdIvcount) =-                                 (hd_ _hdOallnts _hdOcVisitsMap _hdOinh _hdOmanualAttrDepMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOsyn _hdOvcount )-                             ( _tlIadditionalDep,_tlIcProductions,_tlIcons,_tlIdirectDep,_tlIerrors,_tlIinstDep,_tlIrules,_tlIvcount) =-                                 (tl_ _tlOallnts _tlOcVisitsMap _tlOinh _tlOmanualAttrDepMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOsyn _tlOvcount )-                         in  ( _lhsOadditionalDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOrules,_lhsOvcount))) )-sem_Productions_Nil :: T_Productions -sem_Productions_Nil  =-    (T_Productions (\ _lhsIallnts-                      _lhsIcVisitsMap-                      _lhsIinh-                      _lhsImanualAttrDepMap-                      _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)-                             _lhsOcons :: ([ConstructorIdent])-                             _lhsOdirectDep :: (Seq Edge)-                             _lhsOerrors :: (Seq Error)-                             _lhsOinstDep :: (Seq Edge)-                             _lhsOrules :: (Seq (Vertex,CRule))-                             _lhsOvcount :: Int-                             -- "Order.ag"(line 491, column 12)-                             _lhsOcProductions =-                                 []-                             -- use rule "Order.ag"(line 263, column 71)-                             _lhsOadditionalDep =-                                 Seq.empty-                             -- use rule "Order.ag"(line 386, column 40)-                             _lhsOcons =-                                 []-                             -- use rule "Order.ag"(line 249, column 33)-                             _lhsOdirectDep =-                                 Seq.empty-                             -- use rule "Order.ag"(line 64, column 70)-                             _lhsOerrors =-                                 Seq.empty-                             -- use rule "Order.ag"(line 296, column 31)-                             _lhsOinstDep =-                                 Seq.empty-                             -- use rule "Order.ag"(line 239, column 18)-                             _lhsOrules =-                                 Seq.empty-                             -- copy rule (chain)-                             _lhsOvcount =-                                 _lhsIvcount-                         in  ( _lhsOadditionalDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOrules,_lhsOvcount))) )--- Rule ---------------------------------------------------------{--   visit 0:-      inherited attributes:-         allTypeSigs          : Map Identifier Type-         allfields            : [(Identifier,Type,Bool)]-         allnts               : [Identifier]-         altAttrs             : Map AltAttr Vertex-         attrs                : [(Identifier,Identifier)]-         childInhs            : Map Identifier Attributes-         childNts             : Map Identifier NontermIdent-         con                  : Identifier-         inh                  : Attributes-         manualAttrDepMap     : AttrOrderMap-         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:-         additionalDep        : Seq Edge-         directDep            : Seq Edge-         errors               : Seq Error-         gathAltAttrs         : [AltAttr]-         gathRules            : Seq CRule-         instDep              : Seq Edge-         instVars             : [Identifier]-         locVars              : [Identifier]-   alternatives:-      alternative Rule:-         child pattern        : Pattern -         child rhs            : Expression -         child owrt           : {Bool}-         child origin         : {String}-         visit 0:-            local defines     : _-            local gathRules   : _-            local manualDeps  : _--}--- cata-sem_Rule :: Rule  ->-            T_Rule -sem_Rule (Rule _pattern _rhs _owrt _origin )  =-    (sem_Rule_Rule (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin )--- semantic domain-newtype T_Rule  = T_Rule ((Map Identifier Type) ->-                          ([(Identifier,Type,Bool)]) ->-                          ([Identifier]) ->-                          (Map AltAttr Vertex) ->-                          ([(Identifier,Identifier)]) ->-                          (Map Identifier Attributes) ->-                          (Map Identifier NontermIdent) ->-                          Identifier ->-                          Attributes ->-                          AttrOrderMap ->-                          Identifier ->-                          Bool ->-                          Bool ->-                          Bool ->-                          Bool ->-                          Bool ->-                          Bool ->-                          Bool ->-                          Bool ->-                          String ->-                          Attributes ->-                          (Map Identifier Attributes) ->-                          ( (Seq Edge),(Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier])))-data Inh_Rule  = Inh_Rule {allTypeSigs_Inh_Rule :: !(Map Identifier Type),allfields_Inh_Rule :: !([(Identifier,Type,Bool)]),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),manualAttrDepMap_Inh_Rule :: !(AttrOrderMap),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 {additionalDep_Syn_Rule :: !(Seq Edge),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])}-wrap_Rule :: T_Rule  ->-             Inh_Rule  ->-             Syn_Rule -wrap_Rule (T_Rule sem ) (Inh_Rule _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren )  =-    (let ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars) =-             (sem _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren )-     in  (Syn_Rule _lhsOadditionalDep _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars ))-sem_Rule_Rule :: T_Pattern  ->-                 T_Expression  ->-                 Bool ->-                 String ->-                 T_Rule -sem_Rule_Rule (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_  =-    (T_Rule (\ _lhsIallTypeSigs-               _lhsIallfields-               _lhsIallnts-               _lhsIaltAttrs-               _lhsIattrs-               _lhsIchildInhs-               _lhsIchildNts-               _lhsIcon-               _lhsIinh-               _lhsImanualAttrDepMap-               _lhsInt-               _lhsIo_case-               _lhsIo_cata-               _lhsIo_dovisit-               _lhsIo_newtypes-               _lhsIo_rename-               _lhsIo_sem-               _lhsIo_sig-               _lhsIo_wantvisit-               _lhsIprefix-               _lhsIsyn-               _lhsIsynsOfChildren ->-                 (let _lhsOdirectDep :: (Seq Edge)-                      _lhsOadditionalDep :: (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,Bool)])-                      _rhsOallnts :: ([Identifier])-                      _rhsOattrs :: ([(Identifier,Identifier)])-                      _rhsOcon :: 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 197, column 12)-                      _defines =-                          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-                                           ]-                      -- "Order.ag"(line 213, column 12)-                      _gathRules =-                          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-                                          | (field,attr,tp) <- Map.elems _defines-                                          ]-                      -- "Order.ag"(line 251, column 12)-                      _lhsOdirectDep =-                          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 ]-                      -- "Order.ag"(line 269, column 7)-                      _manualDeps =-                          Set.toList $ Map.findWithDefault Set.empty _lhsIcon $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrDepMap-                      -- "Order.ag"(line 271, column 7)-                      _lhsOadditionalDep =-                          Seq.fromList [ (vertexA, vertexB)-                                       | Dependency (fldA,nmA) (fldB,nmB) <- _manualDeps-                                       , let vertexA = findWithErr2 (AltAttr fldA nmA True) _lhsIaltAttrs-                                       , vertexB <- lookupVertices fldB nmB _lhsIaltAttrs-                                       ]-                      -- "Order.ag"(line 299, column 7)-                      _lhsOinstDep =-                          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-                            ]-                      -- use rule "Order.ag"(line 64, column 70)-                      _lhsOerrors =-                          _patternIerrors Seq.>< _rhsIerrors-                      -- use rule "Order.ag"(line 150, column 68)-                      _lhsOgathAltAttrs =-                          _patternIgathAltAttrs-                      -- use rule "Order.ag"(line 186, column 23)-                      _lhsOgathRules =-                          _gathRules-                      -- use rule "Order.ag"(line 537, column 86)-                      _lhsOinstVars =-                          _patternIinstVars-                      -- use rule "Order.ag"(line 537, column 48)-                      _lhsOlocVars =-                          _patternIlocVars-                      -- copy rule (down)-                      _patternOallTypeSigs =-                          _lhsIallTypeSigs-                      -- copy rule (down)-                      _patternOaltAttrs =-                          _lhsIaltAttrs-                      -- copy rule (down)-                      _patternOcon =-                          _lhsIcon-                      -- copy rule (down)-                      _patternOinh =-                          _lhsIinh-                      -- copy rule (down)-                      _patternOnt =-                          _lhsInt-                      -- copy rule (down)-                      _patternOsyn =-                          _lhsIsyn-                      -- copy rule (down)-                      _rhsOallfields =-                          _lhsIallfields-                      -- copy rule (down)-                      _rhsOallnts =-                          _lhsIallnts-                      -- copy rule (down)-                      _rhsOattrs =-                          _lhsIattrs-                      -- copy rule (down)-                      _rhsOcon =-                          _lhsIcon-                      -- copy rule (down)-                      _rhsOnt =-                          _lhsInt-                      ( _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 _rhsOnt )-                  in  ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars))) )--- Rules --------------------------------------------------------{--   visit 0:-      inherited attributes:-         allTypeSigs          : Map Identifier Type-         allfields            : [(Identifier,Type,Bool)]-         allnts               : [Identifier]-         altAttrs             : Map AltAttr Vertex-         attrs                : [(Identifier,Identifier)]-         childInhs            : Map Identifier Attributes-         childNts             : Map Identifier NontermIdent-         con                  : Identifier-         inh                  : Attributes-         manualAttrDepMap     : AttrOrderMap-         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:-         additionalDep        : Seq Edge-         directDep            : Seq Edge-         errors               : Seq Error-         gathAltAttrs         : [AltAttr]-         gathRules            : Seq CRule-         instDep              : Seq Edge-         instVars             : [Identifier]-         locVars              : [Identifier]-   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,Bool)]) ->-                            ([Identifier]) ->-                            (Map AltAttr Vertex) ->-                            ([(Identifier,Identifier)]) ->-                            (Map Identifier Attributes) ->-                            (Map Identifier NontermIdent) ->-                            Identifier ->-                            Attributes ->-                            AttrOrderMap ->-                            Identifier ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            Bool ->-                            String ->-                            Attributes ->-                            (Map Identifier Attributes) ->-                            ( (Seq Edge),(Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier])))-data Inh_Rules  = Inh_Rules {allTypeSigs_Inh_Rules :: !(Map Identifier Type),allfields_Inh_Rules :: !([(Identifier,Type,Bool)]),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),manualAttrDepMap_Inh_Rules :: !(AttrOrderMap),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 {additionalDep_Syn_Rules :: !(Seq Edge),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])}-wrap_Rules :: T_Rules  ->-              Inh_Rules  ->-              Syn_Rules -wrap_Rules (T_Rules sem ) (Inh_Rules _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren )  =-    (let ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars) =-             (sem _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren )-     in  (Syn_Rules _lhsOadditionalDep _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars ))-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-                _lhsImanualAttrDepMap-                _lhsInt-                _lhsIo_case-                _lhsIo_cata-                _lhsIo_dovisit-                _lhsIo_newtypes-                _lhsIo_rename-                _lhsIo_sem-                _lhsIo_sig-                _lhsIo_wantvisit-                _lhsIprefix-                _lhsIsyn-                _lhsIsynsOfChildren ->-                  (let _lhsOadditionalDep :: (Seq Edge)-                       _lhsOdirectDep :: (Seq Edge)-                       _lhsOerrors :: (Seq Error)-                       _lhsOgathAltAttrs :: ([AltAttr])-                       _lhsOgathRules :: (Seq CRule)-                       _lhsOinstDep :: (Seq Edge)-                       _lhsOinstVars :: ([Identifier])-                       _lhsOlocVars :: ([Identifier])-                       _hdOallTypeSigs :: (Map Identifier Type)-                       _hdOallfields :: ([(Identifier,Type,Bool)])-                       _hdOallnts :: ([Identifier])-                       _hdOaltAttrs :: (Map AltAttr Vertex)-                       _hdOattrs :: ([(Identifier,Identifier)])-                       _hdOchildInhs :: (Map Identifier Attributes)-                       _hdOchildNts :: (Map Identifier NontermIdent)-                       _hdOcon :: Identifier-                       _hdOinh :: Attributes-                       _hdOmanualAttrDepMap :: AttrOrderMap-                       _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,Bool)])-                       _tlOallnts :: ([Identifier])-                       _tlOaltAttrs :: (Map AltAttr Vertex)-                       _tlOattrs :: ([(Identifier,Identifier)])-                       _tlOchildInhs :: (Map Identifier Attributes)-                       _tlOchildNts :: (Map Identifier NontermIdent)-                       _tlOcon :: Identifier-                       _tlOinh :: Attributes-                       _tlOmanualAttrDepMap :: AttrOrderMap-                       _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)-                       _hdIadditionalDep :: (Seq Edge)-                       _hdIdirectDep :: (Seq Edge)-                       _hdIerrors :: (Seq Error)-                       _hdIgathAltAttrs :: ([AltAttr])-                       _hdIgathRules :: (Seq CRule)-                       _hdIinstDep :: (Seq Edge)-                       _hdIinstVars :: ([Identifier])-                       _hdIlocVars :: ([Identifier])-                       _tlIadditionalDep :: (Seq Edge)-                       _tlIdirectDep :: (Seq Edge)-                       _tlIerrors :: (Seq Error)-                       _tlIgathAltAttrs :: ([AltAttr])-                       _tlIgathRules :: (Seq CRule)-                       _tlIinstDep :: (Seq Edge)-                       _tlIinstVars :: ([Identifier])-                       _tlIlocVars :: ([Identifier])-                       -- use rule "Order.ag"(line 263, column 71)-                       _lhsOadditionalDep =-                           _hdIadditionalDep Seq.>< _tlIadditionalDep-                       -- use rule "Order.ag"(line 249, column 33)-                       _lhsOdirectDep =-                           _hdIdirectDep Seq.>< _tlIdirectDep-                       -- use rule "Order.ag"(line 64, column 70)-                       _lhsOerrors =-                           _hdIerrors Seq.>< _tlIerrors-                       -- use rule "Order.ag"(line 150, column 68)-                       _lhsOgathAltAttrs =-                           _hdIgathAltAttrs ++ _tlIgathAltAttrs-                       -- use rule "Order.ag"(line 186, column 23)-                       _lhsOgathRules =-                           _hdIgathRules Seq.>< _tlIgathRules-                       -- use rule "Order.ag"(line 296, column 31)-                       _lhsOinstDep =-                           _hdIinstDep Seq.>< _tlIinstDep-                       -- use rule "Order.ag"(line 537, column 86)-                       _lhsOinstVars =-                           _hdIinstVars ++ _tlIinstVars-                       -- use rule "Order.ag"(line 537, column 48)-                       _lhsOlocVars =-                           _hdIlocVars ++ _tlIlocVars-                       -- copy rule (down)-                       _hdOallTypeSigs =-                           _lhsIallTypeSigs-                       -- copy rule (down)-                       _hdOallfields =-                           _lhsIallfields-                       -- copy rule (down)-                       _hdOallnts =-                           _lhsIallnts-                       -- copy rule (down)-                       _hdOaltAttrs =-                           _lhsIaltAttrs-                       -- copy rule (down)-                       _hdOattrs =-                           _lhsIattrs-                       -- copy rule (down)-                       _hdOchildInhs =-                           _lhsIchildInhs-                       -- copy rule (down)-                       _hdOchildNts =-                           _lhsIchildNts-                       -- copy rule (down)-                       _hdOcon =-                           _lhsIcon-                       -- copy rule (down)-                       _hdOinh =-                           _lhsIinh-                       -- copy rule (down)-                       _hdOmanualAttrDepMap =-                           _lhsImanualAttrDepMap-                       -- copy rule (down)-                       _hdOnt =-                           _lhsInt-                       -- copy rule (down)-                       _hdOo_case =-                           _lhsIo_case-                       -- copy rule (down)-                       _hdOo_cata =-                           _lhsIo_cata-                       -- copy rule (down)-                       _hdOo_dovisit =-                           _lhsIo_dovisit-                       -- copy rule (down)-                       _hdOo_newtypes =-                           _lhsIo_newtypes-                       -- copy rule (down)-                       _hdOo_rename =-                           _lhsIo_rename-                       -- copy rule (down)-                       _hdOo_sem =-                           _lhsIo_sem-                       -- copy rule (down)-                       _hdOo_sig =-                           _lhsIo_sig-                       -- copy rule (down)-                       _hdOo_wantvisit =-                           _lhsIo_wantvisit-                       -- copy rule (down)-                       _hdOprefix =-                           _lhsIprefix-                       -- copy rule (down)-                       _hdOsyn =-                           _lhsIsyn-                       -- copy rule (down)-                       _hdOsynsOfChildren =-                           _lhsIsynsOfChildren-                       -- copy rule (down)-                       _tlOallTypeSigs =-                           _lhsIallTypeSigs-                       -- copy rule (down)-                       _tlOallfields =-                           _lhsIallfields-                       -- copy rule (down)-                       _tlOallnts =-                           _lhsIallnts-                       -- copy rule (down)-                       _tlOaltAttrs =-                           _lhsIaltAttrs-                       -- copy rule (down)-                       _tlOattrs =-                           _lhsIattrs-                       -- copy rule (down)-                       _tlOchildInhs =-                           _lhsIchildInhs-                       -- copy rule (down)-                       _tlOchildNts =-                           _lhsIchildNts-                       -- copy rule (down)-                       _tlOcon =-                           _lhsIcon-                       -- copy rule (down)-                       _tlOinh =-                           _lhsIinh-                       -- copy rule (down)-                       _tlOmanualAttrDepMap =-                           _lhsImanualAttrDepMap-                       -- copy rule (down)-                       _tlOnt =-                           _lhsInt-                       -- copy rule (down)-                       _tlOo_case =-                           _lhsIo_case-                       -- copy rule (down)-                       _tlOo_cata =-                           _lhsIo_cata-                       -- copy rule (down)-                       _tlOo_dovisit =-                           _lhsIo_dovisit-                       -- copy rule (down)-                       _tlOo_newtypes =-                           _lhsIo_newtypes-                       -- copy rule (down)-                       _tlOo_rename =-                           _lhsIo_rename-                       -- copy rule (down)-                       _tlOo_sem =-                           _lhsIo_sem-                       -- copy rule (down)-                       _tlOo_sig =-                           _lhsIo_sig-                       -- copy rule (down)-                       _tlOo_wantvisit =-                           _lhsIo_wantvisit-                       -- copy rule (down)-                       _tlOprefix =-                           _lhsIprefix-                       -- copy rule (down)-                       _tlOsyn =-                           _lhsIsyn-                       -- copy rule (down)-                       _tlOsynsOfChildren =-                           _lhsIsynsOfChildren-                       ( _hdIadditionalDep,_hdIdirectDep,_hdIerrors,_hdIgathAltAttrs,_hdIgathRules,_hdIinstDep,_hdIinstVars,_hdIlocVars) =-                           (hd_ _hdOallTypeSigs _hdOallfields _hdOallnts _hdOaltAttrs _hdOattrs _hdOchildInhs _hdOchildNts _hdOcon _hdOinh _hdOmanualAttrDepMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_wantvisit _hdOprefix _hdOsyn _hdOsynsOfChildren )-                       ( _tlIadditionalDep,_tlIdirectDep,_tlIerrors,_tlIgathAltAttrs,_tlIgathRules,_tlIinstDep,_tlIinstVars,_tlIlocVars) =-                           (tl_ _tlOallTypeSigs _tlOallfields _tlOallnts _tlOaltAttrs _tlOattrs _tlOchildInhs _tlOchildNts _tlOcon _tlOinh _tlOmanualAttrDepMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_wantvisit _tlOprefix _tlOsyn _tlOsynsOfChildren )-                   in  ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars))) )-sem_Rules_Nil :: T_Rules -sem_Rules_Nil  =-    (T_Rules (\ _lhsIallTypeSigs-                _lhsIallfields-                _lhsIallnts-                _lhsIaltAttrs-                _lhsIattrs-                _lhsIchildInhs-                _lhsIchildNts-                _lhsIcon-                _lhsIinh-                _lhsImanualAttrDepMap-                _lhsInt-                _lhsIo_case-                _lhsIo_cata-                _lhsIo_dovisit-                _lhsIo_newtypes-                _lhsIo_rename-                _lhsIo_sem-                _lhsIo_sig-                _lhsIo_wantvisit-                _lhsIprefix-                _lhsIsyn-                _lhsIsynsOfChildren ->-                  (let _lhsOadditionalDep :: (Seq Edge)-                       _lhsOdirectDep :: (Seq Edge)-                       _lhsOerrors :: (Seq Error)-                       _lhsOgathAltAttrs :: ([AltAttr])-                       _lhsOgathRules :: (Seq CRule)-                       _lhsOinstDep :: (Seq Edge)-                       _lhsOinstVars :: ([Identifier])-                       _lhsOlocVars :: ([Identifier])-                       -- use rule "Order.ag"(line 263, column 71)-                       _lhsOadditionalDep =-                           Seq.empty-                       -- use rule "Order.ag"(line 249, column 33)-                       _lhsOdirectDep =-                           Seq.empty-                       -- use rule "Order.ag"(line 64, column 70)-                       _lhsOerrors =-                           Seq.empty-                       -- use rule "Order.ag"(line 150, column 68)-                       _lhsOgathAltAttrs =-                           []-                       -- use rule "Order.ag"(line 186, column 23)-                       _lhsOgathRules =-                           Seq.empty-                       -- use rule "Order.ag"(line 296, column 31)-                       _lhsOinstDep =-                           Seq.empty-                       -- use rule "Order.ag"(line 537, column 86)-                       _lhsOinstVars =-                           []-                       -- use rule "Order.ag"(line 537, column 48)-                       _lhsOlocVars =-                           []-                   in  ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars))) )--- 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 397, column 13)-                         _lhsOtypeSigs =-                             Map.insert name_ tp_ _lhsItypeSigs-                     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 =-                              _tlItypeSigs-                          -- copy rule (down)-                          _hdOtypeSigs =-                              _lhsItypeSigs-                          -- copy rule (chain)-                          _tlOtypeSigs =-                              _hdItypeSigs-                          ( _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 =-                              _lhsItypeSigs+{-# 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 118 "Order.ag" #-}++getNtName :: Type -> NontermIdent+getNtName (NT nt _) = maybe nt id (deforestedNt nt)+getNtName _         = nullIdent+{-# LINE 83 "../src-derived/Order.hs" #-}++{-# LINE 146 "Order.ag" #-}++data AltAttr = AltAttr Identifier Identifier Bool +               deriving (Eq, Ord, Show)+{-# LINE 89 "../src-derived/Order.hs" #-}++{-# LINE 218 "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 100 "../src-derived/Order.hs" #-}++{-# LINE 278 "Order.ag" #-}++lookupVertices :: Identifier -> Identifier -> Map AltAttr Int -> [Int]+lookupVertices fld nm attrs+  = catMaybes (  [Map.lookup (AltAttr fld nm False) attrs]  -- look for all "out" attributes+              ++ if fld == _LOC+                 then [Map.lookup (AltAttr fld nm True) attrs]+                 else []+              )+{-# LINE 111 "../src-derived/Order.hs" #-}++{-# LINE 614 "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 231 "../src-derived/Order.hs" #-}+-- Child -------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allfields            : [(Identifier,Type,Bool)]+         allnts               : [Identifier]+         attrs                : [(Identifier,Identifier)]+         con                  : Identifier+         inh                  : Attributes+         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,Bool)+         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 higherOrder    : {Bool}+         visit 0:+            local maptolocal  : _+            local gathRules   : _+-}+-- cata+sem_Child :: Child  ->+             T_Child +sem_Child (Child _name _tp _inh _syn _higherOrder )  =+    (sem_Child_Child _name _tp _inh _syn _higherOrder )+-- semantic domain+newtype T_Child  = T_Child (([(Identifier,Type,Bool)]) ->+                            ([Identifier]) ->+                            ([(Identifier,Identifier)]) ->+                            Identifier ->+                            Attributes ->+                            Identifier ->+                            Bool ->+                            Attributes ->+                            ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),((Identifier,Type,Bool)),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))+data Inh_Child  = Inh_Child {allfields_Inh_Child :: !([(Identifier,Type,Bool)]),allnts_Inh_Child :: !([Identifier]),attrs_Inh_Child :: !([(Identifier,Identifier)]),con_Inh_Child :: !(Identifier),inh_Inh_Child :: !(Attributes),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,Bool)),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 _lhsInt _lhsIo_unbox _lhsIsyn )  =+    (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) =+             (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _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 ->+                   Bool ->+                   T_Child +sem_Child_Child name_ tp_ inh_ syn_ higherOrder_  =+    (T_Child (\ _lhsIallfields+                _lhsIallnts+                _lhsIattrs+                _lhsIcon+                _lhsIinh+                _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,Bool))+                       _lhsOerrors :: (Seq Error)+                       _lhsOgathRules :: (Seq CRule)+                       -- "Order.ag"(line 157, column 13)+                       _maptolocal =+                           {-# LINE 157 "Order.ag" #-}+                           case tp_ of+                             NT nt _ -> Map.null syn_+                             _       -> True+                           {-# LINE 323 "Order.hs" #-}+                       -- "Order.ag"(line 160, column 13)+                       _lhsOgathAltAttrs =+                           {-# LINE 160 "Order.ag" #-}+                           if  _maptolocal+                               then [ AltAttr _LOC name_ True ]+                               else [ AltAttr name_ syn True | syn <- Map.keys syn_ ]+                           {-# LINE 330 "Order.hs" #-}+                       -- "Order.ag"(line 175, column 13)+                       _lhsOnts =+                           {-# LINE 175 "Order.ag" #-}+                           Seq.singleton (name_,getNtName tp_)+                           {-# LINE 335 "Order.hs" #-}+                       -- "Order.ag"(line 176, column 13)+                       _lhsOinhs =+                           {-# LINE 176 "Order.ag" #-}+                           Seq.singleton (name_,inh_)+                           {-# LINE 340 "Order.hs" #-}+                       -- "Order.ag"(line 192, column 13)+                       _gathRules =+                           {-# LINE 192 "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 347 "Order.hs" #-}+                       -- "Order.ag"(line 330, column 12)+                       _lhsOcollectChildrenSyns =+                           {-# LINE 330 "Order.ag" #-}+                           Map.singleton name_ syn_+                           {-# LINE 352 "Order.hs" #-}+                       -- "Order.ag"(line 331, column 12)+                       _lhsOcollectChildrenInhs =+                           {-# LINE 331 "Order.ag" #-}+                           Map.singleton name_ inh_+                           {-# LINE 357 "Order.hs" #-}+                       -- "Order.ag"(line 541, column 11)+                       _lhsOsinglevisits =+                           {-# LINE 541 "Order.ag" #-}+                           if  _maptolocal+                               then []+                               else [CChildVisit name_ (getNtName tp_) 0 inh_ syn_ True]+                           {-# LINE 364 "Order.hs" #-}+                       -- "Order.ag"(line 565, column 11)+                       _lhsOterminals =+                           {-# LINE 565 "Order.ag" #-}+                           if _maptolocal+                           then [name_]+                           else []+                           {-# LINE 371 "Order.hs" #-}+                       -- "Order.ag"(line 594, column 11)+                       _lhsOattributes =+                           {-# LINE 594 "Order.ag" #-}+                           [(name_, inh_, syn_)]+                           {-# LINE 376 "Order.hs" #-}+                       -- "Order.ag"(line 598, column 11)+                       _lhsOfield =+                           {-# LINE 598 "Order.ag" #-}+                           (name_, tp_, higherOrder_)+                           {-# LINE 381 "Order.hs" #-}+                       -- use rule "Order.ag"(line 64, column 70)+                       _lhsOerrors =+                           {-# LINE 64 "Order.ag" #-}+                           Seq.empty+                           {-# LINE 386 "Order.hs" #-}+                       -- use rule "Order.ag"(line 186, column 23)+                       _lhsOgathRules =+                           {-# LINE 186 "Order.ag" #-}+                           _gathRules+                           {-# LINE 391 "Order.hs" #-}+                   in  ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfield,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )+-- Children ----------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allfields            : [(Identifier,Type,Bool)]+         allnts               : [Identifier]+         attrs                : [(Identifier,Identifier)]+         con                  : Identifier+         inh                  : Attributes+         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,Bool)]+         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,Bool)]) ->+                                  ([Identifier]) ->+                                  ([(Identifier,Identifier)]) ->+                                  Identifier ->+                                  Attributes ->+                                  Identifier ->+                                  Bool ->+                                  Attributes ->+                                  ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),([(Identifier,Type,Bool)]),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))+data Inh_Children  = Inh_Children {allfields_Inh_Children :: !([(Identifier,Type,Bool)]),allnts_Inh_Children :: !([Identifier]),attrs_Inh_Children :: !([(Identifier,Identifier)]),con_Inh_Children :: !(Identifier),inh_Inh_Children :: !(Attributes),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,Bool)]),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 _lhsInt _lhsIo_unbox _lhsIsyn )  =+    (let ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals) =+             (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _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+                   _lhsInt+                   _lhsIo_unbox+                   _lhsIsyn ->+                     (let _lhsOfields :: ([(Identifier,Type,Bool)])+                          _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,Bool)])+                          _hdOallnts :: ([Identifier])+                          _hdOattrs :: ([(Identifier,Identifier)])+                          _hdOcon :: Identifier+                          _hdOinh :: Attributes+                          _hdOnt :: Identifier+                          _hdOo_unbox :: Bool+                          _hdOsyn :: Attributes+                          _tlOallfields :: ([(Identifier,Type,Bool)])+                          _tlOallnts :: ([Identifier])+                          _tlOattrs :: ([(Identifier,Identifier)])+                          _tlOcon :: Identifier+                          _tlOinh :: Attributes+                          _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,Bool))+                          _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,Bool)])+                          _tlIgathAltAttrs :: ([AltAttr])+                          _tlIgathRules :: (Seq CRule)+                          _tlIinhs :: (Seq (Identifier,Attributes))+                          _tlInts :: (Seq (Identifier,NontermIdent))+                          _tlIsinglevisits :: ([CRule])+                          _tlIterminals :: ([Identifier])+                          -- "Order.ag"(line 601, column 11)+                          _lhsOfields =+                              {-# LINE 601 "Order.ag" #-}+                              _hdIfield : _tlIfields+                              {-# LINE 512 "Order.hs" #-}+                          -- use rule "Order.ag"(line 592, column 32)+                          _lhsOattributes =+                              {-# LINE 592 "Order.ag" #-}+                              _hdIattributes ++ _tlIattributes+                              {-# LINE 517 "Order.hs" #-}+                          -- use rule "Order.ag"(line 328, column 68)+                          _lhsOcollectChildrenInhs =+                              {-# LINE 328 "Order.ag" #-}+                              _hdIcollectChildrenInhs `Map.union` _tlIcollectChildrenInhs+                              {-# LINE 522 "Order.hs" #-}+                          -- use rule "Order.ag"(line 328, column 68)+                          _lhsOcollectChildrenSyns =+                              {-# LINE 328 "Order.ag" #-}+                              _hdIcollectChildrenSyns `Map.union` _tlIcollectChildrenSyns+                              {-# LINE 527 "Order.hs" #-}+                          -- use rule "Order.ag"(line 64, column 70)+                          _lhsOerrors =+                              {-# LINE 64 "Order.ag" #-}+                              _hdIerrors Seq.>< _tlIerrors+                              {-# LINE 532 "Order.hs" #-}+                          -- use rule "Order.ag"(line 150, column 68)+                          _lhsOgathAltAttrs =+                              {-# LINE 150 "Order.ag" #-}+                              _hdIgathAltAttrs ++ _tlIgathAltAttrs+                              {-# LINE 537 "Order.hs" #-}+                          -- use rule "Order.ag"(line 186, column 23)+                          _lhsOgathRules =+                              {-# LINE 186 "Order.ag" #-}+                              _hdIgathRules Seq.>< _tlIgathRules+                              {-# LINE 542 "Order.hs" #-}+                          -- use rule "Order.ag"(line 173, column 20)+                          _lhsOinhs =+                              {-# LINE 173 "Order.ag" #-}+                              _hdIinhs Seq.>< _tlIinhs+                              {-# LINE 547 "Order.hs" #-}+                          -- use rule "Order.ag"(line 172, column 19)+                          _lhsOnts =+                              {-# LINE 172 "Order.ag" #-}+                              _hdInts Seq.>< _tlInts+                              {-# LINE 552 "Order.hs" #-}+                          -- use rule "Order.ag"(line 539, column 40)+                          _lhsOsinglevisits =+                              {-# LINE 539 "Order.ag" #-}+                              _hdIsinglevisits ++ _tlIsinglevisits+                              {-# LINE 557 "Order.hs" #-}+                          -- use rule "Order.ag"(line 563, column 38)+                          _lhsOterminals =+                              {-# LINE 563 "Order.ag" #-}+                              _hdIterminals ++ _tlIterminals+                              {-# LINE 562 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOallfields =+                              {-# LINE 581 "Order.ag" #-}+                              _lhsIallfields+                              {-# LINE 567 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOallnts =+                              {-# LINE 574 "Order.ag" #-}+                              _lhsIallnts+                              {-# LINE 572 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOattrs =+                              {-# LINE 581 "Order.ag" #-}+                              _lhsIattrs+                              {-# LINE 577 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOcon =+                              {-# LINE 70 "Order.ag" #-}+                              _lhsIcon+                              {-# LINE 582 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOinh =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsIinh+                              {-# LINE 587 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOnt =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsInt+                              {-# LINE 592 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOo_unbox =+                              {-# LINE 99 "Order.ag" #-}+                              _lhsIo_unbox+                              {-# LINE 597 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOsyn =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsIsyn+                              {-# LINE 602 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOallfields =+                              {-# LINE 581 "Order.ag" #-}+                              _lhsIallfields+                              {-# LINE 607 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOallnts =+                              {-# LINE 574 "Order.ag" #-}+                              _lhsIallnts+                              {-# LINE 612 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOattrs =+                              {-# LINE 581 "Order.ag" #-}+                              _lhsIattrs+                              {-# LINE 617 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOcon =+                              {-# LINE 70 "Order.ag" #-}+                              _lhsIcon+                              {-# LINE 622 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOinh =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsIinh+                              {-# LINE 627 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOnt =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsInt+                              {-# LINE 632 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOo_unbox =+                              {-# LINE 99 "Order.ag" #-}+                              _lhsIo_unbox+                              {-# LINE 637 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOsyn =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsIsyn+                              {-# LINE 642 "Order.hs" #-}+                          ( _hdIattributes,_hdIcollectChildrenInhs,_hdIcollectChildrenSyns,_hdIerrors,_hdIfield,_hdIgathAltAttrs,_hdIgathRules,_hdIinhs,_hdInts,_hdIsinglevisits,_hdIterminals) =+                              (hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOnt _hdOo_unbox _hdOsyn )+                          ( _tlIattributes,_tlIcollectChildrenInhs,_tlIcollectChildrenSyns,_tlIerrors,_tlIfields,_tlIgathAltAttrs,_tlIgathRules,_tlIinhs,_tlInts,_tlIsinglevisits,_tlIterminals) =+                              (tl_ _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _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+                   _lhsInt+                   _lhsIo_unbox+                   _lhsIsyn ->+                     (let _lhsOfields :: ([(Identifier,Type,Bool)])+                          _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 602, column 11)+                          _lhsOfields =+                              {-# LINE 602 "Order.ag" #-}+                              []+                              {-# LINE 673 "Order.hs" #-}+                          -- use rule "Order.ag"(line 592, column 32)+                          _lhsOattributes =+                              {-# LINE 592 "Order.ag" #-}+                              []+                              {-# LINE 678 "Order.hs" #-}+                          -- use rule "Order.ag"(line 328, column 68)+                          _lhsOcollectChildrenInhs =+                              {-# LINE 328 "Order.ag" #-}+                              Map.empty+                              {-# LINE 683 "Order.hs" #-}+                          -- use rule "Order.ag"(line 328, column 68)+                          _lhsOcollectChildrenSyns =+                              {-# LINE 328 "Order.ag" #-}+                              Map.empty+                              {-# LINE 688 "Order.hs" #-}+                          -- use rule "Order.ag"(line 64, column 70)+                          _lhsOerrors =+                              {-# LINE 64 "Order.ag" #-}+                              Seq.empty+                              {-# LINE 693 "Order.hs" #-}+                          -- use rule "Order.ag"(line 150, column 68)+                          _lhsOgathAltAttrs =+                              {-# LINE 150 "Order.ag" #-}+                              []+                              {-# LINE 698 "Order.hs" #-}+                          -- use rule "Order.ag"(line 186, column 23)+                          _lhsOgathRules =+                              {-# LINE 186 "Order.ag" #-}+                              Seq.empty+                              {-# LINE 703 "Order.hs" #-}+                          -- use rule "Order.ag"(line 173, column 20)+                          _lhsOinhs =+                              {-# LINE 173 "Order.ag" #-}+                              Seq.empty+                              {-# LINE 708 "Order.hs" #-}+                          -- use rule "Order.ag"(line 172, column 19)+                          _lhsOnts =+                              {-# LINE 172 "Order.ag" #-}+                              Seq.empty+                              {-# LINE 713 "Order.hs" #-}+                          -- use rule "Order.ag"(line 539, column 40)+                          _lhsOsinglevisits =+                              {-# LINE 539 "Order.ag" #-}+                              []+                              {-# LINE 718 "Order.hs" #-}+                          -- use rule "Order.ag"(line 563, column 38)+                          _lhsOterminals =+                              {-# LINE 563 "Order.ag" #-}+                              []+                              {-# LINE 723 "Order.hs" #-}+                      in  ( _lhsOattributes,_lhsOcollectChildrenInhs,_lhsOcollectChildrenSyns,_lhsOerrors,_lhsOfields,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinhs,_lhsOnts,_lhsOsinglevisits,_lhsOterminals))) )+-- Expression --------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allfields            : [(Identifier,Type,Bool)]+         allnts               : [Identifier]+         attrs                : [(Identifier,Identifier)]+         con                  : 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,Bool)]) ->+                                      ([Identifier]) ->+                                      ([(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,Bool)]),allnts_Inh_Expression :: !([Identifier]),attrs_Inh_Expression :: !([(Identifier,Identifier)]),con_Inh_Expression :: !(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 _lhsInt )  =+    (let ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals) =+             (sem _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _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+                     _lhsInt ->+                       (let _lhsOallRhsVars :: (Set (Identifier,Identifier))+                            _lhsOcopy :: Expression+                            _lhsOerrors :: (Seq Error)+                            _lhsOtextLines :: ([String])+                            _lhsOusedAttrs :: ([(Identifier,Identifier)])+                            _lhsOusedFields :: ([Identifier])+                            _lhsOusedLocals :: ([Identifier])+                            -- "Order.ag"(line 400, column 21)+                            __tup1 =+                                {-# LINE 400 "Order.ag" #-}+                                let inherited = Inh_HsTokensRoot+                                                { attrs_Inh_HsTokensRoot      = _lhsIattrs+                                                , 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+                                      }  -> (errors,textLines,usedAttrs,usedLocals,usedFields)+                                {-# LINE 811 "Order.hs" #-}+                            -- "Order.ag"(line 400, column 21)+                            (_errors,_,_,_,_) =+                                {-# LINE 400 "Order.ag" #-}+                                __tup1+                                {-# LINE 816 "Order.hs" #-}+                            -- "Order.ag"(line 400, column 21)+                            (_,_textLines,_,_,_) =+                                {-# LINE 400 "Order.ag" #-}+                                __tup1+                                {-# LINE 821 "Order.hs" #-}+                            -- "Order.ag"(line 400, column 21)+                            (_,_,_usedAttrs,_,_) =+                                {-# LINE 400 "Order.ag" #-}+                                __tup1+                                {-# LINE 826 "Order.hs" #-}+                            -- "Order.ag"(line 400, column 21)+                            (_,_,_,_usedLocals,_) =+                                {-# LINE 400 "Order.ag" #-}+                                __tup1+                                {-# LINE 831 "Order.hs" #-}+                            -- "Order.ag"(line 400, column 21)+                            (_,_,_,_,_usedFields) =+                                {-# LINE 400 "Order.ag" #-}+                                __tup1+                                {-# LINE 836 "Order.hs" #-}+                            -- "Order.ag"(line 418, column 17)+                            _lhsOallRhsVars =+                                {-# LINE 418 "Order.ag" #-}+                                Set.fromList _usedAttrs+                                `Set.union`+                                Set.fromList [ (_LOC, l) | l <- _usedLocals    ]+                                `Set.union`+                                Set.fromList [ (_FIELD, fld) | fld <- _usedFields    ]+                                {-# LINE 845 "Order.hs" #-}+                            -- self rule+                            _copy =+                                {-# LINE 395 "Order.ag" #-}+                                Expression pos_ tks_+                                {-# LINE 850 "Order.hs" #-}+                            -- self rule+                            _lhsOcopy =+                                {-# LINE 395 "Order.ag" #-}+                                _copy+                                {-# LINE 855 "Order.hs" #-}+                            -- copy rule (from local)+                            _lhsOerrors =+                                {-# LINE 390 "Order.ag" #-}+                                _errors+                                {-# LINE 860 "Order.hs" #-}+                            -- copy rule (from local)+                            _lhsOtextLines =+                                {-# LINE 394 "Order.ag" #-}+                                _textLines+                                {-# LINE 865 "Order.hs" #-}+                            -- copy rule (from local)+                            _lhsOusedAttrs =+                                {-# LINE 392 "Order.ag" #-}+                                _usedAttrs+                                {-# LINE 870 "Order.hs" #-}+                            -- copy rule (from local)+                            _lhsOusedFields =+                                {-# LINE 393 "Order.ag" #-}+                                _usedFields+                                {-# LINE 875 "Order.hs" #-}+                            -- copy rule (from local)+                            _lhsOusedLocals =+                                {-# LINE 391 "Order.ag" #-}+                                _usedLocals+                                {-# LINE 880 "Order.hs" #-}+                        in  ( _lhsOallRhsVars,_lhsOcopy,_lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )+-- Grammar -----------------------------------------------------+{-+   visit 0:+      inherited attribute:+         options              : Options+      synthesized attributes:+         errors               : Seq Error+         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]))}+         visit 0:+            local ruleTable   : _+            local attrTable   : _+            local attrVertex  : _+            local tdpToTds    : _+            local tdsToTdp    : _+            local directDep   : _+            local instDep     : _+            local aroundDep   : _+            local info        : _+            local _tup2       : _+            local cInterfaceMap : _+            local cVisitsMap  : _+            local cyclesErrors : _+            local aroundMap   : _+-}+-- cata+sem_Grammar :: Grammar  ->+               T_Grammar +sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap )  =+    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap )+-- semantic domain+newtype T_Grammar  = T_Grammar (Options ->+                                ( (Seq Error),CGrammar))+data Inh_Grammar  = Inh_Grammar {options_Inh_Grammar :: !(Options)}+data Syn_Grammar  = Syn_Grammar {errors_Syn_Grammar :: !(Seq Error),output_Syn_Grammar :: !(CGrammar)}+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]))) ->+                       T_Grammar +sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_ aroundsMap_  =+    (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_dovisit :: 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])+                         _nontsOcInterfaceMap :: CInterfaceMap+                         _nontsOcVisitsMap :: CVisitsMap+                         _nontsIacount :: Int+                         _nontsIadditionalDep :: (Seq Edge)+                         _nontsIaranges :: (Seq (Int,Int,Int))+                         _nontsIaroundDep :: (Seq Edge)+                         _nontsIcNonterminals :: CNonterminals+                         _nontsIdirectDep :: (Seq Edge)+                         _nontsIerrors :: (Seq Error)+                         _nontsIinstDep :: (Seq Edge)+                         _nontsInonts :: ([(NontermIdent,[ConstructorIdent])])+                         _nontsIntattrs :: (Seq (Vertex,NTAttr))+                         _nontsIrules :: (Seq (Vertex,CRule))+                         _nontsIvcount :: Int+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_cata =+                             {-# LINE 103 "Order.ag" #-}+                             folds     _lhsIoptions+                             {-# LINE 988 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_data =+                             {-# LINE 104 "Order.ag" #-}+                             dataTypes _lhsIoptions+                             {-# LINE 993 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_sig =+                             {-# LINE 105 "Order.ag" #-}+                             typeSigs  _lhsIoptions+                             {-# LINE 998 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_sem =+                             {-# LINE 106 "Order.ag" #-}+                             semfuns   _lhsIoptions+                             {-# LINE 1003 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_rename =+                             {-# LINE 107 "Order.ag" #-}+                             rename    _lhsIoptions+                             {-# LINE 1008 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_newtypes =+                             {-# LINE 108 "Order.ag" #-}+                             newtypes  _lhsIoptions+                             {-# LINE 1013 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_wantvisit =+                             {-# LINE 109 "Order.ag" #-}+                             visit   _lhsIoptions+                             {-# LINE 1018 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_dovisit =+                             {-# LINE 110 "Order.ag" #-}+                             visit     _lhsIoptions && null _cyclesErrors+                             {-# LINE 1023 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_unbox =+                             {-# LINE 111 "Order.ag" #-}+                             unbox     _lhsIoptions+                             {-# LINE 1028 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOo_case =+                             {-# LINE 112 "Order.ag" #-}+                             cases     _lhsIoptions+                             {-# LINE 1033 "Order.hs" #-}+                         -- "Order.ag"(line 103, column 17)+                         _nontsOprefix =+                             {-# LINE 113 "Order.ag" #-}+                             prefix    _lhsIoptions+                             {-# LINE 1038 "Order.hs" #-}+                         -- "Order.ag"(line 241, column 15)+                         _nontsOvcount =+                             {-# LINE 241 "Order.ag" #-}+                             0+                             {-# LINE 1043 "Order.hs" #-}+                         -- "Order.ag"(line 266, column 7)+                         _nontsOmanualAttrDepMap =+                             {-# LINE 266 "Order.ag" #-}+                             manualAttrOrderMap_+                             {-# LINE 1048 "Order.hs" #-}+                         -- "Order.ag"(line 354, column 14)+                         _nontsOaroundMap =+                             {-# LINE 354 "Order.ag" #-}+                             aroundsMap_+                             {-# LINE 1053 "Order.hs" #-}+                         -- "Order.ag"(line 432, column 13)+                         _nontsOacount =+                             {-# LINE 432 "Order.ag" #-}+                             0+                             {-# LINE 1058 "Order.hs" #-}+                         -- "Order.ag"(line 470, column 13)+                         _ruleTable =+                             {-# LINE 470 "Order.ag" #-}+                             Array.array (0,_nontsIvcount-1) (toList _nontsIrules)+                             {-# LINE 1063 "Order.hs" #-}+                         -- "Order.ag"(line 471, column 13)+                         _attrTable =+                             {-# LINE 471 "Order.ag" #-}+                             Array.array (0,_nontsIacount-1) (toList _nontsIntattrs)+                             {-# LINE 1068 "Order.hs" #-}+                         -- "Order.ag"(line 472, column 13)+                         _attrVertex =+                             {-# LINE 472 "Order.ag" #-}+                             Map.fromList (map swap (toList _nontsIntattrs))+                             {-# LINE 1073 "Order.hs" #-}+                         -- "Order.ag"(line 473, column 13)+                         _tdpToTds =+                             {-# LINE 473 "Order.ag" #-}+                             [ (s, maybe (-1) (\v -> findWithErr1 "Grammar.tdpToTds" v _attrVertex) (ntattr cr))+                             | (s,cr) <- toList _nontsIrules]+                             {-# LINE 1079 "Order.hs" #-}+                         -- "Order.ag"(line 475, column 13)+                         _tdsToTdp =+                             {-# LINE 475 "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 1087 "Order.hs" #-}+                         -- "Order.ag"(line 479, column 13)+                         _directDep =+                             {-# LINE 479 "Order.ag" #-}+                             toList (_nontsIdirectDep Seq.>< _nontsIadditionalDep)+                             {-# LINE 1092 "Order.hs" #-}+                         -- "Order.ag"(line 480, column 13)+                         _instDep =+                             {-# LINE 480 "Order.ag" #-}+                             toList _nontsIinstDep+                             {-# LINE 1097 "Order.hs" #-}+                         -- "Order.ag"(line 481, column 13)+                         _aroundDep =+                             {-# LINE 481 "Order.ag" #-}+                             toList _nontsIaroundDep+                             {-# LINE 1102 "Order.hs" #-}+                         -- "Order.ag"(line 482, column 13)+                         _info =+                             {-# LINE 482 "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 1116 "Order.hs" #-}+                         -- "Order.ag"(line 493, column 17)+                         __tup2 =+                             {-# LINE 493 "Order.ag" #-}+                             case computeSequential _info _directDep (_instDep ++ _aroundDep) 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 1141 "Order.hs" #-}+                         -- "Order.ag"(line 493, column 17)+                         (_cInterfaceMap,_,_) =+                             {-# LINE 493 "Order.ag" #-}+                             __tup2+                             {-# LINE 1146 "Order.hs" #-}+                         -- "Order.ag"(line 493, column 17)+                         (_,_cVisitsMap,_) =+                             {-# LINE 493 "Order.ag" #-}+                             __tup2+                             {-# LINE 1151 "Order.hs" #-}+                         -- "Order.ag"(line 493, column 17)+                         (_,_,_cyclesErrors) =+                             {-# LINE 493 "Order.ag" #-}+                             __tup2+                             {-# LINE 1156 "Order.hs" #-}+                         -- "Order.ag"(line 515, column 13)+                         _lhsOerrors =+                             {-# LINE 515 "Order.ag" #-}+                             (if withCycle _lhsIoptions then Seq.fromList _cyclesErrors else Seq.empty)+                             Seq.>< _nontsIerrors+                             {-# LINE 1162 "Order.hs" #-}+                         -- "Order.ag"(line 547, column 15)+                         _lhsOoutput =+                             {-# LINE 547 "Order.ag" #-}+                             CGrammar typeSyns_ derivings_ wrappers_ _nontsIcNonterminals pragmas_ paramMap_ contextMap_ _aroundMap+                             {-# LINE 1167 "Order.hs" #-}+                         -- "Order.ag"(line 560, column 14)+                         _aroundMap =+                             {-# LINE 560 "Order.ag" #-}+                             Map.map (Map.map Map.keysSet) aroundsMap_+                             {-# LINE 1172 "Order.hs" #-}+                         -- "Order.ag"(line 577, column 13)+                         _nontsOallnts =+                             {-# LINE 577 "Order.ag" #-}+                             map fst (_nontsInonts)+                             {-# LINE 1177 "Order.hs" #-}+                         -- copy rule (from local)+                         _nontsOcInterfaceMap =+                             {-# LINE 522 "Order.ag" #-}+                             _cInterfaceMap+                             {-# LINE 1182 "Order.hs" #-}+                         -- copy rule (from local)+                         _nontsOcVisitsMap =+                             {-# LINE 529 "Order.ag" #-}+                             _cVisitsMap+                             {-# LINE 1187 "Order.hs" #-}+                         ( _nontsIacount,_nontsIadditionalDep,_nontsIaranges,_nontsIaroundDep,_nontsIcNonterminals,_nontsIdirectDep,_nontsIerrors,_nontsIinstDep,_nontsInonts,_nontsIntattrs,_nontsIrules,_nontsIvcount) =+                             (nonts_ _nontsOacount _nontsOallnts _nontsOaroundMap _nontsOcInterfaceMap _nontsOcVisitsMap _nontsOmanualAttrDepMap _nontsOo_case _nontsOo_cata _nontsOo_data _nontsOo_dovisit _nontsOo_newtypes _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_unbox _nontsOo_wantvisit _nontsOprefix _nontsOvcount )+                     in  ( _lhsOerrors,_lhsOoutput))) )+-- Nonterminal -------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allnts               : [Identifier]+         aroundMap            : Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))+         cInterfaceMap        : CInterfaceMap+         cVisitsMap           : CVisitsMap+         manualAttrDepMap     : AttrOrderMap+         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+         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 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 ->+                                        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),([(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),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),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 _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,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount) =+             (sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _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 _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+                      _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)+                             _lhsOrules :: (Seq (Vertex,CRule))+                             _lhsOvcount :: Int+                             _prodsOallnts :: ([Identifier])+                             _prodsOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+                             _prodsOcVisitsMap :: CVisitsMap+                             _prodsOmanualAttrDepMap :: AttrOrderMap+                             _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)+                             _prodsIrules :: (Seq (Vertex,CRule))+                             _prodsIvcount :: Int+                             -- "Order.ag"(line 77, column 17)+                             _prodsOnt =+                                 {-# LINE 77 "Order.ag" #-}+                                 nt_+                                 {-# LINE 1339 "Order.hs" #-}+                             -- "Order.ag"(line 80, column 17)+                             _prodsOinh =+                                 {-# LINE 80 "Order.ag" #-}+                                 inh_+                                 {-# LINE 1344 "Order.hs" #-}+                             -- "Order.ag"(line 81, column 17)+                             _prodsOsyn =+                                 {-# LINE 81 "Order.ag" #-}+                                 syn_+                                 {-# LINE 1349 "Order.hs" #-}+                             -- "Order.ag"(line 350, column 32)+                             _aroundMap =+                                 {-# LINE 350 "Order.ag" #-}+                                 Map.findWithDefault Map.empty nt_ _lhsIaroundMap+                                 {-# LINE 1354 "Order.hs" #-}+                             -- "Order.ag"(line 435, column 17)+                             _ntattrs =+                                 {-# LINE 435 "Order.ag" #-}+                                 [ NTAInh nt_ inh tp | (inh,tp) <- Map.assocs inh_ ]+                                 ++ [NTASyn nt_ syn tp | (syn,tp) <- Map.assocs syn_ ]+                                 {-# LINE 1360 "Order.hs" #-}+                             -- "Order.ag"(line 437, column 17)+                             _lhsOntattrs =+                                 {-# LINE 437 "Order.ag" #-}+                                 Seq.fromList (zip [_lhsIacount ..] _ntattrs)+                                 {-# LINE 1365 "Order.hs" #-}+                             -- "Order.ag"(line 438, column 17)+                             _lhsOacount =+                                 {-# LINE 438 "Order.ag" #-}+                                 _lhsIacount + Map.size inh_ + Map.size syn_+                                 {-# LINE 1370 "Order.hs" #-}+                             -- "Order.ag"(line 439, column 17)+                             _lhsOaranges =+                                 {-# LINE 439 "Order.ag" #-}+                                 Seq.singleton+                                  (_lhsIacount+                                  ,_lhsIacount + Map.size inh_+                                  ,_lhsIacount + Map.size syn_ + Map.size inh_ - 1)+                                 {-# LINE 1378 "Order.hs" #-}+                             -- "Order.ag"(line 448, column 19)+                             _lhsOnonts =+                                 {-# LINE 448 "Order.ag" #-}+                                 [(nt_,_prodsIcons)]+                                 {-# LINE 1383 "Order.hs" #-}+                             -- "Order.ag"(line 524, column 19)+                             _cInter =+                                 {-# LINE 524 "Order.ag" #-}+                                 if  _lhsIo_dovisit+                                        then findWithErr1 "Nonterminal.cInter" nt_ _lhsIcInterfaceMap+                                        else CInterface [CSegment inh_ syn_]+                                 {-# LINE 1390 "Order.hs" #-}+                             -- "Order.ag"(line 552, column 19)+                             _lhsOcNonterminal =+                                 {-# LINE 552 "Order.ag" #-}+                                 CNonterminal nt_ params_ inh_ syn_ _prodsIcProductions _cInter+                                 {-# LINE 1395 "Order.hs" #-}+                             -- use rule "Order.ag"(line 263, column 71)+                             _lhsOadditionalDep =+                                 {-# LINE 263 "Order.ag" #-}+                                 _prodsIadditionalDep+                                 {-# LINE 1400 "Order.hs" #-}+                             -- use rule "Order.ag"(line 342, column 24)+                             _lhsOaroundDep =+                                 {-# LINE 342 "Order.ag" #-}+                                 _prodsIaroundDep+                                 {-# LINE 1405 "Order.hs" #-}+                             -- use rule "Order.ag"(line 249, column 33)+                             _lhsOdirectDep =+                                 {-# LINE 249 "Order.ag" #-}+                                 _prodsIdirectDep+                                 {-# LINE 1410 "Order.hs" #-}+                             -- use rule "Order.ag"(line 64, column 70)+                             _lhsOerrors =+                                 {-# LINE 64 "Order.ag" #-}+                                 _prodsIerrors+                                 {-# LINE 1415 "Order.hs" #-}+                             -- use rule "Order.ag"(line 296, column 31)+                             _lhsOinstDep =+                                 {-# LINE 296 "Order.ag" #-}+                                 _prodsIinstDep+                                 {-# LINE 1420 "Order.hs" #-}+                             -- use rule "Order.ag"(line 239, column 18)+                             _lhsOrules =+                                 {-# LINE 239 "Order.ag" #-}+                                 _prodsIrules+                                 {-# LINE 1425 "Order.hs" #-}+                             -- copy rule (up)+                             _lhsOvcount =+                                 {-# LINE 238 "Order.ag" #-}+                                 _prodsIvcount+                                 {-# LINE 1430 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOallnts =+                                 {-# LINE 574 "Order.ag" #-}+                                 _lhsIallnts+                                 {-# LINE 1435 "Order.hs" #-}+                             -- copy rule (from local)+                             _prodsOaroundMap =+                                 {-# LINE 348 "Order.ag" #-}+                                 _aroundMap+                                 {-# LINE 1440 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOcVisitsMap =+                                 {-# LINE 529 "Order.ag" #-}+                                 _lhsIcVisitsMap+                                 {-# LINE 1445 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOmanualAttrDepMap =+                                 {-# LINE 263 "Order.ag" #-}+                                 _lhsImanualAttrDepMap+                                 {-# LINE 1450 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOo_case =+                                 {-# LINE 97 "Order.ag" #-}+                                 _lhsIo_case+                                 {-# LINE 1455 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOo_cata =+                                 {-# LINE 91 "Order.ag" #-}+                                 _lhsIo_cata+                                 {-# LINE 1460 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOo_dovisit =+                                 {-# LINE 96 "Order.ag" #-}+                                 _lhsIo_dovisit+                                 {-# LINE 1465 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOo_newtypes =+                                 {-# LINE 90 "Order.ag" #-}+                                 _lhsIo_newtypes+                                 {-# LINE 1470 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOo_rename =+                                 {-# LINE 94 "Order.ag" #-}+                                 _lhsIo_rename+                                 {-# LINE 1475 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOo_sem =+                                 {-# LINE 93 "Order.ag" #-}+                                 _lhsIo_sem+                                 {-# LINE 1480 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOo_sig =+                                 {-# LINE 92 "Order.ag" #-}+                                 _lhsIo_sig+                                 {-# LINE 1485 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOo_unbox =+                                 {-# LINE 99 "Order.ag" #-}+                                 _lhsIo_unbox+                                 {-# LINE 1490 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOo_wantvisit =+                                 {-# LINE 95 "Order.ag" #-}+                                 _lhsIo_wantvisit+                                 {-# LINE 1495 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOprefix =+                                 {-# LINE 98 "Order.ag" #-}+                                 _lhsIprefix+                                 {-# LINE 1500 "Order.hs" #-}+                             -- copy rule (down)+                             _prodsOvcount =+                                 {-# LINE 238 "Order.ag" #-}+                                 _lhsIvcount+                                 {-# LINE 1505 "Order.hs" #-}+                             ( _prodsIadditionalDep,_prodsIaroundDep,_prodsIcProductions,_prodsIcons,_prodsIdirectDep,_prodsIerrors,_prodsIinstDep,_prodsIrules,_prodsIvcount) =+                                 (prods_ _prodsOallnts _prodsOaroundMap _prodsOcVisitsMap _prodsOinh _prodsOmanualAttrDepMap _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,_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+         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+         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 ->+                                          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),([(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),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),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 _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,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount) =+             (sem _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsImanualAttrDepMap _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 _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+                       _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)+                              _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+                              _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+                              _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)+                              _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)+                              _tlInonts :: ([(NontermIdent,[ConstructorIdent])])+                              _tlIntattrs :: (Seq (Vertex,NTAttr))+                              _tlIrules :: (Seq (Vertex,CRule))+                              _tlIvcount :: Int+                              -- "Order.ag"(line 549, column 12)+                              _lhsOcNonterminals =+                                  {-# LINE 549 "Order.ag" #-}+                                  _hdIcNonterminal : _tlIcNonterminals+                                  {-# LINE 1681 "Order.hs" #-}+                              -- use rule "Order.ag"(line 263, column 71)+                              _lhsOadditionalDep =+                                  {-# LINE 263 "Order.ag" #-}+                                  _hdIadditionalDep Seq.>< _tlIadditionalDep+                                  {-# LINE 1686 "Order.hs" #-}+                              -- use rule "Order.ag"(line 429, column 36)+                              _lhsOaranges =+                                  {-# LINE 429 "Order.ag" #-}+                                  _hdIaranges Seq.>< _tlIaranges+                                  {-# LINE 1691 "Order.hs" #-}+                              -- use rule "Order.ag"(line 342, column 24)+                              _lhsOaroundDep =+                                  {-# LINE 342 "Order.ag" #-}+                                  _hdIaroundDep Seq.>< _tlIaroundDep+                                  {-# LINE 1696 "Order.hs" #-}+                              -- use rule "Order.ag"(line 249, column 33)+                              _lhsOdirectDep =+                                  {-# LINE 249 "Order.ag" #-}+                                  _hdIdirectDep Seq.>< _tlIdirectDep+                                  {-# LINE 1701 "Order.hs" #-}+                              -- use rule "Order.ag"(line 64, column 70)+                              _lhsOerrors =+                                  {-# LINE 64 "Order.ag" #-}+                                  _hdIerrors Seq.>< _tlIerrors+                                  {-# LINE 1706 "Order.hs" #-}+                              -- use rule "Order.ag"(line 296, column 31)+                              _lhsOinstDep =+                                  {-# LINE 296 "Order.ag" #-}+                                  _hdIinstDep Seq.>< _tlIinstDep+                                  {-# LINE 1711 "Order.hs" #-}+                              -- use rule "Order.ag"(line 446, column 43)+                              _lhsOnonts =+                                  {-# LINE 446 "Order.ag" #-}+                                  _hdInonts ++ _tlInonts+                                  {-# LINE 1716 "Order.hs" #-}+                              -- use rule "Order.ag"(line 428, column 35)+                              _lhsOntattrs =+                                  {-# LINE 428 "Order.ag" #-}+                                  _hdIntattrs Seq.>< _tlIntattrs+                                  {-# LINE 1721 "Order.hs" #-}+                              -- use rule "Order.ag"(line 239, column 18)+                              _lhsOrules =+                                  {-# LINE 239 "Order.ag" #-}+                                  _hdIrules Seq.>< _tlIrules+                                  {-# LINE 1726 "Order.hs" #-}+                              -- copy rule (up)+                              _lhsOacount =+                                  {-# LINE 428 "Order.ag" #-}+                                  _tlIacount+                                  {-# LINE 1731 "Order.hs" #-}+                              -- copy rule (up)+                              _lhsOvcount =+                                  {-# LINE 238 "Order.ag" #-}+                                  _tlIvcount+                                  {-# LINE 1736 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOacount =+                                  {-# LINE 428 "Order.ag" #-}+                                  _lhsIacount+                                  {-# LINE 1741 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOallnts =+                                  {-# LINE 574 "Order.ag" #-}+                                  _lhsIallnts+                                  {-# LINE 1746 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOaroundMap =+                                  {-# LINE 345 "Order.ag" #-}+                                  _lhsIaroundMap+                                  {-# LINE 1751 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOcInterfaceMap =+                                  {-# LINE 522 "Order.ag" #-}+                                  _lhsIcInterfaceMap+                                  {-# LINE 1756 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOcVisitsMap =+                                  {-# LINE 529 "Order.ag" #-}+                                  _lhsIcVisitsMap+                                  {-# LINE 1761 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOmanualAttrDepMap =+                                  {-# LINE 263 "Order.ag" #-}+                                  _lhsImanualAttrDepMap+                                  {-# LINE 1766 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_case =+                                  {-# LINE 97 "Order.ag" #-}+                                  _lhsIo_case+                                  {-# LINE 1771 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_cata =+                                  {-# LINE 91 "Order.ag" #-}+                                  _lhsIo_cata+                                  {-# LINE 1776 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_data =+                                  {-# LINE 100 "Order.ag" #-}+                                  _lhsIo_data+                                  {-# LINE 1781 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_dovisit =+                                  {-# LINE 96 "Order.ag" #-}+                                  _lhsIo_dovisit+                                  {-# LINE 1786 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_newtypes =+                                  {-# LINE 90 "Order.ag" #-}+                                  _lhsIo_newtypes+                                  {-# LINE 1791 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_rename =+                                  {-# LINE 94 "Order.ag" #-}+                                  _lhsIo_rename+                                  {-# LINE 1796 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_sem =+                                  {-# LINE 93 "Order.ag" #-}+                                  _lhsIo_sem+                                  {-# LINE 1801 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_sig =+                                  {-# LINE 92 "Order.ag" #-}+                                  _lhsIo_sig+                                  {-# LINE 1806 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_unbox =+                                  {-# LINE 99 "Order.ag" #-}+                                  _lhsIo_unbox+                                  {-# LINE 1811 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOo_wantvisit =+                                  {-# LINE 95 "Order.ag" #-}+                                  _lhsIo_wantvisit+                                  {-# LINE 1816 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOprefix =+                                  {-# LINE 98 "Order.ag" #-}+                                  _lhsIprefix+                                  {-# LINE 1821 "Order.hs" #-}+                              -- copy rule (down)+                              _hdOvcount =+                                  {-# LINE 238 "Order.ag" #-}+                                  _lhsIvcount+                                  {-# LINE 1826 "Order.hs" #-}+                              -- copy rule (chain)+                              _tlOacount =+                                  {-# LINE 428 "Order.ag" #-}+                                  _hdIacount+                                  {-# LINE 1831 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOallnts =+                                  {-# LINE 574 "Order.ag" #-}+                                  _lhsIallnts+                                  {-# LINE 1836 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOaroundMap =+                                  {-# LINE 345 "Order.ag" #-}+                                  _lhsIaroundMap+                                  {-# LINE 1841 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOcInterfaceMap =+                                  {-# LINE 522 "Order.ag" #-}+                                  _lhsIcInterfaceMap+                                  {-# LINE 1846 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOcVisitsMap =+                                  {-# LINE 529 "Order.ag" #-}+                                  _lhsIcVisitsMap+                                  {-# LINE 1851 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOmanualAttrDepMap =+                                  {-# LINE 263 "Order.ag" #-}+                                  _lhsImanualAttrDepMap+                                  {-# LINE 1856 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_case =+                                  {-# LINE 97 "Order.ag" #-}+                                  _lhsIo_case+                                  {-# LINE 1861 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_cata =+                                  {-# LINE 91 "Order.ag" #-}+                                  _lhsIo_cata+                                  {-# LINE 1866 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_data =+                                  {-# LINE 100 "Order.ag" #-}+                                  _lhsIo_data+                                  {-# LINE 1871 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_dovisit =+                                  {-# LINE 96 "Order.ag" #-}+                                  _lhsIo_dovisit+                                  {-# LINE 1876 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_newtypes =+                                  {-# LINE 90 "Order.ag" #-}+                                  _lhsIo_newtypes+                                  {-# LINE 1881 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_rename =+                                  {-# LINE 94 "Order.ag" #-}+                                  _lhsIo_rename+                                  {-# LINE 1886 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_sem =+                                  {-# LINE 93 "Order.ag" #-}+                                  _lhsIo_sem+                                  {-# LINE 1891 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_sig =+                                  {-# LINE 92 "Order.ag" #-}+                                  _lhsIo_sig+                                  {-# LINE 1896 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_unbox =+                                  {-# LINE 99 "Order.ag" #-}+                                  _lhsIo_unbox+                                  {-# LINE 1901 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOo_wantvisit =+                                  {-# LINE 95 "Order.ag" #-}+                                  _lhsIo_wantvisit+                                  {-# LINE 1906 "Order.hs" #-}+                              -- copy rule (down)+                              _tlOprefix =+                                  {-# LINE 98 "Order.ag" #-}+                                  _lhsIprefix+                                  {-# LINE 1911 "Order.hs" #-}+                              -- copy rule (chain)+                              _tlOvcount =+                                  {-# LINE 238 "Order.ag" #-}+                                  _hdIvcount+                                  {-# LINE 1916 "Order.hs" #-}+                              ( _hdIacount,_hdIadditionalDep,_hdIaranges,_hdIaroundDep,_hdIcNonterminal,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdInonts,_hdIntattrs,_hdIrules,_hdIvcount) =+                                  (hd_ _hdOacount _hdOallnts _hdOaroundMap _hdOcInterfaceMap _hdOcVisitsMap _hdOmanualAttrDepMap _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,_tlInonts,_tlIntattrs,_tlIrules,_tlIvcount) =+                                  (tl_ _tlOacount _tlOallnts _tlOaroundMap _tlOcInterfaceMap _tlOcVisitsMap _tlOmanualAttrDepMap _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,_lhsOnonts,_lhsOntattrs,_lhsOrules,_lhsOvcount))) )+sem_Nonterminals_Nil :: T_Nonterminals +sem_Nonterminals_Nil  =+    (T_Nonterminals (\ _lhsIacount+                       _lhsIallnts+                       _lhsIaroundMap+                       _lhsIcInterfaceMap+                       _lhsIcVisitsMap+                       _lhsImanualAttrDepMap+                       _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)+                              _lhsOnonts :: ([(NontermIdent,[ConstructorIdent])])+                              _lhsOntattrs :: (Seq (Vertex,NTAttr))+                              _lhsOrules :: (Seq (Vertex,CRule))+                              _lhsOacount :: Int+                              _lhsOvcount :: Int+                              -- "Order.ag"(line 550, column 12)+                              _lhsOcNonterminals =+                                  {-# LINE 550 "Order.ag" #-}+                                  []+                                  {-# LINE 1958 "Order.hs" #-}+                              -- use rule "Order.ag"(line 263, column 71)+                              _lhsOadditionalDep =+                                  {-# LINE 263 "Order.ag" #-}+                                  Seq.empty+                                  {-# LINE 1963 "Order.hs" #-}+                              -- use rule "Order.ag"(line 429, column 36)+                              _lhsOaranges =+                                  {-# LINE 429 "Order.ag" #-}+                                  Seq.empty+                                  {-# LINE 1968 "Order.hs" #-}+                              -- use rule "Order.ag"(line 342, column 24)+                              _lhsOaroundDep =+                                  {-# LINE 342 "Order.ag" #-}+                                  Seq.empty+                                  {-# LINE 1973 "Order.hs" #-}+                              -- use rule "Order.ag"(line 249, column 33)+                              _lhsOdirectDep =+                                  {-# LINE 249 "Order.ag" #-}+                                  Seq.empty+                                  {-# LINE 1978 "Order.hs" #-}+                              -- use rule "Order.ag"(line 64, column 70)+                              _lhsOerrors =+                                  {-# LINE 64 "Order.ag" #-}+                                  Seq.empty+                                  {-# LINE 1983 "Order.hs" #-}+                              -- use rule "Order.ag"(line 296, column 31)+                              _lhsOinstDep =+                                  {-# LINE 296 "Order.ag" #-}+                                  Seq.empty+                                  {-# LINE 1988 "Order.hs" #-}+                              -- use rule "Order.ag"(line 446, column 43)+                              _lhsOnonts =+                                  {-# LINE 446 "Order.ag" #-}+                                  []+                                  {-# LINE 1993 "Order.hs" #-}+                              -- use rule "Order.ag"(line 428, column 35)+                              _lhsOntattrs =+                                  {-# LINE 428 "Order.ag" #-}+                                  Seq.empty+                                  {-# LINE 1998 "Order.hs" #-}+                              -- use rule "Order.ag"(line 239, column 18)+                              _lhsOrules =+                                  {-# LINE 239 "Order.ag" #-}+                                  Seq.empty+                                  {-# LINE 2003 "Order.hs" #-}+                              -- copy rule (chain)+                              _lhsOacount =+                                  {-# LINE 428 "Order.ag" #-}+                                  _lhsIacount+                                  {-# LINE 2008 "Order.hs" #-}+                              -- copy rule (chain)+                              _lhsOvcount =+                                  {-# LINE 238 "Order.ag" #-}+                                  _lhsIvcount+                                  {-# LINE 2013 "Order.hs" #-}+                          in  ( _lhsOacount,_lhsOadditionalDep,_lhsOaranges,_lhsOaroundDep,_lhsOcNonterminals,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_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 164, column 12)+                         _lhsOgathAltAttrs =+                             {-# LINE 164 "Order.ag" #-}+                             [AltAttr field_ attr_ (field_ == _LOC || field_ == _INST)]+                             {-# LINE 2135 "Order.hs" #-}+                         -- "Order.ag"(line 232, column 12)+                         _lhsOpatternAttrs =+                             {-# LINE 232 "Order.ag" #-}+                             [(field_,attr_,(field_ == _LOC || field_ == _INST),_partsIcopy)]+                             {-# LINE 2140 "Order.hs" #-}+                         -- "Order.ag"(line 607, column 14)+                         _lhsOlocVars =+                             {-# LINE 607 "Order.ag" #-}+                             if field_ == _LOC+                                then [attr_]+                                else []+                             {-# LINE 2147 "Order.hs" #-}+                         -- "Order.ag"(line 610, column 14)+                         _lhsOinstVars =+                             {-# LINE 610 "Order.ag" #-}+                             if field_ == _INST+                                then [attr_]+                                else []+                             {-# LINE 2154 "Order.hs" #-}+                         -- use rule "Order.ag"(line 64, column 70)+                         _lhsOerrors =+                             {-# LINE 64 "Order.ag" #-}+                             _patIerrors Seq.>< _partsIerrors+                             {-# LINE 2159 "Order.hs" #-}+                         -- self rule+                         _copy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             Alias field_ attr_ _patIcopy _partsIcopy+                             {-# LINE 2164 "Order.hs" #-}+                         -- self rule+                         _lhsOcopy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             _copy+                             {-# LINE 2169 "Order.hs" #-}+                         -- copy rule (down)+                         _patOallTypeSigs =+                             {-# LINE 462 "Order.ag" #-}+                             _lhsIallTypeSigs+                             {-# LINE 2174 "Order.hs" #-}+                         -- copy rule (down)+                         _patOaltAttrs =+                             {-# LINE 166 "Order.ag" #-}+                             _lhsIaltAttrs+                             {-# LINE 2179 "Order.hs" #-}+                         -- copy rule (down)+                         _patOcon =+                             {-# LINE 70 "Order.ag" #-}+                             _lhsIcon+                             {-# LINE 2184 "Order.hs" #-}+                         -- copy rule (down)+                         _patOinh =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIinh+                             {-# LINE 2189 "Order.hs" #-}+                         -- copy rule (down)+                         _patOnt =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsInt+                             {-# LINE 2194 "Order.hs" #-}+                         -- copy rule (down)+                         _patOsyn =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIsyn+                             {-# LINE 2199 "Order.hs" #-}+                         -- copy rule (down)+                         _partsOallTypeSigs =+                             {-# LINE 462 "Order.ag" #-}+                             _lhsIallTypeSigs+                             {-# LINE 2204 "Order.hs" #-}+                         -- copy rule (down)+                         _partsOaltAttrs =+                             {-# LINE 166 "Order.ag" #-}+                             _lhsIaltAttrs+                             {-# LINE 2209 "Order.hs" #-}+                         -- copy rule (down)+                         _partsOcon =+                             {-# LINE 70 "Order.ag" #-}+                             _lhsIcon+                             {-# LINE 2214 "Order.hs" #-}+                         -- copy rule (down)+                         _partsOinh =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIinh+                             {-# LINE 2219 "Order.hs" #-}+                         -- copy rule (down)+                         _partsOnt =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsInt+                             {-# LINE 2224 "Order.hs" #-}+                         -- copy rule (down)+                         _partsOsyn =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIsyn+                             {-# LINE 2229 "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 64, column 70)+                         _lhsOerrors =+                             {-# LINE 64 "Order.ag" #-}+                             _patsIerrors+                             {-# LINE 2267 "Order.hs" #-}+                         -- use rule "Order.ag"(line 150, column 68)+                         _lhsOgathAltAttrs =+                             {-# LINE 150 "Order.ag" #-}+                             _patsIgathAltAttrs+                             {-# LINE 2272 "Order.hs" #-}+                         -- use rule "Order.ag"(line 604, column 86)+                         _lhsOinstVars =+                             {-# LINE 604 "Order.ag" #-}+                             _patsIinstVars+                             {-# LINE 2277 "Order.hs" #-}+                         -- use rule "Order.ag"(line 604, column 48)+                         _lhsOlocVars =+                             {-# LINE 604 "Order.ag" #-}+                             _patsIlocVars+                             {-# LINE 2282 "Order.hs" #-}+                         -- use rule "Order.ag"(line 229, column 42)+                         _lhsOpatternAttrs =+                             {-# LINE 229 "Order.ag" #-}+                             _patsIpatternAttrs+                             {-# LINE 2287 "Order.hs" #-}+                         -- self rule+                         _copy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             Constr name_ _patsIcopy+                             {-# LINE 2292 "Order.hs" #-}+                         -- self rule+                         _lhsOcopy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             _copy+                             {-# LINE 2297 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOallTypeSigs =+                             {-# LINE 462 "Order.ag" #-}+                             _lhsIallTypeSigs+                             {-# LINE 2302 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOaltAttrs =+                             {-# LINE 166 "Order.ag" #-}+                             _lhsIaltAttrs+                             {-# LINE 2307 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOcon =+                             {-# LINE 70 "Order.ag" #-}+                             _lhsIcon+                             {-# LINE 2312 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOinh =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIinh+                             {-# LINE 2317 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOnt =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsInt+                             {-# LINE 2322 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOsyn =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIsyn+                             {-# LINE 2327 "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 64, column 70)+                         _lhsOerrors =+                             {-# LINE 64 "Order.ag" #-}+                             _patIerrors+                             {-# LINE 2362 "Order.hs" #-}+                         -- use rule "Order.ag"(line 150, column 68)+                         _lhsOgathAltAttrs =+                             {-# LINE 150 "Order.ag" #-}+                             _patIgathAltAttrs+                             {-# LINE 2367 "Order.hs" #-}+                         -- use rule "Order.ag"(line 604, column 86)+                         _lhsOinstVars =+                             {-# LINE 604 "Order.ag" #-}+                             _patIinstVars+                             {-# LINE 2372 "Order.hs" #-}+                         -- use rule "Order.ag"(line 604, column 48)+                         _lhsOlocVars =+                             {-# LINE 604 "Order.ag" #-}+                             _patIlocVars+                             {-# LINE 2377 "Order.hs" #-}+                         -- use rule "Order.ag"(line 229, column 42)+                         _lhsOpatternAttrs =+                             {-# LINE 229 "Order.ag" #-}+                             _patIpatternAttrs+                             {-# LINE 2382 "Order.hs" #-}+                         -- self rule+                         _copy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             Irrefutable _patIcopy+                             {-# LINE 2387 "Order.hs" #-}+                         -- self rule+                         _lhsOcopy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             _copy+                             {-# LINE 2392 "Order.hs" #-}+                         -- copy rule (down)+                         _patOallTypeSigs =+                             {-# LINE 462 "Order.ag" #-}+                             _lhsIallTypeSigs+                             {-# LINE 2397 "Order.hs" #-}+                         -- copy rule (down)+                         _patOaltAttrs =+                             {-# LINE 166 "Order.ag" #-}+                             _lhsIaltAttrs+                             {-# LINE 2402 "Order.hs" #-}+                         -- copy rule (down)+                         _patOcon =+                             {-# LINE 70 "Order.ag" #-}+                             _lhsIcon+                             {-# LINE 2407 "Order.hs" #-}+                         -- copy rule (down)+                         _patOinh =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIinh+                             {-# LINE 2412 "Order.hs" #-}+                         -- copy rule (down)+                         _patOnt =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsInt+                             {-# LINE 2417 "Order.hs" #-}+                         -- copy rule (down)+                         _patOsyn =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIsyn+                             {-# LINE 2422 "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 64, column 70)+                         _lhsOerrors =+                             {-# LINE 64 "Order.ag" #-}+                             _patsIerrors+                             {-# LINE 2458 "Order.hs" #-}+                         -- use rule "Order.ag"(line 150, column 68)+                         _lhsOgathAltAttrs =+                             {-# LINE 150 "Order.ag" #-}+                             _patsIgathAltAttrs+                             {-# LINE 2463 "Order.hs" #-}+                         -- use rule "Order.ag"(line 604, column 86)+                         _lhsOinstVars =+                             {-# LINE 604 "Order.ag" #-}+                             _patsIinstVars+                             {-# LINE 2468 "Order.hs" #-}+                         -- use rule "Order.ag"(line 604, column 48)+                         _lhsOlocVars =+                             {-# LINE 604 "Order.ag" #-}+                             _patsIlocVars+                             {-# LINE 2473 "Order.hs" #-}+                         -- use rule "Order.ag"(line 229, column 42)+                         _lhsOpatternAttrs =+                             {-# LINE 229 "Order.ag" #-}+                             _patsIpatternAttrs+                             {-# LINE 2478 "Order.hs" #-}+                         -- self rule+                         _copy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             Product pos_ _patsIcopy+                             {-# LINE 2483 "Order.hs" #-}+                         -- self rule+                         _lhsOcopy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             _copy+                             {-# LINE 2488 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOallTypeSigs =+                             {-# LINE 462 "Order.ag" #-}+                             _lhsIallTypeSigs+                             {-# LINE 2493 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOaltAttrs =+                             {-# LINE 166 "Order.ag" #-}+                             _lhsIaltAttrs+                             {-# LINE 2498 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOcon =+                             {-# LINE 70 "Order.ag" #-}+                             _lhsIcon+                             {-# LINE 2503 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOinh =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIinh+                             {-# LINE 2508 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOnt =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsInt+                             {-# LINE 2513 "Order.hs" #-}+                         -- copy rule (down)+                         _patsOsyn =+                             {-# LINE 69 "Order.ag" #-}+                             _lhsIsyn+                             {-# LINE 2518 "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 64, column 70)+                         _lhsOerrors =+                             {-# LINE 64 "Order.ag" #-}+                             Seq.empty+                             {-# LINE 2541 "Order.hs" #-}+                         -- use rule "Order.ag"(line 150, column 68)+                         _lhsOgathAltAttrs =+                             {-# LINE 150 "Order.ag" #-}+                             []+                             {-# LINE 2546 "Order.hs" #-}+                         -- use rule "Order.ag"(line 604, column 86)+                         _lhsOinstVars =+                             {-# LINE 604 "Order.ag" #-}+                             []+                             {-# LINE 2551 "Order.hs" #-}+                         -- use rule "Order.ag"(line 604, column 48)+                         _lhsOlocVars =+                             {-# LINE 604 "Order.ag" #-}+                             []+                             {-# LINE 2556 "Order.hs" #-}+                         -- use rule "Order.ag"(line 229, column 42)+                         _lhsOpatternAttrs =+                             {-# LINE 229 "Order.ag" #-}+                             []+                             {-# LINE 2561 "Order.hs" #-}+                         -- self rule+                         _copy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             Underscore pos_+                             {-# LINE 2566 "Order.hs" #-}+                         -- self rule+                         _lhsOcopy =+                             {-# LINE 23 "./Patterns.ag" #-}+                             _copy+                             {-# LINE 2571 "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 64, column 70)+                          _lhsOerrors =+                              {-# LINE 64 "Order.ag" #-}+                              _hdIerrors Seq.>< _tlIerrors+                              {-# LINE 2666 "Order.hs" #-}+                          -- use rule "Order.ag"(line 150, column 68)+                          _lhsOgathAltAttrs =+                              {-# LINE 150 "Order.ag" #-}+                              _hdIgathAltAttrs ++ _tlIgathAltAttrs+                              {-# LINE 2671 "Order.hs" #-}+                          -- use rule "Order.ag"(line 604, column 86)+                          _lhsOinstVars =+                              {-# LINE 604 "Order.ag" #-}+                              _hdIinstVars ++ _tlIinstVars+                              {-# LINE 2676 "Order.hs" #-}+                          -- use rule "Order.ag"(line 604, column 48)+                          _lhsOlocVars =+                              {-# LINE 604 "Order.ag" #-}+                              _hdIlocVars ++ _tlIlocVars+                              {-# LINE 2681 "Order.hs" #-}+                          -- use rule "Order.ag"(line 229, column 42)+                          _lhsOpatternAttrs =+                              {-# LINE 229 "Order.ag" #-}+                              _hdIpatternAttrs ++ _tlIpatternAttrs+                              {-# LINE 2686 "Order.hs" #-}+                          -- self rule+                          _copy =+                              {-# LINE 23 "./Patterns.ag" #-}+                              (:) _hdIcopy _tlIcopy+                              {-# LINE 2691 "Order.hs" #-}+                          -- self rule+                          _lhsOcopy =+                              {-# LINE 23 "./Patterns.ag" #-}+                              _copy+                              {-# LINE 2696 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOallTypeSigs =+                              {-# LINE 462 "Order.ag" #-}+                              _lhsIallTypeSigs+                              {-# LINE 2701 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOaltAttrs =+                              {-# LINE 166 "Order.ag" #-}+                              _lhsIaltAttrs+                              {-# LINE 2706 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOcon =+                              {-# LINE 70 "Order.ag" #-}+                              _lhsIcon+                              {-# LINE 2711 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOinh =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsIinh+                              {-# LINE 2716 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOnt =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsInt+                              {-# LINE 2721 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOsyn =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsIsyn+                              {-# LINE 2726 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOallTypeSigs =+                              {-# LINE 462 "Order.ag" #-}+                              _lhsIallTypeSigs+                              {-# LINE 2731 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOaltAttrs =+                              {-# LINE 166 "Order.ag" #-}+                              _lhsIaltAttrs+                              {-# LINE 2736 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOcon =+                              {-# LINE 70 "Order.ag" #-}+                              _lhsIcon+                              {-# LINE 2741 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOinh =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsIinh+                              {-# LINE 2746 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOnt =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsInt+                              {-# LINE 2751 "Order.hs" #-}+                          -- copy rule (down)+                          _tlOsyn =+                              {-# LINE 69 "Order.ag" #-}+                              _lhsIsyn+                              {-# LINE 2756 "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 64, column 70)+                          _lhsOerrors =+                              {-# LINE 64 "Order.ag" #-}+                              Seq.empty+                              {-# LINE 2780 "Order.hs" #-}+                          -- use rule "Order.ag"(line 150, column 68)+                          _lhsOgathAltAttrs =+                              {-# LINE 150 "Order.ag" #-}+                              []+                              {-# LINE 2785 "Order.hs" #-}+                          -- use rule "Order.ag"(line 604, column 86)+                          _lhsOinstVars =+                              {-# LINE 604 "Order.ag" #-}+                              []+                              {-# LINE 2790 "Order.hs" #-}+                          -- use rule "Order.ag"(line 604, column 48)+                          _lhsOlocVars =+                              {-# LINE 604 "Order.ag" #-}+                              []+                              {-# LINE 2795 "Order.hs" #-}+                          -- use rule "Order.ag"(line 229, column 42)+                          _lhsOpatternAttrs =+                              {-# LINE 229 "Order.ag" #-}+                              []+                              {-# LINE 2800 "Order.hs" #-}+                          -- self rule+                          _copy =+                              {-# LINE 23 "./Patterns.ag" #-}+                              []+                              {-# LINE 2805 "Order.hs" #-}+                          -- self rule+                          _lhsOcopy =+                              {-# LINE 23 "./Patterns.ag" #-}+                              _copy+                              {-# LINE 2810 "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+         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+         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 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 ->+                                      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 (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),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),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 _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,_lhsOrules,_lhsOvcount) =+             (sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _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 _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+                     _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+                            _rulesOsynsOfChildren :: (Map Identifier Attributes)+                            _rulesOinhsOfChildren :: (Map Identifier Attributes)+                            _lhsOaroundDep :: (Seq Edge)+                            _lhsOcons :: ([ConstructorIdent])+                            _typeSigsOtypeSigs :: (Map Identifier Type)+                            _rulesOallTypeSigs :: (Map Identifier Type)+                            _lhsOcProduction :: CProduction+                            _lhsOadditionalDep :: (Seq Edge)+                            _lhsOdirectDep :: (Seq Edge)+                            _lhsOerrors :: (Seq Error)+                            _lhsOinstDep :: (Seq Edge)+                            _childrenOallfields :: ([(Identifier,Type,Bool)])+                            _childrenOallnts :: ([Identifier])+                            _childrenOattrs :: ([(Identifier,Identifier)])+                            _childrenOinh :: Attributes+                            _childrenOnt :: Identifier+                            _childrenOo_unbox :: Bool+                            _childrenOsyn :: Attributes+                            _rulesOallfields :: ([(Identifier,Type,Bool)])+                            _rulesOallnts :: ([Identifier])+                            _rulesOaltAttrs :: (Map AltAttr Vertex)+                            _rulesOattrs :: ([(Identifier,Identifier)])+                            _rulesOinh :: Attributes+                            _rulesOmanualAttrDepMap :: AttrOrderMap+                            _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,Bool)])+                            _childrenIgathAltAttrs :: ([AltAttr])+                            _childrenIgathRules :: (Seq CRule)+                            _childrenIinhs :: (Seq (Identifier,Attributes))+                            _childrenInts :: (Seq (Identifier,NontermIdent))+                            _childrenIsinglevisits :: ([CRule])+                            _childrenIterminals :: ([Identifier])+                            _rulesIadditionalDep :: (Seq Edge)+                            _rulesIdirectDep :: (Seq Edge)+                            _rulesIerrors :: (Seq Error)+                            _rulesIgathAltAttrs :: ([AltAttr])+                            _rulesIgathRules :: (Seq CRule)+                            _rulesIinstDep :: (Seq Edge)+                            _rulesIinstVars :: ([Identifier])+                            _rulesIlocVars :: ([Identifier])+                            _typeSigsItypeSigs :: (Map Identifier Type)+                            -- "Order.ag"(line 73, column 16)+                            _childrenOcon =+                                {-# LINE 73 "Order.ag" #-}+                                con_+                                {-# LINE 2987 "Order.hs" #-}+                            -- "Order.ag"(line 75, column 16)+                            _rulesOcon =+                                {-# LINE 75 "Order.ag" #-}+                                con_+                                {-# LINE 2992 "Order.hs" #-}+                            -- "Order.ag"(line 152, column 18)+                            _gathAltAttrs =+                                {-# LINE 152 "Order.ag" #-}+                                [ AltAttr _LHS inh True | inh <- Map.keys _lhsIinh ]+                                 ++ _childrenIgathAltAttrs+                                 ++ _rulesIgathAltAttrs+                                {-# LINE 2999 "Order.hs" #-}+                            -- "Order.ag"(line 168, column 17)+                            _altAttrs =+                                {-# LINE 168 "Order.ag" #-}+                                Map.fromList (zip _gathAltAttrs [_lhsIvcount..])+                                {-# LINE 3004 "Order.hs" #-}+                            -- "Order.ag"(line 181, column 18)+                            _rulesOchildNts =+                                {-# LINE 181 "Order.ag" #-}+                                Map.fromList (toList _childrenInts)+                                {-# LINE 3009 "Order.hs" #-}+                            -- "Order.ag"(line 182, column 19)+                            _rulesOchildInhs =+                                {-# LINE 182 "Order.ag" #-}+                                Map.fromList (toList _childrenIinhs)+                                {-# LINE 3014 "Order.hs" #-}+                            -- "Order.ag"(line 188, column 18)+                            _inhRules =+                                {-# LINE 188 "Order.ag" #-}+                                [ cRuleLhsInh inh _lhsInt con_ tp | (inh,tp) <- Map.assocs _lhsIinh ]+                                {-# LINE 3019 "Order.hs" #-}+                            -- "Order.ag"(line 189, column 19)+                            _gathRules =+                                {-# LINE 189 "Order.ag" #-}+                                _inhRules ++ toList (_childrenIgathRules Seq.>< _rulesIgathRules)+                                {-# LINE 3024 "Order.hs" #-}+                            -- "Order.ag"(line 243, column 18)+                            _lhsOrules =+                                {-# LINE 243 "Order.ag" #-}+                                Seq.fromList (zip [_lhsIvcount..] _gathRules)+                                {-# LINE 3029 "Order.hs" #-}+                            -- "Order.ag"(line 244, column 19)+                            _lhsOvcount =+                                {-# LINE 244 "Order.ag" #-}+                                _lhsIvcount + length _gathRules+                                {-# LINE 3034 "Order.hs" #-}+                            -- "Order.ag"(line 325, column 17)+                            _rulesOsynsOfChildren =+                                {-# LINE 325 "Order.ag" #-}+                                _childrenIcollectChildrenSyns+                                {-# LINE 3039 "Order.hs" #-}+                            -- "Order.ag"(line 326, column 17)+                            _rulesOinhsOfChildren =+                                {-# LINE 326 "Order.ag" #-}+                                _childrenIcollectChildrenInhs+                                {-# LINE 3044 "Order.hs" #-}+                            -- "Order.ag"(line 351, column 32)+                            _aroundMap =+                                {-# LINE 351 "Order.ag" #-}+                                Map.findWithDefault Map.empty con_ _lhsIaroundMap+                                {-# LINE 3049 "Order.hs" #-}+                            -- "Order.ag"(line 358, column 6)+                            _aroundDep1 =+                                {-# LINE 358 "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 3063 "Order.hs" #-}+                            -- "Order.ag"(line 369, column 6)+                            _aroundDep2 =+                                {-# LINE 369 "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 3077 "Order.hs" #-}+                            -- "Order.ag"(line 380, column 6)+                            _lhsOaroundDep =+                                {-# LINE 380 "Order.ag" #-}+                                _aroundDep1     Seq.>< _aroundDep2+                                {-# LINE 3082 "Order.hs" #-}+                            -- "Order.ag"(line 451, column 18)+                            _lhsOcons =+                                {-# LINE 451 "Order.ag" #-}+                                [con_]+                                {-# LINE 3087 "Order.hs" #-}+                            -- "Order.ag"(line 458, column 16)+                            _typeSigsOtypeSigs =+                                {-# LINE 458 "Order.ag" #-}+                                Map.empty+                                {-# LINE 3092 "Order.hs" #-}+                            -- "Order.ag"(line 464, column 17)+                            _rulesOallTypeSigs =+                                {-# LINE 464 "Order.ag" #-}+                                _typeSigsItypeSigs+                                {-# LINE 3097 "Order.hs" #-}+                            -- "Order.ag"(line 531, column 17)+                            _cVisits =+                                {-# LINE 531 "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 3107 "Order.hs" #-}+                            -- "Order.ag"(line 557, column 18)+                            _lhsOcProduction =+                                {-# LINE 557 "Order.ag" #-}+                                CProduction con_ _cVisits _childrenIfields _childrenIterminals+                                {-# LINE 3112 "Order.hs" #-}+                            -- "Order.ag"(line 584, column 16)+                            _allfields =+                                {-# LINE 584 "Order.ag" #-}+                                _childrenIfields+                                {-# LINE 3117 "Order.hs" #-}+                            -- "Order.ag"(line 584, column 16)+                            _attrs =+                                {-# LINE 585 "Order.ag" #-}+                                map ((,) _LOC)  _rulesIlocVars +++                                map ((,) _INST) _rulesIinstVars +++                                map ((,) _LHS)  _inhnames +++                                concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]+                                {-# LINE 3125 "Order.hs" #-}+                            -- "Order.ag"(line 584, column 16)+                            _inhnames =+                                {-# LINE 589 "Order.ag" #-}+                                Map.keys _lhsIinh+                                {-# LINE 3130 "Order.hs" #-}+                            -- "Order.ag"(line 584, column 16)+                            _synnames =+                                {-# LINE 590 "Order.ag" #-}+                                Map.keys _lhsIsyn+                                {-# LINE 3135 "Order.hs" #-}+                            -- use rule "Order.ag"(line 263, column 71)+                            _lhsOadditionalDep =+                                {-# LINE 263 "Order.ag" #-}+                                _rulesIadditionalDep+                                {-# LINE 3140 "Order.hs" #-}+                            -- use rule "Order.ag"(line 249, column 33)+                            _lhsOdirectDep =+                                {-# LINE 249 "Order.ag" #-}+                                _rulesIdirectDep+                                {-# LINE 3145 "Order.hs" #-}+                            -- use rule "Order.ag"(line 64, column 70)+                            _lhsOerrors =+                                {-# LINE 64 "Order.ag" #-}+                                _childrenIerrors Seq.>< _rulesIerrors+                                {-# LINE 3150 "Order.hs" #-}+                            -- use rule "Order.ag"(line 296, column 31)+                            _lhsOinstDep =+                                {-# LINE 296 "Order.ag" #-}+                                _rulesIinstDep+                                {-# LINE 3155 "Order.hs" #-}+                            -- copy rule (from local)+                            _childrenOallfields =+                                {-# LINE 581 "Order.ag" #-}+                                _allfields+                                {-# LINE 3160 "Order.hs" #-}+                            -- copy rule (down)+                            _childrenOallnts =+                                {-# LINE 574 "Order.ag" #-}+                                _lhsIallnts+                                {-# LINE 3165 "Order.hs" #-}+                            -- copy rule (from local)+                            _childrenOattrs =+                                {-# LINE 581 "Order.ag" #-}+                                _attrs+                                {-# LINE 3170 "Order.hs" #-}+                            -- copy rule (down)+                            _childrenOinh =+                                {-# LINE 69 "Order.ag" #-}+                                _lhsIinh+                                {-# LINE 3175 "Order.hs" #-}+                            -- copy rule (down)+                            _childrenOnt =+                                {-# LINE 69 "Order.ag" #-}+                                _lhsInt+                                {-# LINE 3180 "Order.hs" #-}+                            -- copy rule (down)+                            _childrenOo_unbox =+                                {-# LINE 99 "Order.ag" #-}+                                _lhsIo_unbox+                                {-# LINE 3185 "Order.hs" #-}+                            -- copy rule (down)+                            _childrenOsyn =+                                {-# LINE 69 "Order.ag" #-}+                                _lhsIsyn+                                {-# LINE 3190 "Order.hs" #-}+                            -- copy rule (from local)+                            _rulesOallfields =+                                {-# LINE 581 "Order.ag" #-}+                                _allfields+                                {-# LINE 3195 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOallnts =+                                {-# LINE 574 "Order.ag" #-}+                                _lhsIallnts+                                {-# LINE 3200 "Order.hs" #-}+                            -- copy rule (from local)+                            _rulesOaltAttrs =+                                {-# LINE 166 "Order.ag" #-}+                                _altAttrs+                                {-# LINE 3205 "Order.hs" #-}+                            -- copy rule (from local)+                            _rulesOattrs =+                                {-# LINE 581 "Order.ag" #-}+                                _attrs+                                {-# LINE 3210 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOinh =+                                {-# LINE 69 "Order.ag" #-}+                                _lhsIinh+                                {-# LINE 3215 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOmanualAttrDepMap =+                                {-# LINE 263 "Order.ag" #-}+                                _lhsImanualAttrDepMap+                                {-# LINE 3220 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOnt =+                                {-# LINE 69 "Order.ag" #-}+                                _lhsInt+                                {-# LINE 3225 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOo_case =+                                {-# LINE 97 "Order.ag" #-}+                                _lhsIo_case+                                {-# LINE 3230 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOo_cata =+                                {-# LINE 91 "Order.ag" #-}+                                _lhsIo_cata+                                {-# LINE 3235 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOo_dovisit =+                                {-# LINE 96 "Order.ag" #-}+                                _lhsIo_dovisit+                                {-# LINE 3240 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOo_newtypes =+                                {-# LINE 90 "Order.ag" #-}+                                _lhsIo_newtypes+                                {-# LINE 3245 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOo_rename =+                                {-# LINE 94 "Order.ag" #-}+                                _lhsIo_rename+                                {-# LINE 3250 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOo_sem =+                                {-# LINE 93 "Order.ag" #-}+                                _lhsIo_sem+                                {-# LINE 3255 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOo_sig =+                                {-# LINE 92 "Order.ag" #-}+                                _lhsIo_sig+                                {-# LINE 3260 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOo_wantvisit =+                                {-# LINE 95 "Order.ag" #-}+                                _lhsIo_wantvisit+                                {-# LINE 3265 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOprefix =+                                {-# LINE 98 "Order.ag" #-}+                                _lhsIprefix+                                {-# LINE 3270 "Order.hs" #-}+                            -- copy rule (down)+                            _rulesOsyn =+                                {-# LINE 69 "Order.ag" #-}+                                _lhsIsyn+                                {-# LINE 3275 "Order.hs" #-}+                            ( _childrenIattributes,_childrenIcollectChildrenInhs,_childrenIcollectChildrenSyns,_childrenIerrors,_childrenIfields,_childrenIgathAltAttrs,_childrenIgathRules,_childrenIinhs,_childrenInts,_childrenIsinglevisits,_childrenIterminals) =+                                (children_ _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOnt _childrenOo_unbox _childrenOsyn )+                            ( _rulesIadditionalDep,_rulesIdirectDep,_rulesIerrors,_rulesIgathAltAttrs,_rulesIgathRules,_rulesIinstDep,_rulesIinstVars,_rulesIlocVars) =+                                (rules_ _rulesOallTypeSigs _rulesOallfields _rulesOallnts _rulesOaltAttrs _rulesOattrs _rulesOchildInhs _rulesOchildNts _rulesOcon _rulesOinh _rulesOinhsOfChildren _rulesOmanualAttrDepMap _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,_lhsOrules,_lhsOvcount))) )+-- Productions -------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allnts               : [Identifier]+         aroundMap            : Map ConstructorIdent (Map Identifier [Expression])+         cVisitsMap           : CVisitsMap+         inh                  : Attributes+         manualAttrDepMap     : AttrOrderMap+         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+         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 ->+                                        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 (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),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),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 _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,_lhsOrules,_lhsOvcount) =+             (sem _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsImanualAttrDepMap _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 _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+                      _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)+                             _lhsOrules :: (Seq (Vertex,CRule))+                             _lhsOvcount :: Int+                             _hdOallnts :: ([Identifier])+                             _hdOaroundMap :: (Map ConstructorIdent (Map Identifier [Expression]))+                             _hdOcVisitsMap :: CVisitsMap+                             _hdOinh :: Attributes+                             _hdOmanualAttrDepMap :: AttrOrderMap+                             _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+                             _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)+                             _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)+                             _tlIrules :: (Seq (Vertex,CRule))+                             _tlIvcount :: Int+                             -- "Order.ag"(line 554, column 12)+                             _lhsOcProductions =+                                 {-# LINE 554 "Order.ag" #-}+                                 _hdIcProduction : _tlIcProductions+                                 {-# LINE 3444 "Order.hs" #-}+                             -- use rule "Order.ag"(line 263, column 71)+                             _lhsOadditionalDep =+                                 {-# LINE 263 "Order.ag" #-}+                                 _hdIadditionalDep Seq.>< _tlIadditionalDep+                                 {-# LINE 3449 "Order.hs" #-}+                             -- use rule "Order.ag"(line 342, column 24)+                             _lhsOaroundDep =+                                 {-# LINE 342 "Order.ag" #-}+                                 _hdIaroundDep Seq.>< _tlIaroundDep+                                 {-# LINE 3454 "Order.hs" #-}+                             -- use rule "Order.ag"(line 449, column 40)+                             _lhsOcons =+                                 {-# LINE 449 "Order.ag" #-}+                                 _hdIcons ++ _tlIcons+                                 {-# LINE 3459 "Order.hs" #-}+                             -- use rule "Order.ag"(line 249, column 33)+                             _lhsOdirectDep =+                                 {-# LINE 249 "Order.ag" #-}+                                 _hdIdirectDep Seq.>< _tlIdirectDep+                                 {-# LINE 3464 "Order.hs" #-}+                             -- use rule "Order.ag"(line 64, column 70)+                             _lhsOerrors =+                                 {-# LINE 64 "Order.ag" #-}+                                 _hdIerrors Seq.>< _tlIerrors+                                 {-# LINE 3469 "Order.hs" #-}+                             -- use rule "Order.ag"(line 296, column 31)+                             _lhsOinstDep =+                                 {-# LINE 296 "Order.ag" #-}+                                 _hdIinstDep Seq.>< _tlIinstDep+                                 {-# LINE 3474 "Order.hs" #-}+                             -- use rule "Order.ag"(line 239, column 18)+                             _lhsOrules =+                                 {-# LINE 239 "Order.ag" #-}+                                 _hdIrules Seq.>< _tlIrules+                                 {-# LINE 3479 "Order.hs" #-}+                             -- copy rule (up)+                             _lhsOvcount =+                                 {-# LINE 238 "Order.ag" #-}+                                 _tlIvcount+                                 {-# LINE 3484 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOallnts =+                                 {-# LINE 574 "Order.ag" #-}+                                 _lhsIallnts+                                 {-# LINE 3489 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOaroundMap =+                                 {-# LINE 348 "Order.ag" #-}+                                 _lhsIaroundMap+                                 {-# LINE 3494 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOcVisitsMap =+                                 {-# LINE 529 "Order.ag" #-}+                                 _lhsIcVisitsMap+                                 {-# LINE 3499 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOinh =+                                 {-# LINE 69 "Order.ag" #-}+                                 _lhsIinh+                                 {-# LINE 3504 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOmanualAttrDepMap =+                                 {-# LINE 263 "Order.ag" #-}+                                 _lhsImanualAttrDepMap+                                 {-# LINE 3509 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOnt =+                                 {-# LINE 69 "Order.ag" #-}+                                 _lhsInt+                                 {-# LINE 3514 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOo_case =+                                 {-# LINE 97 "Order.ag" #-}+                                 _lhsIo_case+                                 {-# LINE 3519 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOo_cata =+                                 {-# LINE 91 "Order.ag" #-}+                                 _lhsIo_cata+                                 {-# LINE 3524 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOo_dovisit =+                                 {-# LINE 96 "Order.ag" #-}+                                 _lhsIo_dovisit+                                 {-# LINE 3529 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOo_newtypes =+                                 {-# LINE 90 "Order.ag" #-}+                                 _lhsIo_newtypes+                                 {-# LINE 3534 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOo_rename =+                                 {-# LINE 94 "Order.ag" #-}+                                 _lhsIo_rename+                                 {-# LINE 3539 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOo_sem =+                                 {-# LINE 93 "Order.ag" #-}+                                 _lhsIo_sem+                                 {-# LINE 3544 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOo_sig =+                                 {-# LINE 92 "Order.ag" #-}+                                 _lhsIo_sig+                                 {-# LINE 3549 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOo_unbox =+                                 {-# LINE 99 "Order.ag" #-}+                                 _lhsIo_unbox+                                 {-# LINE 3554 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOo_wantvisit =+                                 {-# LINE 95 "Order.ag" #-}+                                 _lhsIo_wantvisit+                                 {-# LINE 3559 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOprefix =+                                 {-# LINE 98 "Order.ag" #-}+                                 _lhsIprefix+                                 {-# LINE 3564 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOsyn =+                                 {-# LINE 69 "Order.ag" #-}+                                 _lhsIsyn+                                 {-# LINE 3569 "Order.hs" #-}+                             -- copy rule (down)+                             _hdOvcount =+                                 {-# LINE 238 "Order.ag" #-}+                                 _lhsIvcount+                                 {-# LINE 3574 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOallnts =+                                 {-# LINE 574 "Order.ag" #-}+                                 _lhsIallnts+                                 {-# LINE 3579 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOaroundMap =+                                 {-# LINE 348 "Order.ag" #-}+                                 _lhsIaroundMap+                                 {-# LINE 3584 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOcVisitsMap =+                                 {-# LINE 529 "Order.ag" #-}+                                 _lhsIcVisitsMap+                                 {-# LINE 3589 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOinh =+                                 {-# LINE 69 "Order.ag" #-}+                                 _lhsIinh+                                 {-# LINE 3594 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOmanualAttrDepMap =+                                 {-# LINE 263 "Order.ag" #-}+                                 _lhsImanualAttrDepMap+                                 {-# LINE 3599 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOnt =+                                 {-# LINE 69 "Order.ag" #-}+                                 _lhsInt+                                 {-# LINE 3604 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOo_case =+                                 {-# LINE 97 "Order.ag" #-}+                                 _lhsIo_case+                                 {-# LINE 3609 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOo_cata =+                                 {-# LINE 91 "Order.ag" #-}+                                 _lhsIo_cata+                                 {-# LINE 3614 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOo_dovisit =+                                 {-# LINE 96 "Order.ag" #-}+                                 _lhsIo_dovisit+                                 {-# LINE 3619 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOo_newtypes =+                                 {-# LINE 90 "Order.ag" #-}+                                 _lhsIo_newtypes+                                 {-# LINE 3624 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOo_rename =+                                 {-# LINE 94 "Order.ag" #-}+                                 _lhsIo_rename+                                 {-# LINE 3629 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOo_sem =+                                 {-# LINE 93 "Order.ag" #-}+                                 _lhsIo_sem+                                 {-# LINE 3634 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOo_sig =+                                 {-# LINE 92 "Order.ag" #-}+                                 _lhsIo_sig+                                 {-# LINE 3639 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOo_unbox =+                                 {-# LINE 99 "Order.ag" #-}+                                 _lhsIo_unbox+                                 {-# LINE 3644 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOo_wantvisit =+                                 {-# LINE 95 "Order.ag" #-}+                                 _lhsIo_wantvisit+                                 {-# LINE 3649 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOprefix =+                                 {-# LINE 98 "Order.ag" #-}+                                 _lhsIprefix+                                 {-# LINE 3654 "Order.hs" #-}+                             -- copy rule (down)+                             _tlOsyn =+                                 {-# LINE 69 "Order.ag" #-}+                                 _lhsIsyn+                                 {-# LINE 3659 "Order.hs" #-}+                             -- copy rule (chain)+                             _tlOvcount =+                                 {-# LINE 238 "Order.ag" #-}+                                 _hdIvcount+                                 {-# LINE 3664 "Order.hs" #-}+                             ( _hdIadditionalDep,_hdIaroundDep,_hdIcProduction,_hdIcons,_hdIdirectDep,_hdIerrors,_hdIinstDep,_hdIrules,_hdIvcount) =+                                 (hd_ _hdOallnts _hdOaroundMap _hdOcVisitsMap _hdOinh _hdOmanualAttrDepMap _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,_tlIrules,_tlIvcount) =+                                 (tl_ _tlOallnts _tlOaroundMap _tlOcVisitsMap _tlOinh _tlOmanualAttrDepMap _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,_lhsOrules,_lhsOvcount))) )+sem_Productions_Nil :: T_Productions +sem_Productions_Nil  =+    (T_Productions (\ _lhsIallnts+                      _lhsIaroundMap+                      _lhsIcVisitsMap+                      _lhsIinh+                      _lhsImanualAttrDepMap+                      _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)+                             _lhsOrules :: (Seq (Vertex,CRule))+                             _lhsOvcount :: Int+                             -- "Order.ag"(line 555, column 12)+                             _lhsOcProductions =+                                 {-# LINE 555 "Order.ag" #-}+                                 []+                                 {-# LINE 3703 "Order.hs" #-}+                             -- use rule "Order.ag"(line 263, column 71)+                             _lhsOadditionalDep =+                                 {-# LINE 263 "Order.ag" #-}+                                 Seq.empty+                                 {-# LINE 3708 "Order.hs" #-}+                             -- use rule "Order.ag"(line 342, column 24)+                             _lhsOaroundDep =+                                 {-# LINE 342 "Order.ag" #-}+                                 Seq.empty+                                 {-# LINE 3713 "Order.hs" #-}+                             -- use rule "Order.ag"(line 449, column 40)+                             _lhsOcons =+                                 {-# LINE 449 "Order.ag" #-}+                                 []+                                 {-# LINE 3718 "Order.hs" #-}+                             -- use rule "Order.ag"(line 249, column 33)+                             _lhsOdirectDep =+                                 {-# LINE 249 "Order.ag" #-}+                                 Seq.empty+                                 {-# LINE 3723 "Order.hs" #-}+                             -- use rule "Order.ag"(line 64, column 70)+                             _lhsOerrors =+                                 {-# LINE 64 "Order.ag" #-}+                                 Seq.empty+                                 {-# LINE 3728 "Order.hs" #-}+                             -- use rule "Order.ag"(line 296, column 31)+                             _lhsOinstDep =+                                 {-# LINE 296 "Order.ag" #-}+                                 Seq.empty+                                 {-# LINE 3733 "Order.hs" #-}+                             -- use rule "Order.ag"(line 239, column 18)+                             _lhsOrules =+                                 {-# LINE 239 "Order.ag" #-}+                                 Seq.empty+                                 {-# LINE 3738 "Order.hs" #-}+                             -- copy rule (chain)+                             _lhsOvcount =+                                 {-# LINE 238 "Order.ag" #-}+                                 _lhsIvcount+                                 {-# LINE 3743 "Order.hs" #-}+                         in  ( _lhsOadditionalDep,_lhsOaroundDep,_lhsOcProductions,_lhsOcons,_lhsOdirectDep,_lhsOerrors,_lhsOinstDep,_lhsOrules,_lhsOvcount))) )+-- Rule --------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allTypeSigs          : Map Identifier Type+         allfields            : [(Identifier,Type,Bool)]+         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+         manualAttrDepMap     : AttrOrderMap+         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:+         additionalDep        : Seq Edge+         directDep            : Seq Edge+         errors               : Seq Error+         gathAltAttrs         : [AltAttr]+         gathRules            : Seq CRule+         instDep              : Seq Edge+         instVars             : [Identifier]+         locVars              : [Identifier]+   alternatives:+      alternative Rule:+         child pattern        : Pattern +         child rhs            : Expression +         child owrt           : {Bool}+         child origin         : {String}+         visit 0:+            local defines     : _+            local gathRules   : _+            local manualDeps  : _+            local instDep1    : _+            local instDep2    : _+-}+-- cata+sem_Rule :: Rule  ->+            T_Rule +sem_Rule (Rule _pattern _rhs _owrt _origin )  =+    (sem_Rule_Rule (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin )+-- semantic domain+newtype T_Rule  = T_Rule ((Map Identifier Type) ->+                          ([(Identifier,Type,Bool)]) ->+                          ([Identifier]) ->+                          (Map AltAttr Vertex) ->+                          ([(Identifier,Identifier)]) ->+                          (Map Identifier Attributes) ->+                          (Map Identifier NontermIdent) ->+                          Identifier ->+                          Attributes ->+                          (Map Identifier Attributes) ->+                          AttrOrderMap ->+                          Identifier ->+                          Bool ->+                          Bool ->+                          Bool ->+                          Bool ->+                          Bool ->+                          Bool ->+                          Bool ->+                          Bool ->+                          String ->+                          Attributes ->+                          (Map Identifier Attributes) ->+                          ( (Seq Edge),(Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier])))+data Inh_Rule  = Inh_Rule {allTypeSigs_Inh_Rule :: !(Map Identifier Type),allfields_Inh_Rule :: !([(Identifier,Type,Bool)]),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),manualAttrDepMap_Inh_Rule :: !(AttrOrderMap),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 {additionalDep_Syn_Rule :: !(Seq Edge),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])}+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 _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren )  =+    (let ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars) =+             (sem _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren )+     in  (Syn_Rule _lhsOadditionalDep _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars ))+sem_Rule_Rule :: T_Pattern  ->+                 T_Expression  ->+                 Bool ->+                 String ->+                 T_Rule +sem_Rule_Rule (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_  =+    (T_Rule (\ _lhsIallTypeSigs+               _lhsIallfields+               _lhsIallnts+               _lhsIaltAttrs+               _lhsIattrs+               _lhsIchildInhs+               _lhsIchildNts+               _lhsIcon+               _lhsIinh+               _lhsIinhsOfChildren+               _lhsImanualAttrDepMap+               _lhsInt+               _lhsIo_case+               _lhsIo_cata+               _lhsIo_dovisit+               _lhsIo_newtypes+               _lhsIo_rename+               _lhsIo_sem+               _lhsIo_sig+               _lhsIo_wantvisit+               _lhsIprefix+               _lhsIsyn+               _lhsIsynsOfChildren ->+                 (let _lhsOdirectDep :: (Seq Edge)+                      _lhsOadditionalDep :: (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,Bool)])+                      _rhsOallnts :: ([Identifier])+                      _rhsOattrs :: ([(Identifier,Identifier)])+                      _rhsOcon :: 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 197, column 12)+                      _defines =+                          {-# LINE 197 "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 3912 "Order.hs" #-}+                      -- "Order.ag"(line 213, column 12)+                      _gathRules =+                          {-# LINE 213 "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+                                          | (field,attr,tp) <- Map.elems _defines+                                          ]+                          {-# LINE 3920 "Order.hs" #-}+                      -- "Order.ag"(line 251, column 12)+                      _lhsOdirectDep =+                          {-# LINE 251 "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 3928 "Order.hs" #-}+                      -- "Order.ag"(line 269, column 7)+                      _manualDeps =+                          {-# LINE 269 "Order.ag" #-}+                          Set.toList $ Map.findWithDefault Set.empty _lhsIcon $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrDepMap+                          {-# LINE 3933 "Order.hs" #-}+                      -- "Order.ag"(line 271, column 7)+                      _lhsOadditionalDep =+                          {-# LINE 271 "Order.ag" #-}+                          Seq.fromList [ (vertexA, vertexB)+                                       | Dependency (fldA,nmA) (fldB,nmB) <- _manualDeps+                                       , let vertexA = findWithErr2 (AltAttr fldA nmA True) _lhsIaltAttrs+                                       , vertexB <- lookupVertices fldB nmB _lhsIaltAttrs+                                       ]+                          {-# LINE 3942 "Order.hs" #-}+                      -- "Order.ag"(line 299, column 6)+                      _instDep1 =+                          {-# LINE 299 "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 3956 "Order.hs" #-}+                      -- "Order.ag"(line 310, column 6)+                      _instDep2 =+                          {-# LINE 310 "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 3970 "Order.hs" #-}+                      -- "Order.ag"(line 321, column 6)+                      _lhsOinstDep =+                          {-# LINE 321 "Order.ag" #-}+                          _instDep1     Seq.>< _instDep2+                          {-# LINE 3975 "Order.hs" #-}+                      -- use rule "Order.ag"(line 64, column 70)+                      _lhsOerrors =+                          {-# LINE 64 "Order.ag" #-}+                          _patternIerrors Seq.>< _rhsIerrors+                          {-# LINE 3980 "Order.hs" #-}+                      -- use rule "Order.ag"(line 150, column 68)+                      _lhsOgathAltAttrs =+                          {-# LINE 150 "Order.ag" #-}+                          _patternIgathAltAttrs+                          {-# LINE 3985 "Order.hs" #-}+                      -- use rule "Order.ag"(line 186, column 23)+                      _lhsOgathRules =+                          {-# LINE 186 "Order.ag" #-}+                          _gathRules+                          {-# LINE 3990 "Order.hs" #-}+                      -- use rule "Order.ag"(line 604, column 86)+                      _lhsOinstVars =+                          {-# LINE 604 "Order.ag" #-}+                          _patternIinstVars+                          {-# LINE 3995 "Order.hs" #-}+                      -- use rule "Order.ag"(line 604, column 48)+                      _lhsOlocVars =+                          {-# LINE 604 "Order.ag" #-}+                          _patternIlocVars+                          {-# LINE 4000 "Order.hs" #-}+                      -- copy rule (down)+                      _patternOallTypeSigs =+                          {-# LINE 462 "Order.ag" #-}+                          _lhsIallTypeSigs+                          {-# LINE 4005 "Order.hs" #-}+                      -- copy rule (down)+                      _patternOaltAttrs =+                          {-# LINE 166 "Order.ag" #-}+                          _lhsIaltAttrs+                          {-# LINE 4010 "Order.hs" #-}+                      -- copy rule (down)+                      _patternOcon =+                          {-# LINE 70 "Order.ag" #-}+                          _lhsIcon+                          {-# LINE 4015 "Order.hs" #-}+                      -- copy rule (down)+                      _patternOinh =+                          {-# LINE 69 "Order.ag" #-}+                          _lhsIinh+                          {-# LINE 4020 "Order.hs" #-}+                      -- copy rule (down)+                      _patternOnt =+                          {-# LINE 69 "Order.ag" #-}+                          _lhsInt+                          {-# LINE 4025 "Order.hs" #-}+                      -- copy rule (down)+                      _patternOsyn =+                          {-# LINE 69 "Order.ag" #-}+                          _lhsIsyn+                          {-# LINE 4030 "Order.hs" #-}+                      -- copy rule (down)+                      _rhsOallfields =+                          {-# LINE 386 "Order.ag" #-}+                          _lhsIallfields+                          {-# LINE 4035 "Order.hs" #-}+                      -- copy rule (down)+                      _rhsOallnts =+                          {-# LINE 387 "Order.ag" #-}+                          _lhsIallnts+                          {-# LINE 4040 "Order.hs" #-}+                      -- copy rule (down)+                      _rhsOattrs =+                          {-# LINE 388 "Order.ag" #-}+                          _lhsIattrs+                          {-# LINE 4045 "Order.hs" #-}+                      -- copy rule (down)+                      _rhsOcon =+                          {-# LINE 385 "Order.ag" #-}+                          _lhsIcon+                          {-# LINE 4050 "Order.hs" #-}+                      -- copy rule (down)+                      _rhsOnt =+                          {-# LINE 385 "Order.ag" #-}+                          _lhsInt+                          {-# LINE 4055 "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 _rhsOnt )+                  in  ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars))) )+-- Rules -------------------------------------------------------+{-+   visit 0:+      inherited attributes:+         allTypeSigs          : Map Identifier Type+         allfields            : [(Identifier,Type,Bool)]+         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+         manualAttrDepMap     : AttrOrderMap+         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:+         additionalDep        : Seq Edge+         directDep            : Seq Edge+         errors               : Seq Error+         gathAltAttrs         : [AltAttr]+         gathRules            : Seq CRule+         instDep              : Seq Edge+         instVars             : [Identifier]+         locVars              : [Identifier]+   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,Bool)]) ->+                            ([Identifier]) ->+                            (Map AltAttr Vertex) ->+                            ([(Identifier,Identifier)]) ->+                            (Map Identifier Attributes) ->+                            (Map Identifier NontermIdent) ->+                            Identifier ->+                            Attributes ->+                            (Map Identifier Attributes) ->+                            AttrOrderMap ->+                            Identifier ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            Bool ->+                            String ->+                            Attributes ->+                            (Map Identifier Attributes) ->+                            ( (Seq Edge),(Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier])))+data Inh_Rules  = Inh_Rules {allTypeSigs_Inh_Rules :: !(Map Identifier Type),allfields_Inh_Rules :: !([(Identifier,Type,Bool)]),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),manualAttrDepMap_Inh_Rules :: !(AttrOrderMap),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 {additionalDep_Syn_Rules :: !(Seq Edge),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])}+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 _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren )  =+    (let ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars) =+             (sem _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImanualAttrDepMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren )+     in  (Syn_Rules _lhsOadditionalDep _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars ))+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+                _lhsImanualAttrDepMap+                _lhsInt+                _lhsIo_case+                _lhsIo_cata+                _lhsIo_dovisit+                _lhsIo_newtypes+                _lhsIo_rename+                _lhsIo_sem+                _lhsIo_sig+                _lhsIo_wantvisit+                _lhsIprefix+                _lhsIsyn+                _lhsIsynsOfChildren ->+                  (let _lhsOadditionalDep :: (Seq Edge)+                       _lhsOdirectDep :: (Seq Edge)+                       _lhsOerrors :: (Seq Error)+                       _lhsOgathAltAttrs :: ([AltAttr])+                       _lhsOgathRules :: (Seq CRule)+                       _lhsOinstDep :: (Seq Edge)+                       _lhsOinstVars :: ([Identifier])+                       _lhsOlocVars :: ([Identifier])+                       _hdOallTypeSigs :: (Map Identifier Type)+                       _hdOallfields :: ([(Identifier,Type,Bool)])+                       _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)+                       _hdOmanualAttrDepMap :: AttrOrderMap+                       _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,Bool)])+                       _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)+                       _tlOmanualAttrDepMap :: AttrOrderMap+                       _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)+                       _hdIadditionalDep :: (Seq Edge)+                       _hdIdirectDep :: (Seq Edge)+                       _hdIerrors :: (Seq Error)+                       _hdIgathAltAttrs :: ([AltAttr])+                       _hdIgathRules :: (Seq CRule)+                       _hdIinstDep :: (Seq Edge)+                       _hdIinstVars :: ([Identifier])+                       _hdIlocVars :: ([Identifier])+                       _tlIadditionalDep :: (Seq Edge)+                       _tlIdirectDep :: (Seq Edge)+                       _tlIerrors :: (Seq Error)+                       _tlIgathAltAttrs :: ([AltAttr])+                       _tlIgathRules :: (Seq CRule)+                       _tlIinstDep :: (Seq Edge)+                       _tlIinstVars :: ([Identifier])+                       _tlIlocVars :: ([Identifier])+                       -- use rule "Order.ag"(line 263, column 71)+                       _lhsOadditionalDep =+                           {-# LINE 263 "Order.ag" #-}+                           _hdIadditionalDep Seq.>< _tlIadditionalDep+                           {-# LINE 4243 "Order.hs" #-}+                       -- use rule "Order.ag"(line 249, column 33)+                       _lhsOdirectDep =+                           {-# LINE 249 "Order.ag" #-}+                           _hdIdirectDep Seq.>< _tlIdirectDep+                           {-# LINE 4248 "Order.hs" #-}+                       -- use rule "Order.ag"(line 64, column 70)+                       _lhsOerrors =+                           {-# LINE 64 "Order.ag" #-}+                           _hdIerrors Seq.>< _tlIerrors+                           {-# LINE 4253 "Order.hs" #-}+                       -- use rule "Order.ag"(line 150, column 68)+                       _lhsOgathAltAttrs =+                           {-# LINE 150 "Order.ag" #-}+                           _hdIgathAltAttrs ++ _tlIgathAltAttrs+                           {-# LINE 4258 "Order.hs" #-}+                       -- use rule "Order.ag"(line 186, column 23)+                       _lhsOgathRules =+                           {-# LINE 186 "Order.ag" #-}+                           _hdIgathRules Seq.>< _tlIgathRules+                           {-# LINE 4263 "Order.hs" #-}+                       -- use rule "Order.ag"(line 296, column 31)+                       _lhsOinstDep =+                           {-# LINE 296 "Order.ag" #-}+                           _hdIinstDep Seq.>< _tlIinstDep+                           {-# LINE 4268 "Order.hs" #-}+                       -- use rule "Order.ag"(line 604, column 86)+                       _lhsOinstVars =+                           {-# LINE 604 "Order.ag" #-}+                           _hdIinstVars ++ _tlIinstVars+                           {-# LINE 4273 "Order.hs" #-}+                       -- use rule "Order.ag"(line 604, column 48)+                       _lhsOlocVars =+                           {-# LINE 604 "Order.ag" #-}+                           _hdIlocVars ++ _tlIlocVars+                           {-# LINE 4278 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOallTypeSigs =+                           {-# LINE 462 "Order.ag" #-}+                           _lhsIallTypeSigs+                           {-# LINE 4283 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOallfields =+                           {-# LINE 581 "Order.ag" #-}+                           _lhsIallfields+                           {-# LINE 4288 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOallnts =+                           {-# LINE 574 "Order.ag" #-}+                           _lhsIallnts+                           {-# LINE 4293 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOaltAttrs =+                           {-# LINE 166 "Order.ag" #-}+                           _lhsIaltAttrs+                           {-# LINE 4298 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOattrs =+                           {-# LINE 581 "Order.ag" #-}+                           _lhsIattrs+                           {-# LINE 4303 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOchildInhs =+                           {-# LINE 179 "Order.ag" #-}+                           _lhsIchildInhs+                           {-# LINE 4308 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOchildNts =+                           {-# LINE 178 "Order.ag" #-}+                           _lhsIchildNts+                           {-# LINE 4313 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOcon =+                           {-# LINE 70 "Order.ag" #-}+                           _lhsIcon+                           {-# LINE 4318 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOinh =+                           {-# LINE 69 "Order.ag" #-}+                           _lhsIinh+                           {-# LINE 4323 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOinhsOfChildren =+                           {-# LINE 323 "Order.ag" #-}+                           _lhsIinhsOfChildren+                           {-# LINE 4328 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOmanualAttrDepMap =+                           {-# LINE 263 "Order.ag" #-}+                           _lhsImanualAttrDepMap+                           {-# LINE 4333 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOnt =+                           {-# LINE 69 "Order.ag" #-}+                           _lhsInt+                           {-# LINE 4338 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOo_case =+                           {-# LINE 97 "Order.ag" #-}+                           _lhsIo_case+                           {-# LINE 4343 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOo_cata =+                           {-# LINE 91 "Order.ag" #-}+                           _lhsIo_cata+                           {-# LINE 4348 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOo_dovisit =+                           {-# LINE 96 "Order.ag" #-}+                           _lhsIo_dovisit+                           {-# LINE 4353 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOo_newtypes =+                           {-# LINE 90 "Order.ag" #-}+                           _lhsIo_newtypes+                           {-# LINE 4358 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOo_rename =+                           {-# LINE 94 "Order.ag" #-}+                           _lhsIo_rename+                           {-# LINE 4363 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOo_sem =+                           {-# LINE 93 "Order.ag" #-}+                           _lhsIo_sem+                           {-# LINE 4368 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOo_sig =+                           {-# LINE 92 "Order.ag" #-}+                           _lhsIo_sig+                           {-# LINE 4373 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOo_wantvisit =+                           {-# LINE 95 "Order.ag" #-}+                           _lhsIo_wantvisit+                           {-# LINE 4378 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOprefix =+                           {-# LINE 98 "Order.ag" #-}+                           _lhsIprefix+                           {-# LINE 4383 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOsyn =+                           {-# LINE 69 "Order.ag" #-}+                           _lhsIsyn+                           {-# LINE 4388 "Order.hs" #-}+                       -- copy rule (down)+                       _hdOsynsOfChildren =+                           {-# LINE 323 "Order.ag" #-}+                           _lhsIsynsOfChildren+                           {-# LINE 4393 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOallTypeSigs =+                           {-# LINE 462 "Order.ag" #-}+                           _lhsIallTypeSigs+                           {-# LINE 4398 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOallfields =+                           {-# LINE 581 "Order.ag" #-}+                           _lhsIallfields+                           {-# LINE 4403 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOallnts =+                           {-# LINE 574 "Order.ag" #-}+                           _lhsIallnts+                           {-# LINE 4408 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOaltAttrs =+                           {-# LINE 166 "Order.ag" #-}+                           _lhsIaltAttrs+                           {-# LINE 4413 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOattrs =+                           {-# LINE 581 "Order.ag" #-}+                           _lhsIattrs+                           {-# LINE 4418 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOchildInhs =+                           {-# LINE 179 "Order.ag" #-}+                           _lhsIchildInhs+                           {-# LINE 4423 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOchildNts =+                           {-# LINE 178 "Order.ag" #-}+                           _lhsIchildNts+                           {-# LINE 4428 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOcon =+                           {-# LINE 70 "Order.ag" #-}+                           _lhsIcon+                           {-# LINE 4433 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOinh =+                           {-# LINE 69 "Order.ag" #-}+                           _lhsIinh+                           {-# LINE 4438 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOinhsOfChildren =+                           {-# LINE 323 "Order.ag" #-}+                           _lhsIinhsOfChildren+                           {-# LINE 4443 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOmanualAttrDepMap =+                           {-# LINE 263 "Order.ag" #-}+                           _lhsImanualAttrDepMap+                           {-# LINE 4448 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOnt =+                           {-# LINE 69 "Order.ag" #-}+                           _lhsInt+                           {-# LINE 4453 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOo_case =+                           {-# LINE 97 "Order.ag" #-}+                           _lhsIo_case+                           {-# LINE 4458 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOo_cata =+                           {-# LINE 91 "Order.ag" #-}+                           _lhsIo_cata+                           {-# LINE 4463 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOo_dovisit =+                           {-# LINE 96 "Order.ag" #-}+                           _lhsIo_dovisit+                           {-# LINE 4468 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOo_newtypes =+                           {-# LINE 90 "Order.ag" #-}+                           _lhsIo_newtypes+                           {-# LINE 4473 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOo_rename =+                           {-# LINE 94 "Order.ag" #-}+                           _lhsIo_rename+                           {-# LINE 4478 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOo_sem =+                           {-# LINE 93 "Order.ag" #-}+                           _lhsIo_sem+                           {-# LINE 4483 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOo_sig =+                           {-# LINE 92 "Order.ag" #-}+                           _lhsIo_sig+                           {-# LINE 4488 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOo_wantvisit =+                           {-# LINE 95 "Order.ag" #-}+                           _lhsIo_wantvisit+                           {-# LINE 4493 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOprefix =+                           {-# LINE 98 "Order.ag" #-}+                           _lhsIprefix+                           {-# LINE 4498 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOsyn =+                           {-# LINE 69 "Order.ag" #-}+                           _lhsIsyn+                           {-# LINE 4503 "Order.hs" #-}+                       -- copy rule (down)+                       _tlOsynsOfChildren =+                           {-# LINE 323 "Order.ag" #-}+                           _lhsIsynsOfChildren+                           {-# LINE 4508 "Order.hs" #-}+                       ( _hdIadditionalDep,_hdIdirectDep,_hdIerrors,_hdIgathAltAttrs,_hdIgathRules,_hdIinstDep,_hdIinstVars,_hdIlocVars) =+                           (hd_ _hdOallTypeSigs _hdOallfields _hdOallnts _hdOaltAttrs _hdOattrs _hdOchildInhs _hdOchildNts _hdOcon _hdOinh _hdOinhsOfChildren _hdOmanualAttrDepMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_wantvisit _hdOprefix _hdOsyn _hdOsynsOfChildren )+                       ( _tlIadditionalDep,_tlIdirectDep,_tlIerrors,_tlIgathAltAttrs,_tlIgathRules,_tlIinstDep,_tlIinstVars,_tlIlocVars) =+                           (tl_ _tlOallTypeSigs _tlOallfields _tlOallnts _tlOaltAttrs _tlOattrs _tlOchildInhs _tlOchildNts _tlOcon _tlOinh _tlOinhsOfChildren _tlOmanualAttrDepMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_wantvisit _tlOprefix _tlOsyn _tlOsynsOfChildren )+                   in  ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars))) )+sem_Rules_Nil :: T_Rules +sem_Rules_Nil  =+    (T_Rules (\ _lhsIallTypeSigs+                _lhsIallfields+                _lhsIallnts+                _lhsIaltAttrs+                _lhsIattrs+                _lhsIchildInhs+                _lhsIchildNts+                _lhsIcon+                _lhsIinh+                _lhsIinhsOfChildren+                _lhsImanualAttrDepMap+                _lhsInt+                _lhsIo_case+                _lhsIo_cata+                _lhsIo_dovisit+                _lhsIo_newtypes+                _lhsIo_rename+                _lhsIo_sem+                _lhsIo_sig+                _lhsIo_wantvisit+                _lhsIprefix+                _lhsIsyn+                _lhsIsynsOfChildren ->+                  (let _lhsOadditionalDep :: (Seq Edge)+                       _lhsOdirectDep :: (Seq Edge)+                       _lhsOerrors :: (Seq Error)+                       _lhsOgathAltAttrs :: ([AltAttr])+                       _lhsOgathRules :: (Seq CRule)+                       _lhsOinstDep :: (Seq Edge)+                       _lhsOinstVars :: ([Identifier])+                       _lhsOlocVars :: ([Identifier])+                       -- use rule "Order.ag"(line 263, column 71)+                       _lhsOadditionalDep =+                           {-# LINE 263 "Order.ag" #-}+                           Seq.empty+                           {-# LINE 4551 "Order.hs" #-}+                       -- use rule "Order.ag"(line 249, column 33)+                       _lhsOdirectDep =+                           {-# LINE 249 "Order.ag" #-}+                           Seq.empty+                           {-# LINE 4556 "Order.hs" #-}+                       -- use rule "Order.ag"(line 64, column 70)+                       _lhsOerrors =+                           {-# LINE 64 "Order.ag" #-}+                           Seq.empty+                           {-# LINE 4561 "Order.hs" #-}+                       -- use rule "Order.ag"(line 150, column 68)+                       _lhsOgathAltAttrs =+                           {-# LINE 150 "Order.ag" #-}+                           []+                           {-# LINE 4566 "Order.hs" #-}+                       -- use rule "Order.ag"(line 186, column 23)+                       _lhsOgathRules =+                           {-# LINE 186 "Order.ag" #-}+                           Seq.empty+                           {-# LINE 4571 "Order.hs" #-}+                       -- use rule "Order.ag"(line 296, column 31)+                       _lhsOinstDep =+                           {-# LINE 296 "Order.ag" #-}+                           Seq.empty+                           {-# LINE 4576 "Order.hs" #-}+                       -- use rule "Order.ag"(line 604, column 86)+                       _lhsOinstVars =+                           {-# LINE 604 "Order.ag" #-}+                           []+                           {-# LINE 4581 "Order.hs" #-}+                       -- use rule "Order.ag"(line 604, column 48)+                       _lhsOlocVars =+                           {-# LINE 604 "Order.ag" #-}+                           []+                           {-# LINE 4586 "Order.hs" #-}+                   in  ( _lhsOadditionalDep,_lhsOdirectDep,_lhsOerrors,_lhsOgathAltAttrs,_lhsOgathRules,_lhsOinstDep,_lhsOinstVars,_lhsOlocVars))) )+-- 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 460, column 13)+                         _lhsOtypeSigs =+                             {-# LINE 460 "Order.ag" #-}+                             Map.insert name_ tp_ _lhsItypeSigs+                             {-# LINE 4625 "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 456 "Order.ag" #-}+                              _tlItypeSigs+                              {-# LINE 4669 "Order.hs" #-}+                          -- copy rule (down)+                          _hdOtypeSigs =+                              {-# LINE 456 "Order.ag" #-}+                              _lhsItypeSigs+                              {-# LINE 4674 "Order.hs" #-}+                          -- copy rule (chain)+                          _tlOtypeSigs =+                              {-# LINE 456 "Order.ag" #-}+                              _hdItypeSigs+                              {-# LINE 4679 "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 456 "Order.ag" #-}+                              _lhsItypeSigs+                              {-# LINE 4693 "Order.hs" #-}                       in  ( _lhsOtypeSigs))) )
src-derived/Patterns.hs view
@@ -2,10 +2,12 @@  -- UUAGC 0.9.14 (Patterns.ag) module Patterns where+{-# LINE 2 "Patterns.ag" #-}  -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 11 "../src-derived/Patterns.hs" #-} -- Pattern ----------------------------------------------------- {-    visit 0:
src-derived/PrintCode.hs view
@@ -2,2243 +2,2923 @@  -- UUAGC 0.9.14 (PrintCode.ag) module PrintCode where--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)---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----- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)--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----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----locname' n = "_loc_" ++ getName n---renderDocs :: [PP_Doc] -> String-renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""---writeModule :: FilePath -> [PP_Doc] -> IO ()-writeModule path docs-  = do bExists <- doesFileExist path-       if bExists-        then do input <- readFile path-                seq (length input) (return ())-                if input /= output-                 then dumpIt-                 else return ()-        else dumpIt-  where-    output = renderDocs docs-    dumpIt = writeFile path output----- 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--- 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 (_lhsIoutputfile) of-                     { !_exprOoutputfile ->-                     (case (_lhsIoptions) of-                      { !_exprOoptions ->-                      (case (_lhsInested) of-                       { !_exprOnested ->-                       (case (_lhsIoutputfile) of-                        { !_leftOoutputfile ->-                        (case (_lhsIoptions) of-                         { !_leftOoptions ->-                         (case (_lhsInested) of-                          { !_leftOnested ->-                          (case (False) of-                           { !_leftOisDeclOfLet ->-                           (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of-                            { ( !_exprIpp) ->-                            (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of-                             { ( !_leftIpp) ->-                             (case (["{" >#< _leftIpp >#< "->", _exprIpp >#< "}"]) 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 (_lhsIoutputfile) of-                      { !_tlOoutputfile ->-                      (case (_lhsIoptions) of-                       { !_tlOoptions ->-                       (case (_lhsInested) of-                        { !_tlOnested ->-                        (case (_lhsIoutputfile) of-                         { !_hdOoutputfile ->-                         (case (_lhsIoptions) of-                          { !_hdOoptions ->-                          (case (_lhsInested) of-                           { !_hdOnested ->-                           (case ((tl_ _tlOnested _tlOoptions _tlOoutputfile )) of-                            { ( !_tlIpps) ->-                            (case ((hd_ _hdOnested _hdOoptions _hdOoutputfile )) of-                             { ( !_hdIpps) ->-                             (case (_hdIpps ++ _tlIpps) of-                              { !_lhsOpps ->-                              ( _lhsOpps) }) }) }) }) }) }) }) }) })) )-sem_CaseAlts_Nil :: T_CaseAlts -sem_CaseAlts_Nil  =-    (T_CaseAlts (\ (!_lhsInested)-                   (!_lhsIoptions)-                   (!_lhsIoutputfile) ->-                     (case ([]) 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 (if sepSemMods _lhsIoptions-                         then _lhsImainFile ++ "_" ++ name_ ++ ".hs"-                         else _lhsImainFile ++ ".hs") of-                   { !_outputfile ->-                   (case (_outputfile) of-                    { !_semDomOoutputfile ->-                    (case (_lhsIoptions) of-                     { !_semDomOoptions ->-                     (case (_lhsInested) of-                      { !_semDomOnested ->-                      (case (_lhsIisDeclOfLet) of-                       { !_semDomOisDeclOfLet ->-                       (case (_outputfile) of-                        { !_dataDefOoutputfile ->-                        (case (_lhsIoptions) of-                         { !_dataDefOoptions ->-                         (case (_lhsInested) of-                          { !_dataDefOnested ->-                          (case (_lhsIisDeclOfLet) of-                           { !_dataDefOisDeclOfLet ->-                           (case (_outputfile) of-                            { !_commentOoutputfile ->-                            (case (_lhsIoptions) of-                             { !_commentOoptions ->-                             (case (_lhsInested) of-                              { !_commentOnested ->-                              (case (_lhsIisDeclOfLet) 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 ([ [_commentIpp]-                                         , _dataDefIpps-                                         , _semDomIpps-                                         ]) of-                                   { !_lhsOappendCommon ->-                                   (case (_outputfile) of-                                    { !_semWrapperOoutputfile ->-                                    (case (_lhsIoptions) of-                                     { !_semWrapperOoptions ->-                                     (case (_lhsInested) of-                                      { !_semWrapperOnested ->-                                      (case (_lhsIisDeclOfLet) of-                                       { !_semWrapperOisDeclOfLet ->-                                       (case (_outputfile) of-                                        { !_cataFunOoutputfile ->-                                        (case (_lhsIoptions) of-                                         { !_cataFunOoptions ->-                                         (case (_lhsInested) of-                                          { !_cataFunOnested ->-                                          (case (_lhsIisDeclOfLet) of-                                           { !_cataFunOisDeclOfLet ->-                                           (case ((semWrapper_ _semWrapperOisDeclOfLet _semWrapperOnested _semWrapperOoptions _semWrapperOoutputfile )) of-                                            { ( !_semWrapperIpps) ->-                                            (case ((cataFun_ _cataFunOisDeclOfLet _cataFunOnested _cataFunOoptions _cataFunOoutputfile )) of-                                             { ( !_cataFunIpps) ->-                                             (case ([ [_commentIpp]-                                                    , _cataFunIpps-                                                    , _semWrapperIpps-                                                    ]) of-                                              { !_lhsOappendMain ->-                                              (case (_outputfile) of-                                               { !_semFunctionsOoutputfile ->-                                               (case (_lhsIoptions) of-                                                { !_semFunctionsOoptions ->-                                                (case (_lhsInested) of-                                                 { !_semFunctionsOnested ->-                                                 (case (_lhsIisDeclOfLet) of-                                                  { !_semFunctionsOisDeclOfLet ->-                                                  (case (_outputfile) of-                                                   { !_infoOoutputfile ->-                                                   (case (_lhsIoptions) of-                                                    { !_infoOoptions ->-                                                    (case (_lhsInested) of-                                                     { !_infoOnested ->-                                                     (case (_lhsIisDeclOfLet) of-                                                      { !_infoOisDeclOfLet ->-                                                      (case (concat $ intersperse "," semNames_) of-                                                       { !_exports ->-                                                       (case ((semFunctions_ _semFunctionsOisDeclOfLet _semFunctionsOnested _semFunctionsOoptions _semFunctionsOoutputfile )) of-                                                        { ( !_semFunctionsIpps) ->-                                                        (case ((info_ _infoOisDeclOfLet _infoOnested _infoOoptions _infoOoutputfile )) of-                                                         { ( !_infoIpps) ->-                                                         (case (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-                                                                  ]) of-                                                          { !_lhsOgenSems ->-                                                          (case (["import " ++ _lhsImainName ++ "_" ++ name_ ++ "\n"]) of-                                                           { !_lhsOimports ->-                                                           (case (_commentIpp-                                                                  :  _infoIpps-                                                                  ++ _dataDefIpps-                                                                  ++ _cataFunIpps-                                                                  ++ _semDomIpps-                                                                  ++ _semWrapperIpps-                                                                  ++ _semFunctionsIpps-                                                                  ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]) 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 (_lhsIoptions) of-                    { !_tlOoptions ->-                    (case (_lhsInested) of-                     { !_tlOnested ->-                     (case (_lhsImainFile) of-                      { !_tlOmainFile ->-                      (case (_lhsIisDeclOfLet) of-                       { !_tlOisDeclOfLet ->-                       (case (_lhsIoptions) of-                        { !_hdOoptions ->-                        (case (_lhsInested) of-                         { !_hdOnested ->-                         (case (_lhsImainFile) of-                          { !_hdOmainFile ->-                          (case (_lhsIisDeclOfLet) of-                           { !_hdOisDeclOfLet ->-                           (case (_lhsItextBlocks) of-                            { !_tlOtextBlocks ->-                            (case (_lhsItextBlockMap) of-                             { !_tlOtextBlockMap ->-                             (case (_lhsIpragmaBlocks) of-                              { !_tlOpragmaBlocks ->-                              (case (_lhsIoptionsLine) of-                               { !_tlOoptionsLine ->-                               (case (_lhsImoduleHeader) of-                                { !_tlOmoduleHeader ->-                                (case (_lhsImainName) of-                                 { !_tlOmainName ->-                                 (case (_lhsIimportBlocks) of-                                  { !_tlOimportBlocks ->-                                  (case ((tl_ _tlOimportBlocks _tlOisDeclOfLet _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnested _tlOoptions _tlOoptionsLine _tlOpragmaBlocks _tlOtextBlockMap _tlOtextBlocks )) of-                                   { ( !_tlIappendCommon,!_tlIappendMain,!_tlIgenSems,!_tlIimports,!_tlIpps) ->-                                   (case (_lhsItextBlocks) of-                                    { !_hdOtextBlocks ->-                                    (case (_lhsItextBlockMap) of-                                     { !_hdOtextBlockMap ->-                                     (case (_lhsIpragmaBlocks) of-                                      { !_hdOpragmaBlocks ->-                                      (case (_lhsIoptionsLine) of-                                       { !_hdOoptionsLine ->-                                       (case (_lhsImoduleHeader) of-                                        { !_hdOmoduleHeader ->-                                        (case (_lhsImainName) of-                                         { !_hdOmainName ->-                                         (case (_lhsIimportBlocks) of-                                          { !_hdOimportBlocks ->-                                          (case ((hd_ _hdOimportBlocks _hdOisDeclOfLet _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnested _hdOoptions _hdOoptionsLine _hdOpragmaBlocks _hdOtextBlockMap _hdOtextBlocks )) of-                                           { ( !_hdIappendCommon,!_hdIappendMain,!_hdIgenSems,!_hdIimports,!_hdIpps) ->-                                           (case (_hdIappendCommon ++ _tlIappendCommon) of-                                            { !_lhsOappendCommon ->-                                            (case (_hdIappendMain ++ _tlIappendMain) of-                                             { !_lhsOappendMain ->-                                             (case (_hdIgenSems >> _tlIgenSems) of-                                              { !_lhsOgenSems ->-                                              (case (_hdIimports ++ _tlIimports) of-                                               { !_lhsOimports ->-                                               (case (_hdIpps ++ _tlIpps) 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 ([]) of-                    { !_lhsOappendCommon ->-                    (case ([]) of-                     { !_lhsOappendMain ->-                     (case (return ()) of-                      { !_lhsOgenSems ->-                      (case ([]) of-                       { !_lhsOimports ->-                       (case ([]) 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           : {[String]}-      alternative Record:-         child name           : {String}-         child args           : {[(String,String)]}--}--- cata-sem_DataAlt :: DataAlt  ->-               T_DataAlt -sem_DataAlt !(DataAlt _name _args )  =-    (sem_DataAlt_DataAlt _name _args )-sem_DataAlt !(Record _name _args )  =-    (sem_DataAlt_Record _name _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 ->-                       ([String]) ->-                       T_DataAlt -sem_DataAlt_DataAlt !name_ !args_  =-    (T_DataAlt (\ (!_lhsInested)-                  (!_lhsIstrictPre) ->-                    (case (name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens . text) args_)) of-                     { !_lhsOpp ->-                     ( _lhsOpp) })) )-sem_DataAlt_Record :: String ->-                      ([(String,String)]) ->-                      T_DataAlt -sem_DataAlt_Record !name_ !args_  =-    (T_DataAlt (\ (!_lhsInested)-                  (!_lhsIstrictPre) ->-                    (case (name_ >#< pp_block "{" "}" ","-                                              [ f >#< "::" >#< t | (f,t) <- args_ ]) 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 (_lhsIstrictPre) of-                      { !_tlOstrictPre ->-                      (case (_lhsIstrictPre) of-                       { !_hdOstrictPre ->-                       (case (_lhsInested) of-                        { !_tlOnested ->-                        (case ((tl_ _tlOnested _tlOstrictPre )) of-                         { ( !_tlIpps) ->-                         (case (_lhsInested) of-                          { !_hdOnested ->-                          (case ((hd_ _hdOnested _hdOstrictPre )) of-                           { ( !_hdIpp) ->-                           (case (_hdIpp : _tlIpps) of-                            { !_lhsOpps ->-                            ( _lhsOpps) }) }) }) }) }) }) })) )-sem_DataAlts_Nil :: T_DataAlts -sem_DataAlts_Nil  =-    (T_DataAlts (\ (!_lhsInested)-                   (!_lhsIstrictPre) ->-                     (case ([]) of-                      { !_lhsOpps ->-                      ( _lhsOpps) })) )--- Decl ---------------------------------------------------------{--   visit 0:-      inherited attributes:-         isDeclOfLet          : Bool-         nested               : Bool-         options              : Options-         outputfile           : String-      synthesized attribute:-         pp                   : PP_Doc-   alternatives:-      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 NewType:-         child name           : {String}-         child params         : {[String]}-         child con            : {String}-         child tp             : Type -      alternative PragmaDecl:-         child txt            : {String}-      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 !(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 !(NewType _name _params _con _tp )  =-    (sem_Decl_NewType _name _params _con (sem_Type _tp ) )-sem_Decl !(PragmaDecl _txt )  =-    (sem_Decl_PragmaDecl _txt )-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_Comment :: String ->-                    T_Decl -sem_Decl_Comment !txt_  =-    (T_Decl (\ (!_lhsIisDeclOfLet)-               (!_lhsInested)-               (!_lhsIoptions)-               (!_lhsIoutputfile) ->-                 (case (if '\n' `elem` txt_-                          then "{-" >-< vlist (lines txt_) >-< "-}"-                          else "--" >#< txt_) 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 (if strict_ then pp "!" else empty) of-                  { !_altsOstrictPre ->-                  (case (_lhsInested) of-                   { !_altsOnested ->-                   (case ((alts_ _altsOnested _altsOstrictPre )) of-                    { ( !_altsIpps) ->-                    (case ("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_)-                                )) 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 (_lhsIoutputfile) of-                  { !_rhsOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_rhsOoptions ->-                   (case (_lhsInested) of-                    { !_rhsOnested ->-                    (case (_lhsIoutputfile) of-                     { !_leftOoutputfile ->-                     (case (_lhsIoptions) of-                      { !_leftOoptions ->-                      (case (_lhsInested) of-                       { !_leftOnested ->-                       (case (_lhsIisDeclOfLet) of-                        { !_leftOisDeclOfLet ->-                        (case ((rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile )) of-                         { ( !_rhsIpp) ->-                         (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of-                          { ( !_leftIpp) ->-                          (case (_leftIpp >#< "="-                                 >-< indent 4 _rhsIpp) 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 (_lhsInested) of-                  { !_tpOnested ->-                  (case ((tp_ _tpOnested )) of-                   { ( !_tpIpp,!_tpIprec) ->-                   (case ("newtype" >#< hv_sp (name_ : params_) >#< "=" >#< con_ >#< pp_parens _tpIpp) of-                    { !_lhsOpp ->-                    ( _lhsOpp) }) }) })) )-sem_Decl_PragmaDecl :: String ->-                       T_Decl -sem_Decl_PragmaDecl !txt_  =-    (T_Decl (\ (!_lhsIisDeclOfLet)-               (!_lhsInested)-               (!_lhsIoptions)-               (!_lhsIoutputfile) ->-                 (case ("{-#" >#< text txt_ >#< "#-}") 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 (_lhsInested) of-                  { !_tpOnested ->-                  (case ((tp_ _tpOnested )) of-                   { ( !_tpIpp,!_tpIprec) ->-                   (case (name_ >#< "::" >#< _tpIpp) 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 (_lhsInested) of-                  { !_tpOnested ->-                  (case ((tp_ _tpOnested )) of-                   { ( !_tpIpp,!_tpIprec) ->-                   (case ("type" >#< hv_sp (name_ : params_) >#< "=" >#<  _tpIpp) 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 (_lhsIoutputfile) of-                   { !_tlOoutputfile ->-                   (case (_lhsIoptions) of-                    { !_tlOoptions ->-                    (case (_lhsInested) of-                     { !_tlOnested ->-                     (case (_lhsIisDeclOfLet) of-                      { !_tlOisDeclOfLet ->-                      (case (_lhsIoutputfile) of-                       { !_hdOoutputfile ->-                       (case (_lhsIoptions) of-                        { !_hdOoptions ->-                        (case (_lhsInested) of-                         { !_hdOnested ->-                         (case (_lhsIisDeclOfLet) of-                          { !_hdOisDeclOfLet ->-                          (case ((tl_ _tlOisDeclOfLet _tlOnested _tlOoptions _tlOoutputfile )) of-                           { ( !_tlIpps) ->-                           (case ((hd_ _hdOisDeclOfLet _hdOnested _hdOoptions _hdOoutputfile )) of-                            { ( !_hdIpp) ->-                            (case (_hdIpp : _tlIpps) of-                             { !_lhsOpps ->-                             ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) })) )-sem_Decls_Nil :: T_Decls -sem_Decls_Nil  =-    (T_Decls (\ (!_lhsIisDeclOfLet)-                (!_lhsInested)-                (!_lhsIoptions)-                (!_lhsIoutputfile) ->-                  (case ([]) 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 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 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 !(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 !(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 (_lhsIoutputfile) of-                  { !_argsOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_argsOoptions ->-                   (case (_lhsInested) of-                    { !_argsOnested ->-                    (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of-                     { ( !_argsIpps) ->-                     (case (pp_parens $ name_ >#< hv_sp _argsIpps) 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 (_lhsIoutputfile) of-                  { !_altsOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_altsOoptions ->-                   (case (_lhsInested) of-                    { !_altsOnested ->-                    (case (_lhsIoutputfile) of-                     { !_exprOoutputfile ->-                     (case (_lhsIoptions) of-                      { !_exprOoptions ->-                      (case (_lhsInested) of-                       { !_exprOnested ->-                       (case ((alts_ _altsOnested _altsOoptions _altsOoutputfile )) of-                        { ( !_altsIpps) ->-                        (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of-                         { ( !_exprIpp) ->-                         (case (pp_parens (    "case" >#< pp_parens _exprIpp >#< "of"-                                          >-< (vlist _altsIpps)-                                          )) 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 (_lhsIoutputfile) of-                  { !_bodyOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_bodyOoptions ->-                   (case (_lhsInested) of-                    { !_bodyOnested ->-                    (case (_lhsIoutputfile) of-                     { !_argsOoutputfile ->-                     (case (_lhsIoptions) of-                      { !_argsOoptions ->-                      (case (_lhsInested) of-                       { !_argsOnested ->-                       (case (if bangpats _lhsIoptions-                              then \p -> pp_parens ("!" >|< p)-                              else id) of-                        { !_addBang ->-                        (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of-                         { ( !_argsIpps) ->-                         (case (if strictSems _lhsIoptions-                                then _argsIpps-                                else []) of-                          { !_strictParams ->-                          (case ((body_ _bodyOnested _bodyOoptions _bodyOoutputfile )) of-                           { ( !_bodyIpp) ->-                           (case (pp_parens (    "\\" >#< (vlist (map _addBang     _argsIpps)) >#< "->"-                                            >-< indent 4 (_strictParams     `ppMultiSeqV` _bodyIpp)-                                            )) 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 (_lhsIoutputfile) of-                  { !_bodyOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_bodyOoptions ->-                   (case (_lhsInested) of-                    { !_bodyOnested ->-                    (case (_lhsIoutputfile) of-                     { !_declsOoutputfile ->-                     (case (_lhsIoptions) of-                      { !_declsOoptions ->-                      (case (_lhsInested) of-                       { !_declsOnested ->-                       (case (True) of-                        { !_declsOisDeclOfLet ->-                        (case ((body_ _bodyOnested _bodyOoptions _bodyOoutputfile )) of-                         { ( !_bodyIpp) ->-                         (case ((decls_ _declsOisDeclOfLet _declsOnested _declsOoptions _declsOoutputfile )) of-                          { ( !_declsIpps) ->-                          (case (pp_parens (    "let" >#< (vlist _declsIpps)-                                           >-< "in " >#< _bodyIpp-                                           )) of-                           { !_lhsOpp ->-                           ( _lhsOpp) }) }) }) }) }) }) }) }) }) })) )-sem_Expr_LineExpr :: T_Expr  ->-                     T_Expr -sem_Expr_LineExpr !(T_Expr expr_ )  =-    (T_Expr (\ (!_lhsInested)-               (!_lhsIoptions)-               (!_lhsIoutputfile) ->-                 (case (_lhsIoutputfile) of-                  { !_exprOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_exprOoptions ->-                   (case (_lhsInested) of-                    { !_exprOnested ->-                    (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of-                     { ( !_exprIpp) ->-                     (case (_exprIpp >-< "{-# LINE" >#< ppWithLineNr (\n -> pp $ show $ n + 1) >#< show _lhsIoutputfile >#< "#-}") 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 (_lhsIoutputfile) of-                  { !_exprOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_exprOoptions ->-                   (case (_lhsInested) of-                    { !_exprOnested ->-                    (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of-                     { ( !_exprIpp) ->-                     (case (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 pragmaDoc `leftOp` _exprIpp `rightOp` pragmaDoc) of-                      { !_lhsOpp ->-                      ( _lhsOpp) }) }) }) }) })) )-sem_Expr_SimpleExpr :: String ->-                       T_Expr -sem_Expr_SimpleExpr !txt_  =-    (T_Expr (\ (!_lhsInested)-               (!_lhsIoptions)-               (!_lhsIoutputfile) ->-                 (case (text txt_) of-                  { !_lhsOpp ->-                  ( _lhsOpp) })) )-sem_Expr_TextExpr :: ([String]) ->-                     T_Expr -sem_Expr_TextExpr !lns_  =-    (T_Expr (\ (!_lhsInested)-               (!_lhsIoptions)-               (!_lhsIoutputfile) ->-                 (case (vlist (map text lns_)) of-                  { !_lhsOpp ->-                  ( _lhsOpp) })) )-sem_Expr_Trace :: String ->-                  T_Expr  ->-                  T_Expr -sem_Expr_Trace !txt_ !(T_Expr expr_ )  =-    (T_Expr (\ (!_lhsInested)-               (!_lhsIoptions)-               (!_lhsIoutputfile) ->-                 (case (_lhsIoutputfile) of-                  { !_exprOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_exprOoptions ->-                   (case (_lhsInested) of-                    { !_exprOnested ->-                    (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of-                     { ( !_exprIpp) ->-                     (case ("trace" >#< (   pp_parens ("\"" >|< text txt_ >|< "\"")-                                        >-< pp_parens _exprIpp-                                        )) of-                      { !_lhsOpp ->-                      ( _lhsOpp) }) }) }) }) })) )-sem_Expr_TupleExpr :: T_Exprs  ->-                      T_Expr -sem_Expr_TupleExpr !(T_Exprs exprs_ )  =-    (T_Expr (\ (!_lhsInested)-               (!_lhsIoptions)-               (!_lhsIoutputfile) ->-                 (case (_lhsIoutputfile) of-                  { !_exprsOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_exprsOoptions ->-                   (case (_lhsInested) of-                    { !_exprsOnested ->-                    (case ((exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile )) of-                     { ( !_exprsIpps) ->-                     (case (ppTuple _lhsInested _exprsIpps) 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 (_lhsInested) of-                  { !_tpOnested ->-                  (case (_lhsIoutputfile) of-                   { !_exprOoutputfile ->-                   (case (_lhsIoptions) of-                    { !_exprOoptions ->-                    (case (_lhsInested) of-                     { !_exprOnested ->-                     (case ((tp_ _tpOnested )) of-                      { ( !_tpIpp,!_tpIprec) ->-                      (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of-                       { ( !_exprIpp) ->-                       (case (pp_parens (_exprIpp >#< "::" >#< _tpIpp)) of-                        { !_lhsOpp ->-                        ( _lhsOpp) }) }) }) }) }) }) })) )-sem_Expr_UnboxedTupleExpr :: T_Exprs  ->-                             T_Expr -sem_Expr_UnboxedTupleExpr !(T_Exprs exprs_ )  =-    (T_Expr (\ (!_lhsInested)-               (!_lhsIoptions)-               (!_lhsIoutputfile) ->-                 (case (_lhsIoutputfile) of-                  { !_exprsOoutputfile ->-                  (case (_lhsIoptions) of-                   { !_exprsOoptions ->-                   (case (_lhsInested) of-                    { !_exprsOnested ->-                    (case ((exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile )) of-                     { ( !_exprsIpps) ->-                     (case (ppUnboxedTuple _lhsInested _exprsIpps) 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 (_lhsIoutputfile) of-                   { !_tlOoutputfile ->-                   (case (_lhsIoptions) of-                    { !_tlOoptions ->-                    (case (_lhsInested) of-                     { !_tlOnested ->-                     (case (_lhsIoutputfile) of-                      { !_hdOoutputfile ->-                      (case (_lhsIoptions) of-                       { !_hdOoptions ->-                       (case (_lhsInested) of-                        { !_hdOnested ->-                        (case ((tl_ _tlOnested _tlOoptions _tlOoutputfile )) of-                         { ( !_tlIpps) ->-                         (case ((hd_ _hdOnested _hdOoptions _hdOoutputfile )) of-                          { ( !_hdIpp) ->-                          (case (_hdIpp : _tlIpps) of-                           { !_lhsOpps ->-                           ( _lhsOpps) }) }) }) }) }) }) }) }) })) )-sem_Exprs_Nil :: T_Exprs -sem_Exprs_Nil  =-    (T_Exprs (\ (!_lhsInested)-                (!_lhsIoptions)-                (!_lhsIoutputfile) ->-                  (case ([]) 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 (_lhsIoutputfile) of-                 { !_argsOoutputfile ->-                 (case (_lhsIoptions) of-                  { !_argsOoptions ->-                  (case (_lhsInested) of-                   { !_argsOnested ->-                   (case (if bangpats _lhsIoptions-                                   then \p -> "!" >|< p-                                   else id) of-                    { !_addBang ->-                    (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of-                     { ( !_argsIpps) ->-                     (case (_argsIpps `ppMultiSeqH` (pp "True")) of-                      { !_strictGuard ->-                      (case (not (null _argsIpps)) of-                       { !_hasStrictVars ->-                       (case (if strictSems _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id) of-                        { !_addStrictGuard ->-                        (case (_addStrictGuard     (name_ >#< hv_sp (map _addBang     _argsIpps))) of-                         { !_lhsOpp ->-                         ( _lhsOpp) }) }) }) }) }) }) }) }) })) )-sem_Lhs_Pattern3 :: T_Pattern  ->-                    T_Lhs -sem_Lhs_Pattern3 !(T_Pattern pat3_ )  =-    (T_Lhs (\ (!_lhsIisDeclOfLet)-              (!_lhsInested)-              (!_lhsIoptions)-              (!_lhsIoutputfile) ->-                (case (_lhsIoptions) of-                 { !_pat3Ooptions ->-                 (case (_lhsIisDeclOfLet) of-                  { !_pat3OisDeclOfLet ->-                  (case (False) of-                   { !_pat3ObelowIrrefutable ->-                   (case ((pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions )) of-                    { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->-                    (case (not (null _pat3IstrictVars)) of-                     { !_hasStrictVars ->-                     (case (_pat3IstrictVars `ppMultiSeqH` (pp "True")) of-                      { !_strictGuard ->-                      (case (if strictCases _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id) of-                       { !_addStrictGuard ->-                       (case (_addStrictGuard     _pat3Ipp) of-                        { !_lhsOpp ->-                        ( _lhsOpp) }) }) }) }) }) }) }) })) )-sem_Lhs_Pattern3SM :: T_Pattern  ->-                      T_Lhs -sem_Lhs_Pattern3SM !(T_Pattern pat3_ )  =-    (T_Lhs (\ (!_lhsIisDeclOfLet)-              (!_lhsInested)-              (!_lhsIoptions)-              (!_lhsIoutputfile) ->-                (case (_lhsIoptions) of-                 { !_pat3Ooptions ->-                 (case (_lhsIisDeclOfLet) of-                  { !_pat3OisDeclOfLet ->-                  (case (False) of-                   { !_pat3ObelowIrrefutable ->-                   (case ((pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions )) of-                    { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->-                    (case (_pat3Ipp') of-                     { !_lhsOpp ->-                     ( _lhsOpp) }) }) }) }) })) )-sem_Lhs_TupleLhs :: ([String]) ->-                    T_Lhs -sem_Lhs_TupleLhs !comps_  =-    (T_Lhs (\ (!_lhsIisDeclOfLet)-              (!_lhsInested)-              (!_lhsIoptions)-              (!_lhsIoutputfile) ->-                (case (if bangpats _lhsIoptions-                                then \p -> "!" >|< p-                                else id) of-                 { !_addBang ->-                 (case (not (null comps_)) of-                  { !_hasStrictVars ->-                  (case (if stricterCases _lhsIoptions && not _lhsIisDeclOfLet-                         then map text comps_ `ppMultiSeqH` (pp "True")-                         else pp "True") of-                   { !_strictGuard ->-                   (case (if strictCases _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id) of-                    { !_addStrictGuard ->-                    (case (_addStrictGuard     $ ppTuple _lhsInested (map (_addBang     . text) comps_)) of-                     { !_lhsOpp ->-                     ( _lhsOpp) }) }) }) }) })) )-sem_Lhs_UnboxedTupleLhs :: ([String]) ->-                           T_Lhs -sem_Lhs_UnboxedTupleLhs !comps_  =-    (T_Lhs (\ (!_lhsIisDeclOfLet)-              (!_lhsInested)-              (!_lhsIoptions)-              (!_lhsIoutputfile) ->-                (case (if bangpats _lhsIoptions-                                then \p -> "!" >|< p-                                else id) of-                 { !_addBang ->-                 (case (not (null comps_)) of-                  { !_hasStrictVars ->-                  (case (if stricterCases _lhsIoptions && not _lhsIisDeclOfLet-                         then map text comps_ `ppMultiSeqH` (pp "True")-                         else pp "True") of-                   { !_strictGuard ->-                   (case (if strictCases _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id) of-                    { !_addStrictGuard ->-                    (case (_addStrictGuard     $ ppUnboxedTuple _lhsInested (map (_addBang     . text) comps_)) 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 (_lhsIoutputfile) of-                 { !_subOoutputfile ->-                 (case (_lhsIoptions) of-                  { !_subOoptions ->-                  (case (_lhsInested) of-                   { !_subOnested ->-                   (case (_lhsIisDeclOfLet) of-                    { !_subOisDeclOfLet ->-                    (case ((sub_ _subOisDeclOfLet _subOnested _subOoptions _subOoutputfile )) of-                     { ( !_subIpp) ->-                     (case (pp_parens (name_ >#< _subIpp)) of-                      { !_lhsOpp ->-                      ( _lhsOpp) }) }) }) }) }) })) )--- 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 (_lhsIoptions) of-                     { !_partsOoptions ->-                     (case (_lhsIisDeclOfLet) of-                      { !_partsOisDeclOfLet ->-                      (case (_lhsIbelowIrrefutable) of-                       { !_partsObelowIrrefutable ->-                       (case ((parts_ _partsObelowIrrefutable _partsOisDeclOfLet _partsOoptions )) of-                        { ( !_partsIcopy,!_partsIpps,!_partsIpps',!_partsIstrictVars) ->-                        (case (_lhsIoptions) of-                         { !_patOoptions ->-                         (case (_lhsIisDeclOfLet) of-                          { !_patOisDeclOfLet ->-                          (case (_lhsIbelowIrrefutable) of-                           { !_patObelowIrrefutable ->-                           (case ((pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions )) of-                            { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->-                            (case (Alias field_ attr_ _patIcopy _partsIcopy) of-                             { !_copy ->-                             (case (_copy) of-                              { !_lhsOcopy ->-                              (case (False) of-                               { !_lhsOisUnderscore ->-                               (case (pp (attrname False field_ attr_)) of-                                { !_ppVar ->-                                (case (if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable-                                       then \p -> "!" >|< p-                                       else id) of-                                 { !_addBang ->-                                 (case (_addBang     $ _ppVar) of-                                  { !_ppVarBang ->-                                  (case (if _patIisUnderscore-                                          then _ppVarBang-                                          else _ppVarBang     >|< "@" >|< _patIpp) of-                                   { !_lhsOpp ->-                                   (case (let attribute | field_ == _LOC || field_ == nullIdent = locname' attr_-                                                        | otherwise                             = attrname False field_ attr_-                                          in attribute >|< "@" >|< _patIpp') of-                                    { !_lhsOpp' ->-                                    (case (if stricterCases _lhsIoptions && not _lhsIisDeclOfLet-                                           then _patIstrictVars-                                           else []) of-                                     { !_strictPatVars ->-                                     (case (if strictCases _lhsIoptions && not _lhsIisDeclOfLet-                                            then [_ppVar    ]-                                            else []) of-                                      { !_strictVar ->-                                      (case (_strictVar     ++ _strictPatVars) 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 (_lhsIoptions) of-                     { !_patsOoptions ->-                     (case (_lhsIisDeclOfLet) of-                      { !_patsOisDeclOfLet ->-                      (case (_lhsIbelowIrrefutable) of-                       { !_patsObelowIrrefutable ->-                       (case ((pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions )) of-                        { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->-                        (case (Constr name_ _patsIcopy) of-                         { !_copy ->-                         (case (_copy) of-                          { !_lhsOcopy ->-                          (case (False) of-                           { !_lhsOisUnderscore ->-                           (case (if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable-                                  then \p -> "!" >|< p-                                  else id) of-                            { !_addBang ->-                            (case (_addBang     $ pp_parens $ name_ >#< hv_sp _patsIpps) of-                             { !_lhsOpp ->-                             (case (pp_parens $ name_ >#< hv_sp (map pp_parens _patsIpps')) of-                              { !_lhsOpp' ->-                              (case (_patsIstrictVars) 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 (_lhsIoptions) of-                     { !_patOoptions ->-                     (case (_lhsIisDeclOfLet) of-                      { !_patOisDeclOfLet ->-                      (case (True) of-                       { !_patObelowIrrefutable ->-                       (case ((pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions )) of-                        { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->-                        (case (Irrefutable _patIcopy) of-                         { !_copy ->-                         (case (_copy) of-                          { !_lhsOcopy ->-                          (case (_patIisUnderscore) of-                           { !_lhsOisUnderscore ->-                           (case (text "~" >|< pp_parens _patIpp) of-                            { !_lhsOpp ->-                            (case (text "~" >|< pp_parens _patIpp) of-                             { !_lhsOpp' ->-                             (case ([]) 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 (_lhsIoptions) of-                     { !_patsOoptions ->-                     (case (_lhsIisDeclOfLet) of-                      { !_patsOisDeclOfLet ->-                      (case (_lhsIbelowIrrefutable) of-                       { !_patsObelowIrrefutable ->-                       (case ((pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions )) of-                        { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->-                        (case (Product pos_ _patsIcopy) of-                         { !_copy ->-                         (case (_copy) of-                          { !_lhsOcopy ->-                          (case (False) of-                           { !_lhsOisUnderscore ->-                           (case (if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable-                                  then \p -> "!" >|< p-                                  else id) of-                            { !_addBang ->-                            (case (_addBang     $ pp_block "(" ")" "," _patsIpps) of-                             { !_lhsOpp ->-                             (case (pp_block "(" ")" "," _patsIpps') of-                              { !_lhsOpp' ->-                              (case (_patsIstrictVars) of-                               { !_lhsOstrictVars ->-                               ( _lhsOcopy,_lhsOisUnderscore,_lhsOpp,_lhsOpp',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) })) )-sem_Pattern_Underscore :: Pos ->-                          T_Pattern -sem_Pattern_Underscore !pos_  =-    (T_Pattern (\ (!_lhsIbelowIrrefutable)-                  (!_lhsIisDeclOfLet)-                  (!_lhsIoptions) ->-                    (case (Underscore pos_) of-                     { !_copy ->-                     (case (_copy) of-                      { !_lhsOcopy ->-                      (case (True) of-                       { !_lhsOisUnderscore ->-                       (case (text "_") of-                        { !_lhsOpp ->-                        (case (text "_") of-                         { !_lhsOpp' ->-                         (case ([]) 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 (_lhsIoptions) of-                      { !_tlOoptions ->-                      (case (_lhsIisDeclOfLet) of-                       { !_tlOisDeclOfLet ->-                       (case (_lhsIbelowIrrefutable) of-                        { !_tlObelowIrrefutable ->-                        (case ((tl_ _tlObelowIrrefutable _tlOisDeclOfLet _tlOoptions )) of-                         { ( !_tlIcopy,!_tlIpps,!_tlIpps',!_tlIstrictVars) ->-                         (case (_lhsIoptions) of-                          { !_hdOoptions ->-                          (case (_lhsIisDeclOfLet) of-                           { !_hdOisDeclOfLet ->-                           (case (_lhsIbelowIrrefutable) of-                            { !_hdObelowIrrefutable ->-                            (case ((hd_ _hdObelowIrrefutable _hdOisDeclOfLet _hdOoptions )) of-                             { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp,!_hdIpp',!_hdIstrictVars) ->-                             (case ((:) _hdIcopy _tlIcopy) of-                              { !_copy ->-                              (case (_copy) of-                               { !_lhsOcopy ->-                               (case (_hdIpp : _tlIpps) of-                                { !_lhsOpps ->-                                (case (_hdIpp' : _tlIpps') of-                                 { !_lhsOpps' ->-                                 (case (_hdIstrictVars ++ _tlIstrictVars) of-                                  { !_lhsOstrictVars ->-                                  ( _lhsOcopy,_lhsOpps,_lhsOpps',_lhsOstrictVars) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil  =-    (T_Patterns (\ (!_lhsIbelowIrrefutable)-                   (!_lhsIisDeclOfLet)-                   (!_lhsIoptions) ->-                     (case ([]) of-                      { !_copy ->-                      (case (_copy) of-                       { !_lhsOcopy ->-                       (case ([]) of-                        { !_lhsOpps ->-                        (case ([]) of-                         { !_lhsOpps' ->-                         (case ([]) 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 -         visit 0:-            local commonFile  : _-            local genCommonModule : _-            local mainModuleFile : _-            local genMainModule : _--}--- cata-sem_Program :: Program  ->-               T_Program -sem_Program !(Program _chunks )  =-    (sem_Program_Program (sem_Chunks _chunks ) )--- 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  ->-                       T_Program -sem_Program_Program !(T_Chunks chunks_ )  =-    (T_Program (\ (!_lhsIimportBlocks)-                  (!_lhsImainFile)-                  (!_lhsImainName)-                  (!_lhsImoduleHeader)-                  (!_lhsIoptions)-                  (!_lhsIoptionsLine)-                  (!_lhsIpragmaBlocks)-                  (!_lhsItextBlockMap)-                  (!_lhsItextBlocks) ->-                    (case (_lhsItextBlockMap) of-                     { !_chunksOtextBlockMap ->-                     (case (_lhsIpragmaBlocks) of-                      { !_chunksOpragmaBlocks ->-                      (case (_lhsIoptionsLine) of-                       { !_chunksOoptionsLine ->-                       (case (_lhsIoptions) of-                        { !_chunksOoptions ->-                        (case (_lhsImoduleHeader) of-                         { !_chunksOmoduleHeader ->-                         (case (_lhsImainName) of-                          { !_chunksOmainName ->-                          (case (_lhsImainFile) of-                           { !_chunksOmainFile ->-                           (case (_lhsImainFile ++ "_common.hs") of-                            { !_commonFile ->-                            (case (False) of-                             { !_chunksOisDeclOfLet ->-                             (case (nest _lhsIoptions) of-                              { !_chunksOnested ->-                              (case (_lhsItextBlocks) of-                               { !_chunksOtextBlocks ->-                               (case (_lhsIimportBlocks) of-                                { !_chunksOimportBlocks ->-                                (case ((chunks_ _chunksOimportBlocks _chunksOisDeclOfLet _chunksOmainFile _chunksOmainName _chunksOmoduleHeader _chunksOnested _chunksOoptions _chunksOoptionsLine _chunksOpragmaBlocks _chunksOtextBlockMap _chunksOtextBlocks )) of-                                 { ( !_chunksIappendCommon,!_chunksIappendMain,!_chunksIgenSems,!_chunksIimports,!_chunksIpps) ->-                                 (case (writeModule _commonFile-                                            ( [ pp $ _lhsIpragmaBlocks-                                              , pp $ _lhsIoptionsLine-                                              , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True-                                              , _lhsIimportBlocks-                                              , _lhsItextBlocks-                                              ]-                                              ++ map vlist _chunksIappendCommon-                                            )) of-                                  { !_genCommonModule ->-                                  (case (_lhsImainFile ++ ".hs") of-                                   { !_mainModuleFile ->-                                   (case (writeModule _mainModuleFile-                                            ( [ pp $ _lhsIpragmaBlocks-                                              , pp $ _lhsIoptionsLine-                                              , pp $ _lhsImoduleHeader _lhsImainName "" "" False-                                              , pp $ ("import " ++ _lhsImainName ++ "_common\n")-                                              ]-                                              ++ map pp _chunksIimports-                                              ++ map vlist _chunksIappendMain-                                            )) of-                                    { !_genMainModule ->-                                    (case (do _genMainModule-                                              _genCommonModule-                                              _chunksIgenSems) of-                                     { !_lhsOgenIO ->-                                     (case (_chunksIpps) 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 SimpleType:-         child txt            : {String}-      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 !(SimpleType _txt )  =-    (sem_Type_SimpleType _txt )-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 (_lhsInested) of-                  { !_rightOnested ->-                  (case (_lhsInested) of-                   { !_leftOnested ->-                   (case ((right_ _rightOnested )) of-                    { ( !_rightIpp,!_rightIprec) ->-                    (case (if _rightIprec <  2 then pp_parens _rightIpp else _rightIpp) of-                     { !_r ->-                     (case ((left_ _leftOnested )) of-                      { ( !_leftIpp,!_leftIprec) ->-                      (case (if _leftIprec  <= 2 then pp_parens _leftIpp  else _leftIpp) of-                       { !_l ->-                       (case (_l     >#< "->" >-< _r) of-                        { !_lhsOpp ->-                        (case (2) of-                         { !_lhsOprec ->-                         ( _lhsOpp,_lhsOprec) }) }) }) }) }) }) }) })) )-sem_Type_CtxApp :: ([(String, [String])]) ->-                   T_Type  ->-                   T_Type -sem_Type_CtxApp !left_ !(T_Type right_ )  =-    (T_Type (\ (!_lhsInested) ->-                 (case (_lhsInested) of-                  { !_rightOnested ->-                  (case ((right_ _rightOnested )) of-                   { ( !_rightIpp,!_rightIprec) ->-                   (case ((pp_block "(" ")" "," $ map (\(n,ns) -> hv_sp $ map pp (n:ns)) left_) >#< "=>" >#< _rightIpp) of-                    { !_lhsOpp ->-                    (case (_rightIprec) of-                     { !_lhsOprec ->-                     ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_List :: T_Type  ->-                 T_Type -sem_Type_List !(T_Type tp_ )  =-    (T_Type (\ (!_lhsInested) ->-                 (case (_lhsInested) of-                  { !_tpOnested ->-                  (case ((tp_ _tpOnested )) of-                   { ( !_tpIpp,!_tpIprec) ->-                   (case ("[" >|< _tpIpp >|< "]") of-                    { !_lhsOpp ->-                    (case (5) of-                     { !_lhsOprec ->-                     ( _lhsOpp,_lhsOprec) }) }) }) })) )-sem_Type_SimpleType :: String ->-                       T_Type -sem_Type_SimpleType !txt_  =-    (T_Type (\ (!_lhsInested) ->-                 (case (if reallySimple txt_ then text txt_ else pp_parens (text txt_)) of-                  { !_lhsOpp ->-                  (case (5) of-                   { !_lhsOprec ->-                   ( _lhsOpp,_lhsOprec) }) })) )-sem_Type_TupleType :: T_Types  ->-                      T_Type -sem_Type_TupleType !(T_Types tps_ )  =-    (T_Type (\ (!_lhsInested) ->-                 (case (_lhsInested) of-                  { !_tpsOnested ->-                  (case ((tps_ _tpsOnested )) of-                   { ( !_tpsIpps) ->-                   (case (ppTuple _lhsInested _tpsIpps) of-                    { !_lhsOpp ->-                    (case (5) 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 (_lhsInested) of-                  { !_argsOnested ->-                  (case (_lhsInested) of-                   { !_funcOnested ->-                   (case ((args_ _argsOnested )) of-                    { ( !_argsIpps) ->-                    (case ((func_ _funcOnested )) of-                     { ( !_funcIpp,!_funcIprec) ->-                     (case (hv_sp (_funcIpp : _argsIpps)) of-                      { !_lhsOpp ->-                      (case (_funcIprec) of-                       { !_lhsOprec ->-                       ( _lhsOpp,_lhsOprec) }) }) }) }) }) })) )-sem_Type_UnboxedTupleType :: T_Types  ->-                             T_Type -sem_Type_UnboxedTupleType !(T_Types tps_ )  =-    (T_Type (\ (!_lhsInested) ->-                 (case (_lhsInested) of-                  { !_tpsOnested ->-                  (case ((tps_ _tpsOnested )) of-                   { ( !_tpsIpps) ->-                   (case (ppUnboxedTuple _lhsInested _tpsIpps) of-                    { !_lhsOpp ->-                    (case (5) 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 (_lhsInested) of-                   { !_tlOnested ->-                   (case (_lhsInested) of-                    { !_hdOnested ->-                    (case ((tl_ _tlOnested )) of-                     { ( !_tlIpps) ->-                     (case ((hd_ _hdOnested )) of-                      { ( !_hdIpp,!_hdIprec) ->-                      (case (_hdIpp : _tlIpps) of-                       { !_lhsOpps ->-                       ( _lhsOpps) }) }) }) }) })) )-sem_Types_Nil :: T_Types -sem_Types_Nil  =-    (T_Types (\ (!_lhsInested) ->-                  (case ([]) of+{-# 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 216 "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 315 "PrintCode.ag" #-}++locname' n = "_loc_" ++ getName n+{-# LINE 71 "../src-derived/PrintCode.hs" #-}++{-# LINE 384 "PrintCode.ag" #-}++renderDocs :: [PP_Doc] -> String+renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""+{-# LINE 77 "../src-derived/PrintCode.hs" #-}++{-# LINE 431 "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 102 "./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 334 "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 157 "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 65 "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 66 "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 323 "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 323 "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 323 "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 398 "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 323 "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 323 "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 403 "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 323 "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 323 "PrintCode.ag" #-}+                                                            _lhsIisDeclOfLet+                                                            {-# LINE 500 "PrintCode.hs" #-}) of+                                                      { !_infoOisDeclOfLet ->+                                                      (case ({-# LINE 429 "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 413 "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 392 "PrintCode.ag" #-}+                                                                 ["import " ++ _lhsImainName ++ "_" ++ name_ ++ "\n"]+                                                                 {-# LINE 527 "PrintCode.hs" #-}) of+                                                           { !_lhsOimports ->+                                                           (case ({-# LINE 89 "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 349 "PrintCode.ag" #-}+                            _lhsImainFile+                            {-# LINE 620 "PrintCode.hs" #-}) of+                      { !_tlOmainFile ->+                      (case ({-# LINE 323 "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 349 "PrintCode.ag" #-}+                                _lhsImainFile+                                {-# LINE 636 "PrintCode.hs" #-}) of+                          { !_hdOmainFile ->+                          (case ({-# LINE 323 "PrintCode.ag" #-}+                                 _lhsIisDeclOfLet+                                 {-# LINE 640 "PrintCode.hs" #-}) of+                           { !_hdOisDeclOfLet ->+                           (case ({-# LINE 346 "PrintCode.ag" #-}+                                  _lhsItextBlocks+                                  {-# LINE 644 "PrintCode.hs" #-}) of+                            { !_tlOtextBlocks ->+                            (case ({-# LINE 347 "PrintCode.ag" #-}+                                   _lhsItextBlockMap+                                   {-# LINE 648 "PrintCode.hs" #-}) of+                             { !_tlOtextBlockMap ->+                             (case ({-# LINE 345 "PrintCode.ag" #-}+                                    _lhsIpragmaBlocks+                                    {-# LINE 652 "PrintCode.hs" #-}) of+                              { !_tlOpragmaBlocks ->+                              (case ({-# LINE 348 "PrintCode.ag" #-}+                                     _lhsIoptionsLine+                                     {-# LINE 656 "PrintCode.hs" #-}) of+                               { !_tlOoptionsLine ->+                               (case ({-# LINE 351 "PrintCode.ag" #-}+                                      _lhsImoduleHeader+                                      {-# LINE 660 "PrintCode.hs" #-}) of+                                { !_tlOmoduleHeader ->+                                (case ({-# LINE 350 "PrintCode.ag" #-}+                                       _lhsImainName+                                       {-# LINE 664 "PrintCode.hs" #-}) of+                                 { !_tlOmainName ->+                                 (case ({-# LINE 344 "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 346 "PrintCode.ag" #-}+                                          _lhsItextBlocks+                                          {-# LINE 674 "PrintCode.hs" #-}) of+                                    { !_hdOtextBlocks ->+                                    (case ({-# LINE 347 "PrintCode.ag" #-}+                                           _lhsItextBlockMap+                                           {-# LINE 678 "PrintCode.hs" #-}) of+                                     { !_hdOtextBlockMap ->+                                     (case ({-# LINE 345 "PrintCode.ag" #-}+                                            _lhsIpragmaBlocks+                                            {-# LINE 682 "PrintCode.hs" #-}) of+                                      { !_hdOpragmaBlocks ->+                                      (case ({-# LINE 348 "PrintCode.ag" #-}+                                             _lhsIoptionsLine+                                             {-# LINE 686 "PrintCode.hs" #-}) of+                                       { !_hdOoptionsLine ->+                                       (case ({-# LINE 351 "PrintCode.ag" #-}+                                              _lhsImoduleHeader+                                              {-# LINE 690 "PrintCode.hs" #-}) of+                                        { !_hdOmoduleHeader ->+                                        (case ({-# LINE 350 "PrintCode.ag" #-}+                                               _lhsImainName+                                               {-# LINE 694 "PrintCode.hs" #-}) of+                                         { !_hdOmainName ->+                                         (case ({-# LINE 344 "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 394 "PrintCode.ag" #-}+                                                  _hdIappendCommon ++ _tlIappendCommon+                                                  {-# LINE 704 "PrintCode.hs" #-}) of+                                            { !_lhsOappendCommon ->+                                            (case ({-# LINE 394 "PrintCode.ag" #-}+                                                   _hdIappendMain ++ _tlIappendMain+                                                   {-# LINE 708 "PrintCode.hs" #-}) of+                                             { !_lhsOappendMain ->+                                             (case ({-# LINE 409 "PrintCode.ag" #-}+                                                    _hdIgenSems >> _tlIgenSems+                                                    {-# LINE 712 "PrintCode.hs" #-}) of+                                              { !_lhsOgenSems ->+                                              (case ({-# LINE 389 "PrintCode.ag" #-}+                                                     _hdIimports ++ _tlIimports+                                                     {-# LINE 716 "PrintCode.hs" #-}) of+                                               { !_lhsOimports ->+                                               (case ({-# LINE 81 "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 394 "PrintCode.ag" #-}+                          []+                          {-# LINE 738 "PrintCode.hs" #-}) of+                    { !_lhsOappendCommon ->+                    (case ({-# LINE 394 "PrintCode.ag" #-}+                           []+                           {-# LINE 742 "PrintCode.hs" #-}) of+                     { !_lhsOappendMain ->+                     (case ({-# LINE 409 "PrintCode.ag" #-}+                            return ()+                            {-# LINE 746 "PrintCode.hs" #-}) of+                      { !_lhsOgenSems ->+                      (case ({-# LINE 389 "PrintCode.ag" #-}+                             []+                             {-# LINE 750 "PrintCode.hs" #-}) of+                       { !_lhsOimports ->+                       (case ({-# LINE 82 "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           : {[String]}+      alternative Record:+         child name           : {String}+         child args           : {[(String,String)]}+-}+-- cata+sem_DataAlt :: DataAlt  ->+               T_DataAlt +sem_DataAlt !(DataAlt _name _args )  =+    (sem_DataAlt_DataAlt _name _args )+sem_DataAlt !(Record _name _args )  =+    (sem_DataAlt_Record _name _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 ->+                       ([String]) ->+                       T_DataAlt +sem_DataAlt_DataAlt !name_ !args_  =+    (T_DataAlt (\ (!_lhsInested)+                  (!_lhsIstrictPre) ->+                    (case ({-# LINE 160 "PrintCode.ag" #-}+                           name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens . text) args_)+                           {-# LINE 801 "PrintCode.hs" #-}) of+                     { !_lhsOpp ->+                     ( _lhsOpp) })) )+sem_DataAlt_Record :: String ->+                      ([(String,String)]) ->+                      T_DataAlt +sem_DataAlt_Record !name_ !args_  =+    (T_DataAlt (\ (!_lhsInested)+                  (!_lhsIstrictPre) ->+                    (case ({-# LINE 161 "PrintCode.ag" #-}+                           name_ >#< pp_block "{" "}" ","+                                              [ f >#< "::" >#< t | (f,t) <- args_ ]+                           {-# LINE 813 "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 233 "PrintCode.ag" #-}+                            _lhsIstrictPre+                            {-# LINE 856 "PrintCode.hs" #-}) of+                      { !_tlOstrictPre ->+                      (case ({-# LINE 233 "PrintCode.ag" #-}+                             _lhsIstrictPre+                             {-# LINE 860 "PrintCode.hs" #-}) of+                       { !_hdOstrictPre ->+                       (case ({-# LINE 53 "PrintCode.ag" #-}+                              _lhsInested+                              {-# LINE 864 "PrintCode.hs" #-}) of+                        { !_tlOnested ->+                        (case ((tl_ _tlOnested _tlOstrictPre )) of+                         { ( !_tlIpps) ->+                         (case ({-# LINE 51 "PrintCode.ag" #-}+                                _lhsInested+                                {-# LINE 870 "PrintCode.hs" #-}) of+                          { !_hdOnested ->+                          (case ((hd_ _hdOnested _hdOstrictPre )) of+                           { ( !_hdIpp) ->+                           (case ({-# LINE 69 "PrintCode.ag" #-}+                                  _hdIpp : _tlIpps+                                  {-# LINE 876 "PrintCode.hs" #-}) of+                            { !_lhsOpps ->+                            ( _lhsOpps) }) }) }) }) }) }) })) )+sem_DataAlts_Nil :: T_DataAlts +sem_DataAlts_Nil  =+    (T_DataAlts (\ (!_lhsInested)+                   (!_lhsIstrictPre) ->+                     (case ({-# LINE 70 "PrintCode.ag" #-}+                            []+                            {-# LINE 885 "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 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 NewType:+         child name           : {String}+         child params         : {[String]}+         child con            : {String}+         child tp             : Type +      alternative PragmaDecl:+         child txt            : {String}+      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 !(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 !(NewType _name _params _con _tp )  =+    (sem_Decl_NewType _name _params _con (sem_Type _tp ) )+sem_Decl !(PragmaDecl _txt )  =+    (sem_Decl_PragmaDecl _txt )+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_Comment :: String ->+                    T_Decl +sem_Decl_Comment !txt_  =+    (T_Decl (\ (!_lhsIisDeclOfLet)+               (!_lhsInested)+               (!_lhsIoptions)+               (!_lhsIoutputfile) ->+                 (case ({-# LINE 113 "PrintCode.ag" #-}+                        if '\n' `elem` txt_+                          then "{-" >-< vlist (lines txt_) >-< "-}"+                          else "--" >#< txt_+                        {-# LINE 970 "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 236 "PrintCode.ag" #-}+                        if strict_ then pp "!" else empty+                        {-# LINE 986 "PrintCode.hs" #-}) of+                  { !_altsOstrictPre ->+                  (case ({-# LINE 53 "PrintCode.ag" #-}+                         _lhsInested+                         {-# LINE 990 "PrintCode.hs" #-}) of+                   { !_altsOnested ->+                   (case ((alts_ _altsOnested _altsOstrictPre )) of+                    { ( !_altsIpps) ->+                    (case ({-# LINE 101 "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 1004 "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 1019 "PrintCode.hs" #-}) of+                  { !_rhsOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1023 "PrintCode.hs" #-}) of+                   { !_rhsOoptions ->+                   (case ({-# LINE 51 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1027 "PrintCode.hs" #-}) of+                    { !_rhsOnested ->+                    (case ({-# LINE 39 "PrintCode.ag" #-}+                           _lhsIoutputfile+                           {-# LINE 1031 "PrintCode.hs" #-}) of+                     { !_leftOoutputfile ->+                     (case ({-# LINE 49 "PrintCode.ag" #-}+                            _lhsIoptions+                            {-# LINE 1035 "PrintCode.hs" #-}) of+                      { !_leftOoptions ->+                      (case ({-# LINE 51 "PrintCode.ag" #-}+                             _lhsInested+                             {-# LINE 1039 "PrintCode.hs" #-}) of+                       { !_leftOnested ->+                       (case ({-# LINE 323 "PrintCode.ag" #-}+                              _lhsIisDeclOfLet+                              {-# LINE 1043 "PrintCode.hs" #-}) of+                        { !_leftOisDeclOfLet ->+                        (case ((rhs_ _rhsOnested _rhsOoptions _rhsOoutputfile )) of+                         { ( !_rhsIpp) ->+                         (case ((left_ _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile )) of+                          { ( !_leftIpp) ->+                          (case ({-# LINE 99 "PrintCode.ag" #-}+                                 _leftIpp >#< "="+                                 >-< indent 4 _rhsIpp+                                 {-# LINE 1052 "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 1067 "PrintCode.hs" #-}) of+                  { !_tpOnested ->+                  (case ((tp_ _tpOnested )) of+                   { ( !_tpIpp,!_tpIprec) ->+                   (case ({-# LINE 110 "PrintCode.ag" #-}+                          "newtype" >#< hv_sp (name_ : params_) >#< "=" >#< con_ >#< pp_parens _tpIpp+                          {-# LINE 1073 "PrintCode.hs" #-}) of+                    { !_lhsOpp ->+                    ( _lhsOpp) }) }) })) )+sem_Decl_PragmaDecl :: String ->+                       T_Decl +sem_Decl_PragmaDecl !txt_  =+    (T_Decl (\ (!_lhsIisDeclOfLet)+               (!_lhsInested)+               (!_lhsIoptions)+               (!_lhsIoutputfile) ->+                 (case ({-# LINE 116 "PrintCode.ag" #-}+                        "{-#" >#< text txt_ >#< "#-}"+                        {-# LINE 1085 "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 1098 "PrintCode.hs" #-}) of+                  { !_tpOnested ->+                  (case ((tp_ _tpOnested )) of+                   { ( !_tpIpp,!_tpIprec) ->+                   (case ({-# LINE 112 "PrintCode.ag" #-}+                          name_ >#< "::" >#< _tpIpp+                          {-# LINE 1104 "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 1118 "PrintCode.hs" #-}) of+                  { !_tpOnested ->+                  (case ((tp_ _tpOnested )) of+                   { ( !_tpIpp,!_tpIprec) ->+                   (case ({-# LINE 111 "PrintCode.ag" #-}+                          "type" >#< hv_sp (name_ : params_) >#< "=" >#<  _tpIpp+                          {-# LINE 1124 "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 1173 "PrintCode.hs" #-}) of+                   { !_tlOoutputfile ->+                   (case ({-# LINE 49 "PrintCode.ag" #-}+                          _lhsIoptions+                          {-# LINE 1177 "PrintCode.hs" #-}) of+                    { !_tlOoptions ->+                    (case ({-# LINE 53 "PrintCode.ag" #-}+                           _lhsInested+                           {-# LINE 1181 "PrintCode.hs" #-}) of+                     { !_tlOnested ->+                     (case ({-# LINE 323 "PrintCode.ag" #-}+                            _lhsIisDeclOfLet+                            {-# LINE 1185 "PrintCode.hs" #-}) of+                      { !_tlOisDeclOfLet ->+                      (case ({-# LINE 39 "PrintCode.ag" #-}+                             _lhsIoutputfile+                             {-# LINE 1189 "PrintCode.hs" #-}) of+                       { !_hdOoutputfile ->+                       (case ({-# LINE 49 "PrintCode.ag" #-}+                              _lhsIoptions+                              {-# LINE 1193 "PrintCode.hs" #-}) of+                        { !_hdOoptions ->+                        (case ({-# LINE 51 "PrintCode.ag" #-}+                               _lhsInested+                               {-# LINE 1197 "PrintCode.hs" #-}) of+                         { !_hdOnested ->+                         (case ({-# LINE 323 "PrintCode.ag" #-}+                                _lhsIisDeclOfLet+                                {-# LINE 1201 "PrintCode.hs" #-}) of+                          { !_hdOisDeclOfLet ->+                          (case ((tl_ _tlOisDeclOfLet _tlOnested _tlOoptions _tlOoutputfile )) of+                           { ( !_tlIpps) ->+                           (case ((hd_ _hdOisDeclOfLet _hdOnested _hdOoptions _hdOoutputfile )) of+                            { ( !_hdIpp) ->+                            (case ({-# LINE 77 "PrintCode.ag" #-}+                                   _hdIpp : _tlIpps+                                   {-# LINE 1209 "PrintCode.hs" #-}) of+                             { !_lhsOpps ->+                             ( _lhsOpps) }) }) }) }) }) }) }) }) }) }) })) )+sem_Decls_Nil :: T_Decls +sem_Decls_Nil  =+    (T_Decls (\ (!_lhsIisDeclOfLet)+                (!_lhsInested)+                (!_lhsIoptions)+                (!_lhsIoutputfile) ->+                  (case ({-# LINE 78 "PrintCode.ag" #-}+                         []+                         {-# LINE 1220 "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 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 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 !(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 !(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 1320 "PrintCode.hs" #-}) of+                  { !_argsOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1324 "PrintCode.hs" #-}) of+                   { !_argsOoptions ->+                   (case ({-# LINE 53 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1328 "PrintCode.hs" #-}) of+                    { !_argsOnested ->+                    (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of+                     { ( !_argsIpps) ->+                     (case ({-# LINE 136 "PrintCode.ag" #-}+                            pp_parens $ name_ >#< hv_sp _argsIpps+                            {-# LINE 1334 "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 1346 "PrintCode.hs" #-}) of+                  { !_altsOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1350 "PrintCode.hs" #-}) of+                   { !_altsOoptions ->+                   (case ({-# LINE 55 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1354 "PrintCode.hs" #-}) of+                    { !_altsOnested ->+                    (case ({-# LINE 39 "PrintCode.ag" #-}+                           _lhsIoutputfile+                           {-# LINE 1358 "PrintCode.hs" #-}) of+                     { !_exprOoutputfile ->+                     (case ({-# LINE 49 "PrintCode.ag" #-}+                            _lhsIoptions+                            {-# LINE 1362 "PrintCode.hs" #-}) of+                      { !_exprOoptions ->+                      (case ({-# LINE 51 "PrintCode.ag" #-}+                             _lhsInested+                             {-# LINE 1366 "PrintCode.hs" #-}) of+                       { !_exprOnested ->+                       (case ((alts_ _altsOnested _altsOoptions _altsOoutputfile )) of+                        { ( !_altsIpps) ->+                        (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of+                         { ( !_exprIpp) ->+                         (case ({-# LINE 122 "PrintCode.ag" #-}+                                pp_parens (    "case" >#< pp_parens _exprIpp >#< "of"+                                          >-< (vlist _altsIpps)+                                          )+                                {-# LINE 1376 "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 1388 "PrintCode.hs" #-}) of+                  { !_bodyOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1392 "PrintCode.hs" #-}) of+                   { !_bodyOoptions ->+                   (case ({-# LINE 51 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1396 "PrintCode.hs" #-}) of+                    { !_bodyOnested ->+                    (case ({-# LINE 39 "PrintCode.ag" #-}+                           _lhsIoutputfile+                           {-# LINE 1400 "PrintCode.hs" #-}) of+                     { !_argsOoutputfile ->+                     (case ({-# LINE 49 "PrintCode.ag" #-}+                            _lhsIoptions+                            {-# LINE 1404 "PrintCode.hs" #-}) of+                      { !_argsOoptions ->+                      (case ({-# LINE 53 "PrintCode.ag" #-}+                             _lhsInested+                             {-# LINE 1408 "PrintCode.hs" #-}) of+                       { !_argsOnested ->+                       (case ({-# LINE 128 "PrintCode.ag" #-}+                              if bangpats _lhsIoptions+                              then \p -> pp_parens ("!" >|< p)+                              else id+                              {-# LINE 1414 "PrintCode.hs" #-}) of+                        { !_addBang ->+                        (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of+                         { ( !_argsIpps) ->+                         (case ({-# LINE 125 "PrintCode.ag" #-}+                                if strictSems _lhsIoptions+                                then _argsIpps+                                else []+                                {-# LINE 1422 "PrintCode.hs" #-}) of+                          { !_strictParams ->+                          (case ((body_ _bodyOnested _bodyOoptions _bodyOoutputfile )) of+                           { ( !_bodyIpp) ->+                           (case ({-# LINE 131 "PrintCode.ag" #-}+                                  pp_parens (    "\\" >#< (vlist (map _addBang     _argsIpps)) >#< "->"+                                            >-< indent 4 (_strictParams     `ppMultiSeqV` _bodyIpp)+                                            )+                                  {-# LINE 1430 "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 1442 "PrintCode.hs" #-}) of+                  { !_bodyOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1446 "PrintCode.hs" #-}) of+                   { !_bodyOoptions ->+                   (case ({-# LINE 51 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1450 "PrintCode.hs" #-}) of+                    { !_bodyOnested ->+                    (case ({-# LINE 39 "PrintCode.ag" #-}+                           _lhsIoutputfile+                           {-# LINE 1454 "PrintCode.hs" #-}) of+                     { !_declsOoutputfile ->+                     (case ({-# LINE 49 "PrintCode.ag" #-}+                            _lhsIoptions+                            {-# LINE 1458 "PrintCode.hs" #-}) of+                      { !_declsOoptions ->+                      (case ({-# LINE 53 "PrintCode.ag" #-}+                             _lhsInested+                             {-# LINE 1462 "PrintCode.hs" #-}) of+                       { !_declsOnested ->+                       (case ({-# LINE 330 "PrintCode.ag" #-}+                              True+                              {-# LINE 1466 "PrintCode.hs" #-}) of+                        { !_declsOisDeclOfLet ->+                        (case ((body_ _bodyOnested _bodyOoptions _bodyOoutputfile )) of+                         { ( !_bodyIpp) ->+                         (case ((decls_ _declsOisDeclOfLet _declsOnested _declsOoptions _declsOoutputfile )) of+                          { ( !_declsIpps) ->+                          (case ({-# LINE 119 "PrintCode.ag" #-}+                                 pp_parens (    "let" >#< (vlist _declsIpps)+                                           >-< "in " >#< _bodyIpp+                                           )+                                 {-# LINE 1476 "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 1487 "PrintCode.hs" #-}) of+                  { !_exprOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1491 "PrintCode.hs" #-}) of+                   { !_exprOoptions ->+                   (case ({-# LINE 51 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1495 "PrintCode.hs" #-}) of+                    { !_exprOnested ->+                    (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of+                     { ( !_exprIpp) ->+                     (case ({-# LINE 153 "PrintCode.ag" #-}+                            _exprIpp >-< "{-# LINE" >#< ppWithLineNr (\n -> pp $ show $ n + 1) >#< show _lhsIoutputfile >#< "#-}"+                            {-# LINE 1501 "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 1515 "PrintCode.hs" #-}) of+                  { !_exprOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1519 "PrintCode.hs" #-}) of+                   { !_exprOoptions ->+                   (case ({-# LINE 51 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1523 "PrintCode.hs" #-}) of+                    { !_exprOnested ->+                    (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of+                     { ( !_exprIpp) ->+                     (case ({-# LINE 142 "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 pragmaDoc `leftOp` _exprIpp `rightOp` pragmaDoc+                            {-# LINE 1539 "PrintCode.hs" #-}) of+                      { !_lhsOpp ->+                      ( _lhsOpp) }) }) }) }) })) )+sem_Expr_SimpleExpr :: String ->+                       T_Expr +sem_Expr_SimpleExpr !txt_  =+    (T_Expr (\ (!_lhsInested)+               (!_lhsIoptions)+               (!_lhsIoutputfile) ->+                 (case ({-# LINE 137 "PrintCode.ag" #-}+                        text txt_+                        {-# LINE 1550 "PrintCode.hs" #-}) of+                  { !_lhsOpp ->+                  ( _lhsOpp) })) )+sem_Expr_TextExpr :: ([String]) ->+                     T_Expr +sem_Expr_TextExpr !lns_  =+    (T_Expr (\ (!_lhsInested)+               (!_lhsIoptions)+               (!_lhsIoutputfile) ->+                 (case ({-# LINE 138 "PrintCode.ag" #-}+                        vlist (map text lns_)+                        {-# LINE 1561 "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 1573 "PrintCode.hs" #-}) of+                  { !_exprOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1577 "PrintCode.hs" #-}) of+                   { !_exprOoptions ->+                   (case ({-# LINE 51 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1581 "PrintCode.hs" #-}) of+                    { !_exprOnested ->+                    (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of+                     { ( !_exprIpp) ->+                     (case ({-# LINE 139 "PrintCode.ag" #-}+                            "trace" >#< (   pp_parens ("\"" >|< text txt_ >|< "\"")+                                        >-< pp_parens _exprIpp+                                        )+                            {-# LINE 1589 "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 1600 "PrintCode.hs" #-}) of+                  { !_exprsOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1604 "PrintCode.hs" #-}) of+                   { !_exprsOoptions ->+                   (case ({-# LINE 53 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1608 "PrintCode.hs" #-}) of+                    { !_exprsOnested ->+                    (case ((exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile )) of+                     { ( !_exprsIpps) ->+                     (case ({-# LINE 134 "PrintCode.ag" #-}+                            ppTuple _lhsInested _exprsIpps+                            {-# LINE 1614 "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 1626 "PrintCode.hs" #-}) of+                  { !_tpOnested ->+                  (case ({-# LINE 39 "PrintCode.ag" #-}+                         _lhsIoutputfile+                         {-# LINE 1630 "PrintCode.hs" #-}) of+                   { !_exprOoutputfile ->+                   (case ({-# LINE 49 "PrintCode.ag" #-}+                          _lhsIoptions+                          {-# LINE 1634 "PrintCode.hs" #-}) of+                    { !_exprOoptions ->+                    (case ({-# LINE 51 "PrintCode.ag" #-}+                           _lhsInested+                           {-# LINE 1638 "PrintCode.hs" #-}) of+                     { !_exprOnested ->+                     (case ((tp_ _tpOnested )) of+                      { ( !_tpIpp,!_tpIprec) ->+                      (case ((expr_ _exprOnested _exprOoptions _exprOoutputfile )) of+                       { ( !_exprIpp) ->+                       (case ({-# LINE 154 "PrintCode.ag" #-}+                              pp_parens (_exprIpp >#< "::" >#< _tpIpp)+                              {-# LINE 1646 "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 1657 "PrintCode.hs" #-}) of+                  { !_exprsOoutputfile ->+                  (case ({-# LINE 49 "PrintCode.ag" #-}+                         _lhsIoptions+                         {-# LINE 1661 "PrintCode.hs" #-}) of+                   { !_exprsOoptions ->+                   (case ({-# LINE 53 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 1665 "PrintCode.hs" #-}) of+                    { !_exprsOnested ->+                    (case ((exprs_ _exprsOnested _exprsOoptions _exprsOoutputfile )) of+                     { ( !_exprsIpps) ->+                     (case ({-# LINE 135 "PrintCode.ag" #-}+                            ppUnboxedTuple _lhsInested _exprsIpps+                            {-# LINE 1671 "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 1717 "PrintCode.hs" #-}) of+                   { !_tlOoutputfile ->+                   (case ({-# LINE 49 "PrintCode.ag" #-}+                          _lhsIoptions+                          {-# LINE 1721 "PrintCode.hs" #-}) of+                    { !_tlOoptions ->+                    (case ({-# LINE 53 "PrintCode.ag" #-}+                           _lhsInested+                           {-# LINE 1725 "PrintCode.hs" #-}) of+                     { !_tlOnested ->+                     (case ({-# LINE 39 "PrintCode.ag" #-}+                            _lhsIoutputfile+                            {-# LINE 1729 "PrintCode.hs" #-}) of+                      { !_hdOoutputfile ->+                      (case ({-# LINE 49 "PrintCode.ag" #-}+                             _lhsIoptions+                             {-# LINE 1733 "PrintCode.hs" #-}) of+                       { !_hdOoptions ->+                       (case ({-# LINE 51 "PrintCode.ag" #-}+                              _lhsInested+                              {-# LINE 1737 "PrintCode.hs" #-}) of+                        { !_hdOnested ->+                        (case ((tl_ _tlOnested _tlOoptions _tlOoutputfile )) of+                         { ( !_tlIpps) ->+                         (case ((hd_ _hdOnested _hdOoptions _hdOoutputfile )) of+                          { ( !_hdIpp) ->+                          (case ({-# LINE 61 "PrintCode.ag" #-}+                                 _hdIpp : _tlIpps+                                 {-# LINE 1745 "PrintCode.hs" #-}) of+                           { !_lhsOpps ->+                           ( _lhsOpps) }) }) }) }) }) }) }) }) })) )+sem_Exprs_Nil :: T_Exprs +sem_Exprs_Nil  =+    (T_Exprs (\ (!_lhsInested)+                (!_lhsIoptions)+                (!_lhsIoutputfile) ->+                  (case ({-# LINE 62 "PrintCode.ag" #-}+                         []+                         {-# LINE 1755 "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 1843 "PrintCode.hs" #-}) of+                 { !_argsOoutputfile ->+                 (case ({-# LINE 49 "PrintCode.ag" #-}+                        _lhsIoptions+                        {-# LINE 1847 "PrintCode.hs" #-}) of+                  { !_argsOoptions ->+                  (case ({-# LINE 53 "PrintCode.ag" #-}+                         _lhsInested+                         {-# LINE 1851 "PrintCode.hs" #-}) of+                   { !_argsOnested ->+                   (case ({-# LINE 181 "PrintCode.ag" #-}+                          if bangpats _lhsIoptions+                                   then \p -> "!" >|< p+                                   else id+                          {-# LINE 1857 "PrintCode.hs" #-}) of+                    { !_addBang ->+                    (case ((args_ _argsOnested _argsOoptions _argsOoutputfile )) of+                     { ( !_argsIpps) ->+                     (case ({-# LINE 178 "PrintCode.ag" #-}+                            _argsIpps `ppMultiSeqH` (pp "True")+                            {-# LINE 1863 "PrintCode.hs" #-}) of+                      { !_strictGuard ->+                      (case ({-# LINE 177 "PrintCode.ag" #-}+                             not (null _argsIpps)+                             {-# LINE 1867 "PrintCode.hs" #-}) of+                       { !_hasStrictVars ->+                       (case ({-# LINE 176 "PrintCode.ag" #-}+                              if strictSems _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id+                              {-# LINE 1871 "PrintCode.hs" #-}) of+                        { !_addStrictGuard ->+                        (case ({-# LINE 189 "PrintCode.ag" #-}+                               _addStrictGuard     (name_ >#< hv_sp (map _addBang     _argsIpps))+                               {-# LINE 1875 "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 1887 "PrintCode.hs" #-}) of+                 { !_pat3Ooptions ->+                 (case ({-# LINE 323 "PrintCode.ag" #-}+                        _lhsIisDeclOfLet+                        {-# LINE 1891 "PrintCode.hs" #-}) of+                  { !_pat3OisDeclOfLet ->+                  (case ({-# LINE 296 "PrintCode.ag" #-}+                         False+                         {-# LINE 1895 "PrintCode.hs" #-}) of+                   { !_pat3ObelowIrrefutable ->+                   (case ((pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions )) of+                    { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->+                    (case ({-# LINE 168 "PrintCode.ag" #-}+                           not (null _pat3IstrictVars)+                           {-# LINE 1901 "PrintCode.hs" #-}) of+                     { !_hasStrictVars ->+                     (case ({-# LINE 167 "PrintCode.ag" #-}+                            _pat3IstrictVars `ppMultiSeqH` (pp "True")+                            {-# LINE 1905 "PrintCode.hs" #-}) of+                      { !_strictGuard ->+                      (case ({-# LINE 165 "PrintCode.ag" #-}+                             if strictCases _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id+                             {-# LINE 1909 "PrintCode.hs" #-}) of+                       { !_addStrictGuard ->+                       (case ({-# LINE 185 "PrintCode.ag" #-}+                              _addStrictGuard     _pat3Ipp+                              {-# LINE 1913 "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 1925 "PrintCode.hs" #-}) of+                 { !_pat3Ooptions ->+                 (case ({-# LINE 323 "PrintCode.ag" #-}+                        _lhsIisDeclOfLet+                        {-# LINE 1929 "PrintCode.hs" #-}) of+                  { !_pat3OisDeclOfLet ->+                  (case ({-# LINE 296 "PrintCode.ag" #-}+                         False+                         {-# LINE 1933 "PrintCode.hs" #-}) of+                   { !_pat3ObelowIrrefutable ->+                   (case ((pat3_ _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions )) of+                    { ( !_pat3Icopy,!_pat3IisUnderscore,!_pat3Ipp,!_pat3Ipp',!_pat3IstrictVars) ->+                    (case ({-# LINE 186 "PrintCode.ag" #-}+                           _pat3Ipp'+                           {-# LINE 1939 "PrintCode.hs" #-}) of+                     { !_lhsOpp ->+                     ( _lhsOpp) }) }) }) }) })) )+sem_Lhs_TupleLhs :: ([String]) ->+                    T_Lhs +sem_Lhs_TupleLhs !comps_  =+    (T_Lhs (\ (!_lhsIisDeclOfLet)+              (!_lhsInested)+              (!_lhsIoptions)+              (!_lhsIoutputfile) ->+                (case ({-# LINE 181 "PrintCode.ag" #-}+                       if bangpats _lhsIoptions+                                then \p -> "!" >|< p+                                else id+                       {-# LINE 1953 "PrintCode.hs" #-}) of+                 { !_addBang ->+                 (case ({-# LINE 173 "PrintCode.ag" #-}+                        not (null comps_)+                        {-# LINE 1957 "PrintCode.hs" #-}) of+                  { !_hasStrictVars ->+                  (case ({-# LINE 170 "PrintCode.ag" #-}+                         if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+                         then map text comps_ `ppMultiSeqH` (pp "True")+                         else pp "True"+                         {-# LINE 1963 "PrintCode.hs" #-}) of+                   { !_strictGuard ->+                   (case ({-# LINE 165 "PrintCode.ag" #-}+                          if strictCases _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id+                          {-# LINE 1967 "PrintCode.hs" #-}) of+                    { !_addStrictGuard ->+                    (case ({-# LINE 187 "PrintCode.ag" #-}+                           _addStrictGuard     $ ppTuple _lhsInested (map (_addBang     . text) comps_)+                           {-# LINE 1971 "PrintCode.hs" #-}) of+                     { !_lhsOpp ->+                     ( _lhsOpp) }) }) }) }) })) )+sem_Lhs_UnboxedTupleLhs :: ([String]) ->+                           T_Lhs +sem_Lhs_UnboxedTupleLhs !comps_  =+    (T_Lhs (\ (!_lhsIisDeclOfLet)+              (!_lhsInested)+              (!_lhsIoptions)+              (!_lhsIoutputfile) ->+                (case ({-# LINE 181 "PrintCode.ag" #-}+                       if bangpats _lhsIoptions+                                then \p -> "!" >|< p+                                else id+                       {-# LINE 1985 "PrintCode.hs" #-}) of+                 { !_addBang ->+                 (case ({-# LINE 173 "PrintCode.ag" #-}+                        not (null comps_)+                        {-# LINE 1989 "PrintCode.hs" #-}) of+                  { !_hasStrictVars ->+                  (case ({-# LINE 170 "PrintCode.ag" #-}+                         if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+                         then map text comps_ `ppMultiSeqH` (pp "True")+                         else pp "True"+                         {-# LINE 1995 "PrintCode.hs" #-}) of+                   { !_strictGuard ->+                   (case ({-# LINE 165 "PrintCode.ag" #-}+                          if strictCases _lhsIoptions && _hasStrictVars     then \v -> v >#< "|" >#< _strictGuard     else id+                          {-# LINE 1999 "PrintCode.hs" #-}) of+                    { !_addStrictGuard ->+                    (case ({-# LINE 188 "PrintCode.ag" #-}+                           _addStrictGuard     $ ppUnboxedTuple _lhsInested (map (_addBang     . text) comps_)+                           {-# LINE 2003 "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 2016 "PrintCode.hs" #-}) of+                 { !_subOoutputfile ->+                 (case ({-# LINE 49 "PrintCode.ag" #-}+                        _lhsIoptions+                        {-# LINE 2020 "PrintCode.hs" #-}) of+                  { !_subOoptions ->+                  (case ({-# LINE 51 "PrintCode.ag" #-}+                         _lhsInested+                         {-# LINE 2024 "PrintCode.hs" #-}) of+                   { !_subOnested ->+                   (case ({-# LINE 323 "PrintCode.ag" #-}+                          _lhsIisDeclOfLet+                          {-# LINE 2028 "PrintCode.hs" #-}) of+                    { !_subOisDeclOfLet ->+                    (case ((sub_ _subOisDeclOfLet _subOnested _subOoptions _subOoutputfile )) of+                     { ( !_subIpp) ->+                     (case ({-# LINE 190 "PrintCode.ag" #-}+                            pp_parens (name_ >#< _subIpp)+                            {-# LINE 2034 "PrintCode.hs" #-}) of+                      { !_lhsOpp ->+                      ( _lhsOpp) }) }) }) }) }) })) )+-- 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 2122 "PrintCode.hs" #-}) of+                     { !_partsOoptions ->+                     (case ({-# LINE 323 "PrintCode.ag" #-}+                            _lhsIisDeclOfLet+                            {-# LINE 2126 "PrintCode.hs" #-}) of+                      { !_partsOisDeclOfLet ->+                      (case ({-# LINE 289 "PrintCode.ag" #-}+                             _lhsIbelowIrrefutable+                             {-# LINE 2130 "PrintCode.hs" #-}) of+                       { !_partsObelowIrrefutable ->+                       (case ((parts_ _partsObelowIrrefutable _partsOisDeclOfLet _partsOoptions )) of+                        { ( !_partsIcopy,!_partsIpps,!_partsIpps',!_partsIstrictVars) ->+                        (case ({-# LINE 49 "PrintCode.ag" #-}+                               _lhsIoptions+                               {-# LINE 2136 "PrintCode.hs" #-}) of+                         { !_patOoptions ->+                         (case ({-# LINE 323 "PrintCode.ag" #-}+                                _lhsIisDeclOfLet+                                {-# LINE 2140 "PrintCode.hs" #-}) of+                          { !_patOisDeclOfLet ->+                          (case ({-# LINE 289 "PrintCode.ag" #-}+                                 _lhsIbelowIrrefutable+                                 {-# LINE 2144 "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 2150 "PrintCode.hs" #-}) of+                             { !_copy ->+                             (case ({-# LINE 23 "./Patterns.ag" #-}+                                    _copy+                                    {-# LINE 2154 "PrintCode.hs" #-}) of+                              { !_lhsOcopy ->+                              (case ({-# LINE 286 "PrintCode.ag" #-}+                                     False+                                     {-# LINE 2158 "PrintCode.hs" #-}) of+                               { !_lhsOisUnderscore ->+                               (case ({-# LINE 275 "PrintCode.ag" #-}+                                      pp (attrname False field_ attr_)+                                      {-# LINE 2162 "PrintCode.hs" #-}) of+                                { !_ppVar ->+                                (case ({-# LINE 268 "PrintCode.ag" #-}+                                       if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+                                       then \p -> "!" >|< p+                                       else id+                                       {-# LINE 2168 "PrintCode.hs" #-}) of+                                 { !_addBang ->+                                 (case ({-# LINE 276 "PrintCode.ag" #-}+                                        _addBang     $ _ppVar+                                        {-# LINE 2172 "PrintCode.hs" #-}) of+                                  { !_ppVarBang ->+                                  (case ({-# LINE 277 "PrintCode.ag" #-}+                                         if _patIisUnderscore+                                          then _ppVarBang+                                          else _ppVarBang     >|< "@" >|< _patIpp+                                         {-# LINE 2178 "PrintCode.hs" #-}) of+                                   { !_lhsOpp ->+                                   (case ({-# LINE 309 "PrintCode.ag" #-}+                                          let attribute | field_ == _LOC || field_ == nullIdent = locname' attr_+                                                        | otherwise                             = attrname False field_ attr_+                                          in attribute >|< "@" >|< _patIpp'+                                          {-# LINE 2184 "PrintCode.hs" #-}) of+                                    { !_lhsOpp' ->+                                    (case ({-# LINE 249 "PrintCode.ag" #-}+                                           if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+                                           then _patIstrictVars+                                           else []+                                           {-# LINE 2190 "PrintCode.hs" #-}) of+                                     { !_strictPatVars ->+                                     (case ({-# LINE 245 "PrintCode.ag" #-}+                                            if strictCases _lhsIoptions && not _lhsIisDeclOfLet+                                            then [_ppVar    ]+                                            else []+                                            {-# LINE 2196 "PrintCode.hs" #-}) of+                                      { !_strictVar ->+                                      (case ({-# LINE 253 "PrintCode.ag" #-}+                                             _strictVar     ++ _strictPatVars+                                             {-# LINE 2200 "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 2212 "PrintCode.hs" #-}) of+                     { !_patsOoptions ->+                     (case ({-# LINE 323 "PrintCode.ag" #-}+                            _lhsIisDeclOfLet+                            {-# LINE 2216 "PrintCode.hs" #-}) of+                      { !_patsOisDeclOfLet ->+                      (case ({-# LINE 289 "PrintCode.ag" #-}+                             _lhsIbelowIrrefutable+                             {-# LINE 2220 "PrintCode.hs" #-}) of+                       { !_patsObelowIrrefutable ->+                       (case ((pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions )) of+                        { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->+                        (case ({-# LINE 23 "./Patterns.ag" #-}+                               Constr name_ _patsIcopy+                               {-# LINE 2226 "PrintCode.hs" #-}) of+                         { !_copy ->+                         (case ({-# LINE 23 "./Patterns.ag" #-}+                                _copy+                                {-# LINE 2230 "PrintCode.hs" #-}) of+                          { !_lhsOcopy ->+                          (case ({-# LINE 284 "PrintCode.ag" #-}+                                 False+                                 {-# LINE 2234 "PrintCode.hs" #-}) of+                           { !_lhsOisUnderscore ->+                           (case ({-# LINE 268 "PrintCode.ag" #-}+                                  if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+                                  then \p -> "!" >|< p+                                  else id+                                  {-# LINE 2240 "PrintCode.hs" #-}) of+                            { !_addBang ->+                            (case ({-# LINE 273 "PrintCode.ag" #-}+                                   _addBang     $ pp_parens $ name_ >#< hv_sp _patsIpps+                                   {-# LINE 2244 "PrintCode.hs" #-}) of+                             { !_lhsOpp ->+                             (case ({-# LINE 307 "PrintCode.ag" #-}+                                    pp_parens $ name_ >#< hv_sp (map pp_parens _patsIpps')+                                    {-# LINE 2248 "PrintCode.hs" #-}) of+                              { !_lhsOpp' ->+                              (case ({-# LINE 242 "PrintCode.ag" #-}+                                     _patsIstrictVars+                                     {-# LINE 2252 "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 2263 "PrintCode.hs" #-}) of+                     { !_patOoptions ->+                     (case ({-# LINE 323 "PrintCode.ag" #-}+                            _lhsIisDeclOfLet+                            {-# LINE 2267 "PrintCode.hs" #-}) of+                      { !_patOisDeclOfLet ->+                      (case ({-# LINE 292 "PrintCode.ag" #-}+                             True+                             {-# LINE 2271 "PrintCode.hs" #-}) of+                       { !_patObelowIrrefutable ->+                       (case ((pat_ _patObelowIrrefutable _patOisDeclOfLet _patOoptions )) of+                        { ( !_patIcopy,!_patIisUnderscore,!_patIpp,!_patIpp',!_patIstrictVars) ->+                        (case ({-# LINE 23 "./Patterns.ag" #-}+                               Irrefutable _patIcopy+                               {-# LINE 2277 "PrintCode.hs" #-}) of+                         { !_copy ->+                         (case ({-# LINE 23 "./Patterns.ag" #-}+                                _copy+                                {-# LINE 2281 "PrintCode.hs" #-}) of+                          { !_lhsOcopy ->+                          (case ({-# LINE 283 "PrintCode.ag" #-}+                                 _patIisUnderscore+                                 {-# LINE 2285 "PrintCode.hs" #-}) of+                           { !_lhsOisUnderscore ->+                           (case ({-# LINE 280 "PrintCode.ag" #-}+                                  text "~" >|< pp_parens _patIpp+                                  {-# LINE 2289 "PrintCode.hs" #-}) of+                            { !_lhsOpp ->+                            (case ({-# LINE 312 "PrintCode.ag" #-}+                                   text "~" >|< pp_parens _patIpp+                                   {-# LINE 2293 "PrintCode.hs" #-}) of+                             { !_lhsOpp' ->+                             (case ({-# LINE 256 "PrintCode.ag" #-}+                                    []+                                    {-# LINE 2297 "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 2309 "PrintCode.hs" #-}) of+                     { !_patsOoptions ->+                     (case ({-# LINE 323 "PrintCode.ag" #-}+                            _lhsIisDeclOfLet+                            {-# LINE 2313 "PrintCode.hs" #-}) of+                      { !_patsOisDeclOfLet ->+                      (case ({-# LINE 289 "PrintCode.ag" #-}+                             _lhsIbelowIrrefutable+                             {-# LINE 2317 "PrintCode.hs" #-}) of+                       { !_patsObelowIrrefutable ->+                       (case ((pats_ _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions )) of+                        { ( !_patsIcopy,!_patsIpps,!_patsIpps',!_patsIstrictVars) ->+                        (case ({-# LINE 23 "./Patterns.ag" #-}+                               Product pos_ _patsIcopy+                               {-# LINE 2323 "PrintCode.hs" #-}) of+                         { !_copy ->+                         (case ({-# LINE 23 "./Patterns.ag" #-}+                                _copy+                                {-# LINE 2327 "PrintCode.hs" #-}) of+                          { !_lhsOcopy ->+                          (case ({-# LINE 285 "PrintCode.ag" #-}+                                 False+                                 {-# LINE 2331 "PrintCode.hs" #-}) of+                           { !_lhsOisUnderscore ->+                           (case ({-# LINE 268 "PrintCode.ag" #-}+                                  if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+                                  then \p -> "!" >|< p+                                  else id+                                  {-# LINE 2337 "PrintCode.hs" #-}) of+                            { !_addBang ->+                            (case ({-# LINE 274 "PrintCode.ag" #-}+                                   _addBang     $ pp_block "(" ")" "," _patsIpps+                                   {-# LINE 2341 "PrintCode.hs" #-}) of+                             { !_lhsOpp ->+                             (case ({-# LINE 308 "PrintCode.ag" #-}+                                    pp_block "(" ")" "," _patsIpps'+                                    {-# LINE 2345 "PrintCode.hs" #-}) of+                              { !_lhsOpp' ->+                              (case ({-# LINE 242 "PrintCode.ag" #-}+                                     _patsIstrictVars+                                     {-# LINE 2349 "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 2360 "PrintCode.hs" #-}) of+                     { !_copy ->+                     (case ({-# LINE 23 "./Patterns.ag" #-}+                            _copy+                            {-# LINE 2364 "PrintCode.hs" #-}) of+                      { !_lhsOcopy ->+                      (case ({-# LINE 287 "PrintCode.ag" #-}+                             True+                             {-# LINE 2368 "PrintCode.hs" #-}) of+                       { !_lhsOisUnderscore ->+                       (case ({-# LINE 281 "PrintCode.ag" #-}+                              text "_"+                              {-# LINE 2372 "PrintCode.hs" #-}) of+                        { !_lhsOpp ->+                        (case ({-# LINE 313 "PrintCode.ag" #-}+                               text "_"+                               {-# LINE 2376 "PrintCode.hs" #-}) of+                         { !_lhsOpp' ->+                         (case ({-# LINE 242 "PrintCode.ag" #-}+                                []+                                {-# LINE 2380 "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 2433 "PrintCode.hs" #-}) of+                      { !_tlOoptions ->+                      (case ({-# LINE 323 "PrintCode.ag" #-}+                             _lhsIisDeclOfLet+                             {-# LINE 2437 "PrintCode.hs" #-}) of+                       { !_tlOisDeclOfLet ->+                       (case ({-# LINE 289 "PrintCode.ag" #-}+                              _lhsIbelowIrrefutable+                              {-# LINE 2441 "PrintCode.hs" #-}) of+                        { !_tlObelowIrrefutable ->+                        (case ((tl_ _tlObelowIrrefutable _tlOisDeclOfLet _tlOoptions )) of+                         { ( !_tlIcopy,!_tlIpps,!_tlIpps',!_tlIstrictVars) ->+                         (case ({-# LINE 49 "PrintCode.ag" #-}+                                _lhsIoptions+                                {-# LINE 2447 "PrintCode.hs" #-}) of+                          { !_hdOoptions ->+                          (case ({-# LINE 323 "PrintCode.ag" #-}+                                 _lhsIisDeclOfLet+                                 {-# LINE 2451 "PrintCode.hs" #-}) of+                           { !_hdOisDeclOfLet ->+                           (case ({-# LINE 289 "PrintCode.ag" #-}+                                  _lhsIbelowIrrefutable+                                  {-# LINE 2455 "PrintCode.hs" #-}) of+                            { !_hdObelowIrrefutable ->+                            (case ((hd_ _hdObelowIrrefutable _hdOisDeclOfLet _hdOoptions )) of+                             { ( !_hdIcopy,!_hdIisUnderscore,!_hdIpp,!_hdIpp',!_hdIstrictVars) ->+                             (case ({-# LINE 23 "./Patterns.ag" #-}+                                    (:) _hdIcopy _tlIcopy+                                    {-# LINE 2461 "PrintCode.hs" #-}) of+                              { !_copy ->+                              (case ({-# LINE 23 "./Patterns.ag" #-}+                                     _copy+                                     {-# LINE 2465 "PrintCode.hs" #-}) of+                               { !_lhsOcopy ->+                               (case ({-# LINE 263 "PrintCode.ag" #-}+                                      _hdIpp : _tlIpps+                                      {-# LINE 2469 "PrintCode.hs" #-}) of+                                { !_lhsOpps ->+                                (case ({-# LINE 303 "PrintCode.ag" #-}+                                       _hdIpp' : _tlIpps'+                                       {-# LINE 2473 "PrintCode.hs" #-}) of+                                 { !_lhsOpps' ->+                                 (case ({-# LINE 242 "PrintCode.ag" #-}+                                        _hdIstrictVars ++ _tlIstrictVars+                                        {-# LINE 2477 "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 2487 "PrintCode.hs" #-}) of+                      { !_copy ->+                      (case ({-# LINE 23 "./Patterns.ag" #-}+                             _copy+                             {-# LINE 2491 "PrintCode.hs" #-}) of+                       { !_lhsOcopy ->+                       (case ({-# LINE 264 "PrintCode.ag" #-}+                              []+                              {-# LINE 2495 "PrintCode.hs" #-}) of+                        { !_lhsOpps ->+                        (case ({-# LINE 304 "PrintCode.ag" #-}+                               []+                               {-# LINE 2499 "PrintCode.hs" #-}) of+                         { !_lhsOpps' ->+                         (case ({-# LINE 242 "PrintCode.ag" #-}+                                []+                                {-# LINE 2503 "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 +         visit 0:+            local commonFile  : _+            local genCommonModule : _+            local mainModuleFile : _+            local genMainModule : _+-}+-- cata+sem_Program :: Program  ->+               T_Program +sem_Program !(Program _chunks )  =+    (sem_Program_Program (sem_Chunks _chunks ) )+-- 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  ->+                       T_Program +sem_Program_Program !(T_Chunks chunks_ )  =+    (T_Program (\ (!_lhsIimportBlocks)+                  (!_lhsImainFile)+                  (!_lhsImainName)+                  (!_lhsImoduleHeader)+                  (!_lhsIoptions)+                  (!_lhsIoptionsLine)+                  (!_lhsIpragmaBlocks)+                  (!_lhsItextBlockMap)+                  (!_lhsItextBlocks) ->+                    (case ({-# LINE 347 "PrintCode.ag" #-}+                           _lhsItextBlockMap+                           {-# LINE 2570 "PrintCode.hs" #-}) of+                     { !_chunksOtextBlockMap ->+                     (case ({-# LINE 345 "PrintCode.ag" #-}+                            _lhsIpragmaBlocks+                            {-# LINE 2574 "PrintCode.hs" #-}) of+                      { !_chunksOpragmaBlocks ->+                      (case ({-# LINE 348 "PrintCode.ag" #-}+                             _lhsIoptionsLine+                             {-# LINE 2578 "PrintCode.hs" #-}) of+                       { !_chunksOoptionsLine ->+                       (case ({-# LINE 49 "PrintCode.ag" #-}+                              _lhsIoptions+                              {-# LINE 2582 "PrintCode.hs" #-}) of+                        { !_chunksOoptions ->+                        (case ({-# LINE 351 "PrintCode.ag" #-}+                               _lhsImoduleHeader+                               {-# LINE 2586 "PrintCode.hs" #-}) of+                         { !_chunksOmoduleHeader ->+                         (case ({-# LINE 350 "PrintCode.ag" #-}+                                _lhsImainName+                                {-# LINE 2590 "PrintCode.hs" #-}) of+                          { !_chunksOmainName ->+                          (case ({-# LINE 349 "PrintCode.ag" #-}+                                 _lhsImainFile+                                 {-# LINE 2594 "PrintCode.hs" #-}) of+                           { !_chunksOmainFile ->+                           (case ({-# LINE 368 "PrintCode.ag" #-}+                                  _lhsImainFile ++ "_common.hs"+                                  {-# LINE 2598 "PrintCode.hs" #-}) of+                            { !_commonFile ->+                            (case ({-# LINE 326 "PrintCode.ag" #-}+                                   False+                                   {-# LINE 2602 "PrintCode.hs" #-}) of+                             { !_chunksOisDeclOfLet ->+                             (case ({-# LINE 58 "PrintCode.ag" #-}+                                    nest _lhsIoptions+                                    {-# LINE 2606 "PrintCode.hs" #-}) of+                              { !_chunksOnested ->+                              (case ({-# LINE 346 "PrintCode.ag" #-}+                                     _lhsItextBlocks+                                     {-# LINE 2610 "PrintCode.hs" #-}) of+                               { !_chunksOtextBlocks ->+                               (case ({-# LINE 344 "PrintCode.ag" #-}+                                      _lhsIimportBlocks+                                      {-# LINE 2614 "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 369 "PrintCode.ag" #-}+                                        writeModule _commonFile+                                            ( [ pp $ _lhsIpragmaBlocks+                                              , pp $ _lhsIoptionsLine+                                              , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True+                                              , _lhsIimportBlocks+                                              , _lhsItextBlocks+                                              ]+                                              ++ map vlist _chunksIappendCommon+                                            )+                                        {-# LINE 2628 "PrintCode.hs" #-}) of+                                  { !_genCommonModule ->+                                  (case ({-# LINE 356 "PrintCode.ag" #-}+                                         _lhsImainFile ++ ".hs"+                                         {-# LINE 2632 "PrintCode.hs" #-}) of+                                   { !_mainModuleFile ->+                                   (case ({-# LINE 357 "PrintCode.ag" #-}+                                          writeModule _mainModuleFile+                                            ( [ pp $ _lhsIpragmaBlocks+                                              , pp $ _lhsIoptionsLine+                                              , pp $ _lhsImoduleHeader _lhsImainName "" "" False+                                              , pp $ ("import " ++ _lhsImainName ++ "_common\n")+                                              ]+                                              ++ map pp _chunksIimports+                                              ++ map vlist _chunksIappendMain+                                            )+                                          {-# LINE 2644 "PrintCode.hs" #-}) of+                                    { !_genMainModule ->+                                    (case ({-# LINE 380 "PrintCode.ag" #-}+                                           do _genMainModule+                                              _genCommonModule+                                              _chunksIgenSems+                                           {-# LINE 2650 "PrintCode.hs" #-}) of+                                     { !_lhsOgenIO ->+                                     (case ({-# LINE 86 "PrintCode.ag" #-}+                                            _chunksIpps+                                            {-# LINE 2654 "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 SimpleType:+         child txt            : {String}+      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 !(SimpleType _txt )  =+    (sem_Type_SimpleType _txt )+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 2723 "PrintCode.hs" #-}) of+                  { !_rightOnested ->+                  (case ({-# LINE 51 "PrintCode.ag" #-}+                         _lhsInested+                         {-# LINE 2727 "PrintCode.hs" #-}) of+                   { !_leftOnested ->+                   (case ((right_ _rightOnested )) of+                    { ( !_rightIpp,!_rightIprec) ->+                    (case ({-# LINE 196 "PrintCode.ag" #-}+                           if _rightIprec <  2 then pp_parens _rightIpp else _rightIpp+                           {-# LINE 2733 "PrintCode.hs" #-}) of+                     { !_r ->+                     (case ((left_ _leftOnested )) of+                      { ( !_leftIpp,!_leftIprec) ->+                      (case ({-# LINE 195 "PrintCode.ag" #-}+                             if _leftIprec  <= 2 then pp_parens _leftIpp  else _leftIpp+                             {-# LINE 2739 "PrintCode.hs" #-}) of+                       { !_l ->+                       (case ({-# LINE 194 "PrintCode.ag" #-}+                              _l     >#< "->" >-< _r+                              {-# LINE 2743 "PrintCode.hs" #-}) of+                        { !_lhsOpp ->+                        (case ({-# LINE 193 "PrintCode.ag" #-}+                               2+                               {-# LINE 2747 "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 2757 "PrintCode.hs" #-}) of+                  { !_rightOnested ->+                  (case ((right_ _rightOnested )) of+                   { ( !_rightIpp,!_rightIprec) ->+                   (case ({-# LINE 202 "PrintCode.ag" #-}+                          (pp_block "(" ")" "," $ map (\(n,ns) -> hv_sp $ map pp (n:ns)) left_) >#< "=>" >#< _rightIpp+                          {-# LINE 2763 "PrintCode.hs" #-}) of+                    { !_lhsOpp ->+                    (case ({-# LINE 192 "PrintCode.ag" #-}+                           _rightIprec+                           {-# LINE 2767 "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 2776 "PrintCode.hs" #-}) of+                  { !_tpOnested ->+                  (case ((tp_ _tpOnested )) of+                   { ( !_tpIpp,!_tpIprec) ->+                   (case ({-# LINE 211 "PrintCode.ag" #-}+                          "[" >|< _tpIpp >|< "]"+                          {-# LINE 2782 "PrintCode.hs" #-}) of+                    { !_lhsOpp ->+                    (case ({-# LINE 210 "PrintCode.ag" #-}+                           5+                           {-# LINE 2786 "PrintCode.hs" #-}) of+                     { !_lhsOprec ->+                     ( _lhsOpp,_lhsOprec) }) }) }) })) )+sem_Type_SimpleType :: String ->+                       T_Type +sem_Type_SimpleType !txt_  =+    (T_Type (\ (!_lhsInested) ->+                 (case ({-# LINE 214 "PrintCode.ag" #-}+                        if reallySimple txt_ then text txt_ else pp_parens (text txt_)+                        {-# LINE 2795 "PrintCode.hs" #-}) of+                  { !_lhsOpp ->+                  (case ({-# LINE 213 "PrintCode.ag" #-}+                         5+                         {-# LINE 2799 "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 2808 "PrintCode.hs" #-}) of+                  { !_tpsOnested ->+                  (case ((tps_ _tpsOnested )) of+                   { ( !_tpsIpps) ->+                   (case ({-# LINE 205 "PrintCode.ag" #-}+                          ppTuple _lhsInested _tpsIpps+                          {-# LINE 2814 "PrintCode.hs" #-}) of+                    { !_lhsOpp ->+                    (case ({-# LINE 204 "PrintCode.ag" #-}+                           5+                           {-# LINE 2818 "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 2828 "PrintCode.hs" #-}) of+                  { !_argsOnested ->+                  (case ({-# LINE 51 "PrintCode.ag" #-}+                         _lhsInested+                         {-# LINE 2832 "PrintCode.hs" #-}) of+                   { !_funcOnested ->+                   (case ((args_ _argsOnested )) of+                    { ( !_argsIpps) ->+                    (case ((func_ _funcOnested )) of+                     { ( !_funcIpp,!_funcIprec) ->+                     (case ({-# LINE 199 "PrintCode.ag" #-}+                            hv_sp (_funcIpp : _argsIpps)+                            {-# LINE 2840 "PrintCode.hs" #-}) of+                      { !_lhsOpp ->+                      (case ({-# LINE 192 "PrintCode.ag" #-}+                             _funcIprec+                             {-# LINE 2844 "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 2853 "PrintCode.hs" #-}) of+                  { !_tpsOnested ->+                  (case ((tps_ _tpsOnested )) of+                   { ( !_tpsIpps) ->+                   (case ({-# LINE 208 "PrintCode.ag" #-}+                          ppUnboxedTuple _lhsInested _tpsIpps+                          {-# LINE 2859 "PrintCode.hs" #-}) of+                    { !_lhsOpp ->+                    (case ({-# LINE 207 "PrintCode.ag" #-}+                           5+                           {-# LINE 2863 "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 2903 "PrintCode.hs" #-}) of+                   { !_tlOnested ->+                   (case ({-# LINE 51 "PrintCode.ag" #-}+                          _lhsInested+                          {-# LINE 2907 "PrintCode.hs" #-}) of+                    { !_hdOnested ->+                    (case ((tl_ _tlOnested )) of+                     { ( !_tlIpps) ->+                     (case ((hd_ _hdOnested )) of+                      { ( !_hdIpp,!_hdIprec) ->+                      (case ({-# LINE 73 "PrintCode.ag" #-}+                             _hdIpp : _tlIpps+                             {-# LINE 2915 "PrintCode.hs" #-}) of+                       { !_lhsOpps ->+                       ( _lhsOpps) }) }) }) }) })) )+sem_Types_Nil :: T_Types +sem_Types_Nil  =+    (T_Types (\ (!_lhsInested) ->+                  (case ({-# LINE 74 "PrintCode.ag" #-}+                         []+                         {-# LINE 2923 "PrintCode.hs" #-}) of                    { !_lhsOpps ->                    ( _lhsOpps) })) )
src-derived/PrintErrorMessages.hs view
@@ -2,6 +2,7 @@  -- UUAGC 0.9.14 (PrintErrorMessages.ag) module PrintErrorMessages where+{-# LINE 4 "PrintErrorMessages.ag" #-}  import Pretty import UU.Scanner.Position(Pos(..), noPos)@@ -10,13 +11,17 @@ import Options import Data.List(mapAccumL,intersect,(\\)) import GrammarInfo+{-# LINE 15 "../src-derived/PrintErrorMessages.hs" #-} +{-# LINE 2 "./ErrorMessages.ag" #-}  import UU.Scanner.Position(Pos) import Pretty import DepTypes(Trace) import CodeSyntax import CommonTypes+{-# LINE 24 "../src-derived/PrintErrorMessages.hs" #-}+{-# LINE 16 "PrintErrorMessages.ag" #-}  isError :: Options -> Error -> Bool isError opts (ParserError     _ _ _    ) = True@@ -51,7 +56,9 @@ cycleIsDangerous :: Options -> Bool cycleIsDangerous opts   = any ($ opts) [ wignore, bangpats, cases, strictCases, stricterCases, strictSems, withCycle ]+{-# LINE 60 "../src-derived/PrintErrorMessages.hs" #-} +{-# LINE 468 "PrintErrorMessages.ag" #-}  toWidth n xs | k<n       = xs ++ replicate (n-k) ' '              | otherwise = xs@@ -101,7 +108,9 @@  ppAttr f a = text (getName f++"."++getName a) ppAttrUse f a = "@" >|< ppAttr f a+{-# LINE 112 "../src-derived/PrintErrorMessages.hs" #-} +{-# LINE 520 "PrintErrorMessages.ag" #-}  infixr 5 +#+ (+#+) :: String -> String -> String@@ -160,6 +169,7 @@  ppInterface inter = wfill ["interface:", show inter] +{-# LINE 173 "../src-derived/PrintErrorMessages.hs" #-} -- Error ------------------------------------------------------- {-    visit 0:@@ -424,6 +434,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 303, column 21)                        _lhsOpp =+                           {-# LINE 303 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Nontrivial field ",getName var_, "is used as local at constructor"                                              , getName con_ , "of nonterminal",getName nt_, "."                                              ]@@ -436,12 +447,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 451 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            ChildAsLocal nt_ con_ var_+                           {-# LINE 456 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 461 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_CustomError :: Bool ->                          Pos ->@@ -454,16 +470,22 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 345, column 21)                        _lhsOpp =+                           {-# LINE 345 "PrintErrorMessages.ag" #-}                            let pat   =  text "unknown"                                help = wfill ["not available."]                                act  = wfill ["unknown"]                            in ppError (isError _lhsIoptions _me) pos_ mesg_ pat help act False+                           {-# LINE 479 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            CustomError isWarning_ pos_ mesg_+                           {-# LINE 484 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 489 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_CyclicSet :: Identifier ->                        T_Error @@ -474,6 +496,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 336, column 21)                        _lhsOpp =+                           {-# LINE 336 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Cyclic definition for nonterminal set", getName name_]                                pat   = "SET" >#< getName name_ >#< "=" >#< "..." >#< getName name_ >#< "..."                                help =  wfill ["The defintion for a nonterminal set named" , getName name_@@ -482,12 +505,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 509 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            CyclicSet name_+                           {-# LINE 514 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 519 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DirectCirc :: NontermIdent ->                         Bool ->@@ -500,6 +528,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 374, column 21)                        _lhsOpp =+                           {-# LINE 374 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["In nonterminal", getName nt_, "synthesized and inherited attributes are mutually dependent" ]                                        >-< vlist (map showEdge cyclic_)                                pat   = text ""@@ -507,12 +536,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 540 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DirectCirc nt_ o_visit_ cyclic_+                           {-# LINE 545 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 550 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DupAlt :: NontermIdent ->                     ConstructorIdent ->@@ -525,6 +559,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 76, column 21)                        _lhsOpp =+                           {-# LINE 76 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Repeated definition for alternative", getName con_                                              ,"of nonterminal", getName nt_, "."                                              ] >-<@@ -543,12 +578,17 @@                                             ,"is considered valid. All other alternatives have been discarded."                                             ]                            in ppError (isError _lhsIoptions _me) (getPos con_) mesg pat help act _lhsIverbose+                           {-# LINE 582 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DupAlt nt_ con_ occ1_+                           {-# LINE 587 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 592 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DupChild :: NontermIdent ->                       ConstructorIdent ->@@ -562,6 +602,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 169, column 21)                        _lhsOpp =+                           {-# LINE 169 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Repeated declaration for field", getName name_, "of alternative"                                              ,getName con_, "of nonterminal", getName nt_, "."                                              ] >-<@@ -579,12 +620,17 @@                                             ,"All others have been discarded."                                             ]                            in ppError (isError _lhsIoptions _me) (getPos name_) mesg pat help act _lhsIverbose+                           {-# LINE 624 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DupChild nt_ con_ name_ occ1_+                           {-# LINE 629 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 634 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DupInhAttr :: NontermIdent ->                         Identifier ->@@ -597,6 +643,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 131, column 21)                        _lhsOpp =+                           {-# LINE 131 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Repeated declaration of inherited attribute", getName attr_                                              , "of nonterminal", getName nt_, "."                                              ] >-<@@ -613,12 +660,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 664 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DupInhAttr nt_ attr_ occ1_+                           {-# LINE 669 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 674 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DupRule :: NontermIdent ->                      ConstructorIdent ->@@ -633,6 +685,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 189, column 21)                        _lhsOpp =+                           {-# LINE 189 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["At constructor",getName con_, "of nonterminal", getName nt_, "there are two or more rules for"                                              ,showAttrDef field_ attr_,"."                                              ]  >-<@@ -648,12 +701,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 705 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DupRule nt_ con_ field_ attr_ occ1_+                           {-# LINE 710 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 715 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DupSet :: NontermIdent ->                     NontermIdent ->@@ -665,6 +723,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 115, column 21)                        _lhsOpp =+                           {-# LINE 115 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Definition of nonterminal set", getName name_, "clashes with another"                                              ,"set, a type synonym or a data definition."                                              ] >-<@@ -680,12 +739,17 @@                                act  = wfill [ "The clashing nonterminal set will be ignored."                                             ]                            in ppError (isError _lhsIoptions _me)  (getPos name_) mesg pat help act _lhsIverbose+                           {-# LINE 743 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DupSet name_ occ1_+                           {-# LINE 748 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 753 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DupSig :: NontermIdent ->                     ConstructorIdent ->@@ -698,6 +762,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 207, column 21)                        _lhsOpp =+                           {-# LINE 207 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["At constructor",getName con_, "of nonterminal", getName nt_, "there are two or more typesignatures for"                                              ,showAttrDef _LOC attr_,"."                                              ]  >-<@@ -712,12 +777,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 781 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DupSig nt_ con_ attr_+                           {-# LINE 786 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 791 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DupSynAttr :: NontermIdent ->                         Identifier ->@@ -730,6 +800,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 150, column 21)                        _lhsOpp =+                           {-# LINE 150 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Repeated declaration of synthesized attribute", getName attr_                                              , "of nonterminal", getName nt_, "."                                              ] >-<@@ -746,12 +817,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 821 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DupSynAttr nt_ attr_ occ1_+                           {-# LINE 826 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 831 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DupSynonym :: NontermIdent ->                         NontermIdent ->@@ -763,6 +839,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 98, column 21)                        _lhsOpp =+                           {-# LINE 98 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Definition of type synonym", getName nt_, "clashes with another"                                              ,"type synonym."                                              ] >-<@@ -779,12 +856,17 @@                                act  = wfill [ "The clashing type synonym will be ignored."                                             ]                            in ppError (isError _lhsIoptions _me)  (getPos nt_) mesg pat help act _lhsIverbose+                           {-# LINE 860 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DupSynonym nt_ occ1_+                           {-# LINE 865 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 870 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_DupUnique :: NontermIdent ->                        ConstructorIdent ->@@ -797,6 +879,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 435, column 21)                        _lhsOpp =+                           {-# LINE 435 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["At constructor",getName con_, "of nonterminal", getName nt_, "there are two or more unique-attribute signatures for"                                              ,showAttrDef _LOC attr_,"."                                              ]  >-<@@ -811,12 +894,17 @@                                                      ]                                act  = wfill ["Unpredicatable sharing of unique numbers may occur."]                            in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose+                           {-# LINE 898 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            DupUnique nt_ con_ attr_+                           {-# LINE 903 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 908 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_InducedCirc :: NontermIdent ->                          CInterface ->@@ -829,6 +917,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 382, column 21)                        _lhsOpp =+                           {-# LINE 382 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["After scheduling, in nonterminal", getName nt_, "synthesized and inherited attributes have an INDUCED mutual dependency" ]                                        >-< vlist (map showEdge cyclic_)                                pat   = text ""@@ -837,12 +926,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 930 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            InducedCirc nt_ cinter_ cyclic_+                           {-# LINE 935 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 940 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_InstCirc :: NontermIdent ->                       ConstructorIdent ->@@ -857,6 +951,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 362, column 21)                        _lhsOpp =+                           {-# LINE 362 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Circular dependency for inst attribute", getName attr_                                              , "of alternative", getName con_, "of nonterminal", getName nt_]                                pat   = "SEM" >#< getName nt_@@ -868,12 +963,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 967 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            InstCirc nt_ con_ attr_ o_visit_ path_+                           {-# LINE 972 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 977 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_LocalCirc :: NontermIdent ->                        ConstructorIdent ->@@ -888,6 +988,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 350, column 21)                        _lhsOpp =+                           {-# LINE 350 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Circular dependency for local attribute", getName attr_                                              , "of alternative", getName con_, "of nonterminal", getName nt_]                                pat   = "SEM" >#< getName nt_@@ -899,12 +1000,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 1004 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            LocalCirc nt_ con_ attr_ o_visit_ path_+                           {-# LINE 1009 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1014 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_MissingInstSig :: NontermIdent ->                             ConstructorIdent ->@@ -917,6 +1023,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 405, column 21)                        _lhsOpp =+                           {-# LINE 405 "PrintErrorMessages.ag" #-}                            let mesg = wfill ["Type signature needed, but not found for", showAttrDef _INST attr_ , "in alternative"                                              , getName con_ , "of nonterminal",getName nt_ ,"."                                              ]>-<@@ -930,12 +1037,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 1041 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            MissingInstSig nt_ con_ attr_+                           {-# LINE 1046 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1051 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_MissingRule :: NontermIdent ->                          ConstructorIdent ->@@ -949,6 +1061,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 261, column 21)                        _lhsOpp =+                           {-# LINE 261 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Missing rule for", showAttrDef field_ attr_ , "in alternative"                                              , getName con_ , "of nonterminal",getName nt_ ,"."                                              ]@@ -960,12 +1073,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 1077 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            MissingRule nt_ con_ field_ attr_+                           {-# LINE 1082 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1087 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_MissingSyn :: NontermIdent ->                         Identifier ->@@ -977,6 +1095,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 452, column 20)                        _lhsOpp =+                           {-# LINE 452 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Missing synthesized attribute"                                              , getName attr_                                              , "at nonterminal"@@ -991,12 +1110,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 1114 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            MissingSyn nt_ attr_+                           {-# LINE 1119 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1124 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_MissingTypeSig :: NontermIdent ->                             ConstructorIdent ->@@ -1009,6 +1133,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 391, column 21)                        _lhsOpp =+                           {-# LINE 391 "PrintErrorMessages.ag" #-}                            let mesg = wfill ["Type signature needed, but not found for", showAttrDef _LOC attr_ , "in alternative"                                              , getName con_ , "of nonterminal",getName nt_ ,"."                                              ]>-<@@ -1022,12 +1147,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 1151 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            MissingTypeSig nt_ con_ attr_+                           {-# LINE 1156 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1161 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_MissingUnique :: NontermIdent ->                            Identifier ->@@ -1039,6 +1169,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 419, column 21)                        _lhsOpp =+                           {-# LINE 419 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Missing unique counter (chained attribute)"                                              , getName attr_                                              , "at nonterminal"@@ -1053,12 +1184,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 1188 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            MissingUnique nt_ attr_+                           {-# LINE 1193 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1198 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_ParserError :: Pos ->                          String ->@@ -1071,17 +1207,23 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 70, column 21)                        _lhsOpp =+                           {-# LINE 70 "PrintErrorMessages.ag" #-}                            let mesg = text ("parser expecting " ++ problem_)                                pat  = text ""                                help = text ""                                act  = text action_                             in ppError (isError _lhsIoptions _me) pos_ mesg pat help act _lhsIverbose+                           {-# LINE 1217 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            ParserError pos_ problem_ action_+                           {-# LINE 1222 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1227 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_SuperfluousRule :: NontermIdent ->                              ConstructorIdent ->@@ -1095,6 +1237,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 274, column 21)                        _lhsOpp =+                           {-# LINE 274 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Rule for non-existing", showAttrDef field_ attr_ , "at alternative"                                              , getName con_ , "of nonterminal",getName nt_, "."                                              ]@@ -1106,12 +1249,17 @@                                              ]                                act  = wfill ["The rule has been ignored."]                            in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose+                           {-# LINE 1253 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            SuperfluousRule nt_ con_ field_ attr_+                           {-# LINE 1258 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1263 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_UndefAlt :: NontermIdent ->                       ConstructorIdent ->@@ -1123,6 +1271,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 234, column 21)                        _lhsOpp =+                           {-# LINE 234 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Constructor", getName con_, "of nonterminal" ,getName nt_, "is  not defined."                                              ]                                pat   =   "DATA" >#< getName nt_@@ -1133,12 +1282,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 1286 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            UndefAlt nt_ con_+                           {-# LINE 1291 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1296 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_UndefAttr :: NontermIdent ->                        ConstructorIdent ->@@ -1153,6 +1307,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 317, column 21)                        _lhsOpp =+                           {-# LINE 317 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Undefined"                                              , if isOut_                                                then showAttrDef field_ attr_@@ -1170,12 +1325,17 @@                                              ]                                act  = wfill ["The generated program will not run."]                            in ppError (isError _lhsIoptions _me) (getPos attr_) mesg pat help act _lhsIverbose+                           {-# LINE 1329 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            UndefAttr nt_ con_ field_ attr_ isOut_+                           {-# LINE 1334 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1339 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_UndefChild :: NontermIdent ->                         ConstructorIdent ->@@ -1188,6 +1348,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 246, column 21)                        _lhsOpp =+                           {-# LINE 246 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Constructor", getName con_, "of nonterminal" ,getName nt_                                              , "does not have a nontrivial field named", getName name_ , "."                                              ]@@ -1201,12 +1362,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 1366 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            UndefChild nt_ con_ name_+                           {-# LINE 1371 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1376 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_UndefLocal :: NontermIdent ->                         ConstructorIdent ->@@ -1219,6 +1385,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 288, column 21)                        _lhsOpp =+                           {-# LINE 288 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Undefined local variable or field",getName var_, "at constructor"                                              , getName con_ , "of nonterminal",getName nt_, "."                                              ]@@ -1232,12 +1399,17 @@                                              ]                                act  = wfill ["The generated program will not run."]                            in ppError (isError _lhsIoptions _me) (getPos var_) mesg pat help act _lhsIverbose+                           {-# LINE 1403 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            UndefLocal nt_ con_ var_+                           {-# LINE 1408 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1413 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) sem_Error_UndefNont :: NontermIdent ->                        T_Error @@ -1248,6 +1420,7 @@                        _lhsOme :: Error                        -- "PrintErrorMessages.ag"(line 224, column 21)                        _lhsOpp =+                           {-# LINE 224 "PrintErrorMessages.ag" #-}                            let mesg  = wfill ["Nonterminal", getName nt_, "is not defined."                                              ]                                pat   = "DATA" >#< getName nt_ >#< "..."@@ -1256,12 +1429,17 @@                                                      ]                                act  = wfill ["Everything regarding the unknown nonterminal has been ignored."]                            in ppError (isError _lhsIoptions _me) (getPos nt_) mesg pat help act _lhsIverbose+                           {-# LINE 1433 "PrintErrorMessages.hs" #-}                        -- self rule                        _me =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            UndefNont nt_+                           {-# LINE 1438 "PrintErrorMessages.hs" #-}                        -- self rule                        _lhsOme =+                           {-# LINE 58 "PrintErrorMessages.ag" #-}                            _me+                           {-# LINE 1443 "PrintErrorMessages.hs" #-}                    in  ( _lhsOme,_lhsOpp))) ) -- Errors ------------------------------------------------------ {-@@ -1311,19 +1489,29 @@                         _tlIpp :: PP_Doc                         -- "PrintErrorMessages.ag"(line 65, column 8)                         _verbose =+                            {-# LINE 65 "PrintErrorMessages.ag" #-}                             verbose _lhsIoptions+                            {-# LINE 1495 "PrintErrorMessages.hs" #-}                         -- use rule "PrintErrorMessages.ag"(line 61, column 49)                         _lhsOpp =+                            {-# LINE 61 "PrintErrorMessages.ag" #-}                             _hdIpp >-< _tlIpp+                            {-# LINE 1500 "PrintErrorMessages.hs" #-}                         -- copy rule (down)                         _hdOoptions =+                            {-# LINE 57 "PrintErrorMessages.ag" #-}                             _lhsIoptions+                            {-# LINE 1505 "PrintErrorMessages.hs" #-}                         -- copy rule (from local)                         _hdOverbose =+                            {-# LINE 57 "PrintErrorMessages.ag" #-}                             _verbose+                            {-# LINE 1510 "PrintErrorMessages.hs" #-}                         -- copy rule (down)                         _tlOoptions =+                            {-# LINE 61 "PrintErrorMessages.ag" #-}                             _lhsIoptions+                            {-# LINE 1515 "PrintErrorMessages.hs" #-}                         ( _hdIme,_hdIpp) =                             (hd_ _hdOoptions _hdOverbose )                         ( _tlIpp) =@@ -1335,8 +1523,12 @@                    (let _lhsOpp :: PP_Doc                         -- "PrintErrorMessages.ag"(line 65, column 8)                         _verbose =+                            {-# LINE 65 "PrintErrorMessages.ag" #-}                             verbose _lhsIoptions+                            {-# LINE 1529 "PrintErrorMessages.hs" #-}                         -- use rule "PrintErrorMessages.ag"(line 61, column 49)                         _lhsOpp =+                            {-# LINE 61 "PrintErrorMessages.ag" #-}                             text ""+                            {-# LINE 1534 "PrintErrorMessages.hs" #-}                     in  ( _lhsOpp))) )
src-derived/SemHsTokens.hs view
@@ -2,6 +2,7 @@  -- UUAGC 0.9.14 (SemHsTokens.ag) module SemHsTokens where+{-# LINE 4 "SemHsTokens.ag" #-}  import qualified Data.Sequence as Seq import Data.Sequence(Seq,empty,singleton,(><))@@ -11,13 +12,18 @@ import TokenDef import HsToken import ErrorMessages+{-# LINE 16 "../src-derived/SemHsTokens.hs" #-} +{-# LINE 2 "./HsToken.ag" #-}  import CommonTypes import UU.Scanner.Position(Pos)+{-# LINE 22 "../src-derived/SemHsTokens.hs" #-}+{-# LINE 57 "SemHsTokens.ag" #-}  isNTname allnts (Just (NT nt _)) = nt `elem` allnts isNTname allnts _                = False+{-# LINE 27 "../src-derived/SemHsTokens.hs" #-} -- HsToken ----------------------------------------------------- {-    visit 0:@@ -115,28 +121,40 @@                          _lhsOusedLocals :: ([Identifier])                          -- "SemHsTokens.ag"(line 74, column 15)                          _lhsOerrors =+                             {-# LINE 74 "SemHsTokens.ag" #-}                              if (field_,attr_) `elem` _lhsIattrs                                    then Seq.empty                                    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" #-}                          -- "SemHsTokens.ag"(line 88, column 13)                          _lhsOusedAttrs =+                             {-# LINE 88 "SemHsTokens.ag" #-}                              [(field_,attr_)]+                             {-# LINE 136 "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" #-}                          -- "SemHsTokens.ag"(line 118, column 8)                          _lhsOtok =+                             {-# LINE 118 "SemHsTokens.ag" #-}                              (pos_, _addTrace     $ attrname True field_ attr_)+                             {-# LINE 148 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 93, column 40)                          _lhsOusedFields =+                             {-# LINE 93 "SemHsTokens.ag" #-}                              Seq.empty+                             {-# LINE 153 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 84, column 40)                          _lhsOusedLocals =+                             {-# LINE 84 "SemHsTokens.ag" #-}                              []+                             {-# LINE 158 "SemHsTokens.hs" #-}                      in  ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_AGLocal :: Identifier ->                        Pos ->@@ -156,6 +174,7 @@                          _lhsOtok :: ((Pos,String))                          -- "SemHsTokens.ag"(line 64, column 19)                          __tup1 =+                             {-# LINE 64 "SemHsTokens.ag" #-}                              if var_ `elem` _lhsIfieldnames                              then if  isNTname _lhsIallnts (lookup var_ (map (\(n,t,_) -> (n,t)) _lhsIallfields))                                   then (Seq.singleton(ChildAsLocal _lhsInt _lhsIcon var_), (pos_,fieldname var_), []    )@@ -163,32 +182,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" #-}                          -- "SemHsTokens.ag"(line 64, column 19)                          (_errors,_,_) =+                             {-# LINE 64 "SemHsTokens.ag" #-}                              __tup1+                             {-# LINE 191 "SemHsTokens.hs" #-}                          -- "SemHsTokens.ag"(line 64, column 19)                          (_,_tok,_) =+                             {-# LINE 64 "SemHsTokens.ag" #-}                              __tup1+                             {-# LINE 196 "SemHsTokens.hs" #-}                          -- "SemHsTokens.ag"(line 64, column 19)                          (_,_,_usedLocals) =+                             {-# LINE 64 "SemHsTokens.ag" #-}                              __tup1+                             {-# LINE 201 "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" #-}                          -- use rule "SemHsTokens.ag"(line 43, column 37)                          _lhsOerrors =+                             {-# LINE 43 "SemHsTokens.ag" #-}                              _errors+                             {-# LINE 213 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 85, column 40)                          _lhsOusedAttrs =+                             {-# LINE 85 "SemHsTokens.ag" #-}                              []+                             {-# LINE 218 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 84, column 40)                          _lhsOusedLocals =+                             {-# LINE 84 "SemHsTokens.ag" #-}                              _usedLocals+                             {-# LINE 223 "SemHsTokens.hs" #-}                          -- copy rule (from local)                          _lhsOtok =+                             {-# LINE 113 "SemHsTokens.ag" #-}                              _tok+                             {-# LINE 228 "SemHsTokens.hs" #-}                      in  ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_CharToken :: String ->                          Pos ->@@ -207,22 +243,32 @@                          _lhsOusedLocals :: ([Identifier])                          -- "SemHsTokens.ag"(line 122, column 16)                          _lhsOtok =+                             {-# LINE 122 "SemHsTokens.ag" #-}                              (pos_, if null value_                                        then ""                                        else showCharShort (head value_)                              )+                             {-# LINE 252 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 43, column 37)                          _lhsOerrors =+                             {-# LINE 43 "SemHsTokens.ag" #-}                              Seq.empty+                             {-# LINE 257 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 85, column 40)                          _lhsOusedAttrs =+                             {-# LINE 85 "SemHsTokens.ag" #-}                              []+                             {-# LINE 262 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 93, column 40)                          _lhsOusedFields =+                             {-# LINE 93 "SemHsTokens.ag" #-}                              Seq.empty+                             {-# LINE 267 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 84, column 40)                          _lhsOusedLocals =+                             {-# LINE 84 "SemHsTokens.ag" #-}                              []+                             {-# LINE 272 "SemHsTokens.hs" #-}                      in  ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_Err :: String ->                    Pos ->@@ -241,20 +287,30 @@                          _lhsOusedLocals :: ([Identifier])                          -- "SemHsTokens.ag"(line 50, column 9)                          _lhsOerrors =+                             {-# LINE 50 "SemHsTokens.ag" #-}                              let m = text mesg_                              in Seq.singleton (CustomError False pos_ m)+                             {-# LINE 294 "SemHsTokens.hs" #-}                          -- "SemHsTokens.ag"(line 128, column 16)                          _lhsOtok =+                             {-# LINE 128 "SemHsTokens.ag" #-}                              (pos_, "")+                             {-# LINE 299 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 85, column 40)                          _lhsOusedAttrs =+                             {-# LINE 85 "SemHsTokens.ag" #-}                              []+                             {-# LINE 304 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 93, column 40)                          _lhsOusedFields =+                             {-# LINE 93 "SemHsTokens.ag" #-}                              Seq.empty+                             {-# LINE 309 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 84, column 40)                          _lhsOusedLocals =+                             {-# LINE 84 "SemHsTokens.ag" #-}                              []+                             {-# LINE 314 "SemHsTokens.hs" #-}                      in  ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_HsToken :: String ->                        Pos ->@@ -273,19 +329,29 @@                          _lhsOusedLocals :: ([Identifier])                          -- "SemHsTokens.ag"(line 120, column 14)                          _lhsOtok =+                             {-# LINE 120 "SemHsTokens.ag" #-}                              (pos_, value_)+                             {-# LINE 335 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 43, column 37)                          _lhsOerrors =+                             {-# LINE 43 "SemHsTokens.ag" #-}                              Seq.empty+                             {-# LINE 340 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 85, column 40)                          _lhsOusedAttrs =+                             {-# LINE 85 "SemHsTokens.ag" #-}                              []+                             {-# LINE 345 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 93, column 40)                          _lhsOusedFields =+                             {-# LINE 93 "SemHsTokens.ag" #-}                              Seq.empty+                             {-# LINE 350 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 84, column 40)                          _lhsOusedLocals =+                             {-# LINE 84 "SemHsTokens.ag" #-}                              []+                             {-# LINE 355 "SemHsTokens.hs" #-}                      in  ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) sem_HsToken_StrToken :: String ->                         Pos ->@@ -304,19 +370,29 @@                          _lhsOusedLocals :: ([Identifier])                          -- "SemHsTokens.ag"(line 127, column 16)                          _lhsOtok =+                             {-# LINE 127 "SemHsTokens.ag" #-}                              (pos_, showStrShort value_)+                             {-# LINE 376 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 43, column 37)                          _lhsOerrors =+                             {-# LINE 43 "SemHsTokens.ag" #-}                              Seq.empty+                             {-# LINE 381 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 85, column 40)                          _lhsOusedAttrs =+                             {-# LINE 85 "SemHsTokens.ag" #-}                              []+                             {-# LINE 386 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 93, column 40)                          _lhsOusedFields =+                             {-# LINE 93 "SemHsTokens.ag" #-}                              Seq.empty+                             {-# LINE 391 "SemHsTokens.hs" #-}                          -- use rule "SemHsTokens.ag"(line 84, column 40)                          _lhsOusedLocals =+                             {-# LINE 84 "SemHsTokens.ag" #-}                              []+                             {-# LINE 396 "SemHsTokens.hs" #-}                      in  ( _lhsOerrors,_lhsOtok,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) -- HsTokens ---------------------------------------------------- {-@@ -401,55 +477,89 @@                           _tlIusedLocals :: ([Identifier])                           -- "SemHsTokens.ag"(line 110, column 10)                           _lhsOtks =+                              {-# LINE 110 "SemHsTokens.ag" #-}                               _hdItok : _tlItks+                              {-# LINE 483 "SemHsTokens.hs" #-}                           -- use rule "SemHsTokens.ag"(line 43, column 37)                           _lhsOerrors =+                              {-# LINE 43 "SemHsTokens.ag" #-}                               _hdIerrors Seq.>< _tlIerrors+                              {-# LINE 488 "SemHsTokens.hs" #-}                           -- use rule "SemHsTokens.ag"(line 85, column 40)                           _lhsOusedAttrs =+                              {-# LINE 85 "SemHsTokens.ag" #-}                               _hdIusedAttrs ++ _tlIusedAttrs+                              {-# LINE 493 "SemHsTokens.hs" #-}                           -- use rule "SemHsTokens.ag"(line 93, column 40)                           _lhsOusedFields =+                              {-# LINE 93 "SemHsTokens.ag" #-}                               _hdIusedFields Seq.>< _tlIusedFields+                              {-# LINE 498 "SemHsTokens.hs" #-}                           -- use rule "SemHsTokens.ag"(line 84, column 40)                           _lhsOusedLocals =+                              {-# LINE 84 "SemHsTokens.ag" #-}                               _hdIusedLocals ++ _tlIusedLocals+                              {-# LINE 503 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _hdOallfields =+                              {-# LINE 30 "SemHsTokens.ag" #-}                               _lhsIallfields+                              {-# LINE 508 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _hdOallnts =+                              {-# LINE 31 "SemHsTokens.ag" #-}                               _lhsIallnts+                              {-# LINE 513 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _hdOattrs =+                              {-# LINE 32 "SemHsTokens.ag" #-}                               _lhsIattrs+                              {-# LINE 518 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _hdOcon =+                              {-# LINE 29 "SemHsTokens.ag" #-}                               _lhsIcon+                              {-# LINE 523 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _hdOfieldnames =+                              {-# LINE 36 "SemHsTokens.ag" #-}                               _lhsIfieldnames+                              {-# LINE 528 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _hdOnt =+                              {-# LINE 29 "SemHsTokens.ag" #-}                               _lhsInt+                              {-# LINE 533 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _tlOallfields =+                              {-# LINE 30 "SemHsTokens.ag" #-}                               _lhsIallfields+                              {-# LINE 538 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _tlOallnts =+                              {-# LINE 31 "SemHsTokens.ag" #-}                               _lhsIallnts+                              {-# LINE 543 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _tlOattrs =+                              {-# LINE 32 "SemHsTokens.ag" #-}                               _lhsIattrs+                              {-# LINE 548 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _tlOcon =+                              {-# LINE 29 "SemHsTokens.ag" #-}                               _lhsIcon+                              {-# LINE 553 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _tlOfieldnames =+                              {-# LINE 36 "SemHsTokens.ag" #-}                               _lhsIfieldnames+                              {-# LINE 558 "SemHsTokens.hs" #-}                           -- copy rule (down)                           _tlOnt =+                              {-# LINE 29 "SemHsTokens.ag" #-}                               _lhsInt+                              {-# LINE 563 "SemHsTokens.hs" #-}                           ( _hdIerrors,_hdItok,_hdIusedAttrs,_hdIusedFields,_hdIusedLocals) =                               (hd_ _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOfieldnames _hdOnt )                           ( _tlIerrors,_tlItks,_tlIusedAttrs,_tlIusedFields,_tlIusedLocals) =@@ -470,19 +580,29 @@                           _lhsOusedLocals :: ([Identifier])                           -- "SemHsTokens.ag"(line 111, column 10)                           _lhsOtks =+                              {-# LINE 111 "SemHsTokens.ag" #-}                               []+                              {-# LINE 586 "SemHsTokens.hs" #-}                           -- use rule "SemHsTokens.ag"(line 43, column 37)                           _lhsOerrors =+                              {-# LINE 43 "SemHsTokens.ag" #-}                               Seq.empty+                              {-# LINE 591 "SemHsTokens.hs" #-}                           -- use rule "SemHsTokens.ag"(line 85, column 40)                           _lhsOusedAttrs =+                              {-# LINE 85 "SemHsTokens.ag" #-}                               []+                              {-# LINE 596 "SemHsTokens.hs" #-}                           -- use rule "SemHsTokens.ag"(line 93, column 40)                           _lhsOusedFields =+                              {-# LINE 93 "SemHsTokens.ag" #-}                               Seq.empty+                              {-# LINE 601 "SemHsTokens.hs" #-}                           -- use rule "SemHsTokens.ag"(line 84, column 40)                           _lhsOusedLocals =+                              {-# LINE 84 "SemHsTokens.ag" #-}                               []+                              {-# LINE 606 "SemHsTokens.hs" #-}                       in  ( _lhsOerrors,_lhsOtks,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) ) -- HsTokensRoot ------------------------------------------------ {-@@ -550,37 +670,59 @@                               _tokensIusedLocals :: ([Identifier])                               -- "SemHsTokens.ag"(line 38, column 18)                               _tokensOfieldnames =+                                  {-# LINE 38 "SemHsTokens.ag" #-}                                   map (\(n,_,_) -> n) _lhsIallfields+                                  {-# LINE 676 "SemHsTokens.hs" #-}                               -- "SemHsTokens.ag"(line 100, column 18)                               _lhsOusedFields =+                                  {-# LINE 100 "SemHsTokens.ag" #-}                                   toList _tokensIusedFields+                                  {-# LINE 681 "SemHsTokens.hs" #-}                               -- "SemHsTokens.ag"(line 107, column 18)                               _lhsOtextLines =+                                  {-# LINE 107 "SemHsTokens.ag" #-}                                   showTokens _tokensItks+                                  {-# LINE 686 "SemHsTokens.hs" #-}                               -- use rule "SemHsTokens.ag"(line 18, column 18)                               _lhsOerrors =+                                  {-# LINE 18 "SemHsTokens.ag" #-}                                   _tokensIerrors+                                  {-# LINE 691 "SemHsTokens.hs" #-}                               -- copy rule (up)                               _lhsOusedAttrs =+                                  {-# LINE 20 "SemHsTokens.ag" #-}                                   _tokensIusedAttrs+                                  {-# LINE 696 "SemHsTokens.hs" #-}                               -- copy rule (up)                               _lhsOusedLocals =+                                  {-# LINE 19 "SemHsTokens.ag" #-}                                   _tokensIusedLocals+                                  {-# LINE 701 "SemHsTokens.hs" #-}                               -- copy rule (down)                               _tokensOallfields =+                                  {-# LINE 30 "SemHsTokens.ag" #-}                                   _lhsIallfields+                                  {-# LINE 706 "SemHsTokens.hs" #-}                               -- copy rule (down)                               _tokensOallnts =+                                  {-# LINE 31 "SemHsTokens.ag" #-}                                   _lhsIallnts+                                  {-# LINE 711 "SemHsTokens.hs" #-}                               -- copy rule (down)                               _tokensOattrs =+                                  {-# LINE 32 "SemHsTokens.ag" #-}                                   _lhsIattrs+                                  {-# LINE 716 "SemHsTokens.hs" #-}                               -- copy rule (down)                               _tokensOcon =+                                  {-# LINE 29 "SemHsTokens.ag" #-}                                   _lhsIcon+                                  {-# LINE 721 "SemHsTokens.hs" #-}                               -- copy rule (down)                               _tokensOnt =+                                  {-# LINE 29 "SemHsTokens.ag" #-}                                   _lhsInt+                                  {-# LINE 726 "SemHsTokens.hs" #-}                               ( _tokensIerrors,_tokensItks,_tokensIusedAttrs,_tokensIusedFields,_tokensIusedLocals) =                                   (tokens_ _tokensOallfields _tokensOallnts _tokensOattrs _tokensOcon _tokensOfieldnames _tokensOnt )                           in  ( _lhsOerrors,_lhsOtextLines,_lhsOusedAttrs,_lhsOusedFields,_lhsOusedLocals))) )
src-derived/TfmToVisage.hs view
@@ -2,11 +2,14 @@  -- UUAGC 0.9.14 (TfmToVisage.ag) module TfmToVisage where+{-# LINE 8 "TfmToVisage.ag" #-}  import AbstractSyntax import VisagePatterns import VisageSyntax+{-# LINE 11 "../src-derived/TfmToVisage.hs" #-} +{-# LINE 2 "./AbstractSyntax.ag" #-}  -- AbstractSyntax.ag imports import Data.Set(Set)@@ -14,15 +17,21 @@ import Patterns    (Pattern(..),Patterns) import Expression  (Expression(..)) import CommonTypes+{-# LINE 21 "../src-derived/TfmToVisage.hs" #-} +{-# LINE 2 "./Patterns.ag" #-}  -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 28 "../src-derived/TfmToVisage.hs" #-} +{-# LINE 2 "./Expression.ag" #-}  import UU.Scanner.Position(Pos) import HsToken+{-# LINE 34 "../src-derived/TfmToVisage.hs" #-}+{-# LINE 14 "TfmToVisage.ag" #-}  -- Maps a rule to a pair  -- Later, I expect to map to a list of rules, because we might need to unfold.@@ -77,6 +86,7 @@ underScore field vp@(VUnderscore pos) = vp                   -}+{-# LINE 90 "../src-derived/TfmToVisage.hs" #-} -- Child ------------------------------------------------------- {-    visit 0:@@ -120,7 +130,9 @@                   (let _lhsOvchild :: VisageChild                        -- "TfmToVisage.ag"(line 111, column 11)                        _lhsOvchild =+                           {-# LINE 111 "TfmToVisage.ag" #-}                            VChild name_ tp_ inh_ syn_ (getForField (getName name_) _lhsIrulemap)+                           {-# LINE 136 "TfmToVisage.hs" #-}                    in  ( _lhsOvchild))) ) -- Children ---------------------------------------------------- {-@@ -164,13 +176,19 @@                           _tlIvchildren :: ([VisageChild])                           -- "TfmToVisage.ag"(line 107, column 17)                           _lhsOvchildren =+                              {-# LINE 107 "TfmToVisage.ag" #-}                               _hdIvchild : _tlIvchildren+                              {-# LINE 182 "TfmToVisage.hs" #-}                           -- copy rule (down)                           _hdOrulemap =+                              {-# LINE 80 "TfmToVisage.ag" #-}                               _lhsIrulemap+                              {-# LINE 187 "TfmToVisage.hs" #-}                           -- copy rule (down)                           _tlOrulemap =+                              {-# LINE 81 "TfmToVisage.ag" #-}                               _lhsIrulemap+                              {-# LINE 192 "TfmToVisage.hs" #-}                           ( _hdIvchild) =                               (hd_ _hdOrulemap )                           ( _tlIvchildren) =@@ -182,7 +200,9 @@                      (let _lhsOvchildren :: ([VisageChild])                           -- "TfmToVisage.ag"(line 108, column 17)                           _lhsOvchildren =+                              {-# LINE 108 "TfmToVisage.ag" #-}                               []+                              {-# LINE 206 "TfmToVisage.hs" #-}                       in  ( _lhsOvchildren))) ) -- Expression -------------------------------------------------- {-@@ -219,10 +239,14 @@     (T_Expression (let _lhsOself :: Expression                        -- self rule                        _self =+                           {-# LINE 71 "TfmToVisage.ag" #-}                            Expression pos_ tks_+                           {-# LINE 245 "TfmToVisage.hs" #-}                        -- self rule                        _lhsOself =+                           {-# LINE 71 "TfmToVisage.ag" #-}                            _self+                           {-# LINE 250 "TfmToVisage.hs" #-}                    in  ( _lhsOself)) ) -- Grammar ----------------------------------------------------- {-@@ -242,12 +266,13 @@          child contextMap     : {ContextMap}          child uniqueMap      : {UniqueMap}          child augmentsMap    : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+         child aroundsMap     : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))} -} -- cata sem_Grammar :: Grammar  ->                T_Grammar -sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )  =-    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap )+sem_Grammar (Grammar _typeSyns _useMap _derivings _wrappers _nonts _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap )  =+    (sem_Grammar_Grammar _typeSyns _useMap _derivings _wrappers (sem_Nonterminals _nonts ) _pragmas _manualAttrOrderMap _paramMap _contextMap _uniqueMap _augmentsMap _aroundsMap ) -- semantic domain newtype T_Grammar  = T_Grammar (( VisageGrammar)) data Inh_Grammar  = Inh_Grammar {}@@ -270,13 +295,16 @@                        ContextMap ->                        UniqueMap ->                        (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+                       (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->                        T_Grammar -sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_  =+sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ (T_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ uniqueMap_ augmentsMap_ aroundsMap_  =     (T_Grammar (let _lhsOvisage :: VisageGrammar                     _nontsIvnonts :: ([VisageNonterminal])                     -- "TfmToVisage.ag"(line 86, column 17)                     _lhsOvisage =+                        {-# LINE 86 "TfmToVisage.ag" #-}                         VGrammar _nontsIvnonts+                        {-# LINE 308 "TfmToVisage.hs" #-}                     ( _nontsIvnonts) =                         (nonts_ )                 in  ( _lhsOvisage)) )@@ -320,7 +348,9 @@                         _prodsIvprods :: ([VisageProduction])                         -- "TfmToVisage.ag"(line 93, column 18)                         _lhsOvnont =+                            {-# LINE 93 "TfmToVisage.ag" #-}                             VNonterminal nt_ inh_ syn_ _prodsIvprods+                            {-# LINE 354 "TfmToVisage.hs" #-}                         ( _prodsIvprods) =                             (prods_ )                     in  ( _lhsOvnont)) )@@ -360,7 +390,9 @@                          _tlIvnonts :: ([VisageNonterminal])                          -- "TfmToVisage.ag"(line 89, column 17)                          _lhsOvnonts =+                             {-# LINE 89 "TfmToVisage.ag" #-}                              _hdIvnont : _tlIvnonts+                             {-# LINE 396 "TfmToVisage.hs" #-}                          ( _hdIvnont) =                              (hd_ )                          ( _tlIvnonts) =@@ -371,7 +403,9 @@     (T_Nonterminals (let _lhsOvnonts :: ([VisageNonterminal])                          -- "TfmToVisage.ag"(line 90, column 17)                          _lhsOvnonts =+                             {-# LINE 90 "TfmToVisage.ag" #-}                              []+                             {-# LINE 409 "TfmToVisage.hs" #-}                      in  ( _lhsOvnonts)) ) -- Pattern ----------------------------------------------------- {-@@ -457,24 +491,36 @@                     _partsIvpats :: ([VisagePattern])                     -- "TfmToVisage.ag"(line 128, column 17)                     _lhsOvpat =+                        {-# LINE 128 "TfmToVisage.ag" #-}                         if (isVar _self)                         then VVar field_ attr_                         else VAlias field_ attr_ _patIvpat+                        {-# LINE 499 "TfmToVisage.hs" #-}                     -- "TfmToVisage.ag"(line 137, column 17)                     _lhsOfieldattrs =+                        {-# LINE 137 "TfmToVisage.ag" #-}                         [(field_, attr_)]+                        {-# LINE 504 "TfmToVisage.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Alias field_ attr_ _patIcopy _partsIcopy+                        {-# LINE 509 "TfmToVisage.hs" #-}                     -- self rule                     _self =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         Alias field_ attr_ _patIself _partsIself+                        {-# LINE 514 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 519 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOself =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         _self+                        {-# LINE 524 "TfmToVisage.hs" #-}                     ( _patIcopy,_patIfieldattrs,_patIself,_patIvpat) =                         (pat_ )                     ( _partsIcopy,_partsIfieldattrs,_partsIself,_partsIvpats) =@@ -494,22 +540,34 @@                     _patsIvpats :: ([VisagePattern])                     -- "TfmToVisage.ag"(line 126, column 17)                     _lhsOvpat =+                        {-# LINE 126 "TfmToVisage.ag" #-}                         VConstr name_ _patsIvpats+                        {-# LINE 546 "TfmToVisage.hs" #-}                     -- use rule "TfmToVisage.ag"(line 134, column 43)                     _lhsOfieldattrs =+                        {-# LINE 134 "TfmToVisage.ag" #-}                         _patsIfieldattrs+                        {-# LINE 551 "TfmToVisage.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Constr name_ _patsIcopy+                        {-# LINE 556 "TfmToVisage.hs" #-}                     -- self rule                     _self =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         Constr name_ _patsIself+                        {-# LINE 561 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 566 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOself =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         _self+                        {-# LINE 571 "TfmToVisage.hs" #-}                     ( _patsIcopy,_patsIfieldattrs,_patsIself,_patsIvpats) =                         (pats_ )                 in  ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) )@@ -526,22 +584,34 @@                     _patIvpat :: VisagePattern                     -- use rule "TfmToVisage.ag"(line 134, column 43)                     _lhsOfieldattrs =+                        {-# LINE 134 "TfmToVisage.ag" #-}                         _patIfieldattrs+                        {-# LINE 590 "TfmToVisage.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Irrefutable _patIcopy+                        {-# LINE 595 "TfmToVisage.hs" #-}                     -- self rule                     _self =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         Irrefutable _patIself+                        {-# LINE 600 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 605 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOself =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         _self+                        {-# LINE 610 "TfmToVisage.hs" #-}                     -- copy rule (up)                     _lhsOvpat =+                        {-# LINE 82 "TfmToVisage.ag" #-}                         _patIvpat+                        {-# LINE 615 "TfmToVisage.hs" #-}                     ( _patIcopy,_patIfieldattrs,_patIself,_patIvpat) =                         (pat_ )                 in  ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) )@@ -559,22 +629,34 @@                     _patsIvpats :: ([VisagePattern])                     -- "TfmToVisage.ag"(line 127, column 17)                     _lhsOvpat =+                        {-# LINE 127 "TfmToVisage.ag" #-}                         VProduct pos_ _patsIvpats+                        {-# LINE 635 "TfmToVisage.hs" #-}                     -- use rule "TfmToVisage.ag"(line 134, column 43)                     _lhsOfieldattrs =+                        {-# LINE 134 "TfmToVisage.ag" #-}                         _patsIfieldattrs+                        {-# LINE 640 "TfmToVisage.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Product pos_ _patsIcopy+                        {-# LINE 645 "TfmToVisage.hs" #-}                     -- self rule                     _self =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         Product pos_ _patsIself+                        {-# LINE 650 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 655 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOself =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         _self+                        {-# LINE 660 "TfmToVisage.hs" #-}                     ( _patsIcopy,_patsIfieldattrs,_patsIself,_patsIvpats) =                         (pats_ )                 in  ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) )@@ -587,22 +669,34 @@                     _lhsOself :: Pattern                     -- "TfmToVisage.ag"(line 131, column 17)                     _lhsOvpat =+                        {-# LINE 131 "TfmToVisage.ag" #-}                         VUnderscore pos_+                        {-# LINE 675 "TfmToVisage.hs" #-}                     -- use rule "TfmToVisage.ag"(line 134, column 43)                     _lhsOfieldattrs =+                        {-# LINE 134 "TfmToVisage.ag" #-}                         []+                        {-# LINE 680 "TfmToVisage.hs" #-}                     -- self rule                     _copy =+                        {-# LINE 23 "./Patterns.ag" #-}                         Underscore pos_+                        {-# LINE 685 "TfmToVisage.hs" #-}                     -- self rule                     _self =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         Underscore pos_+                        {-# LINE 690 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}                         _copy+                        {-# LINE 695 "TfmToVisage.hs" #-}                     -- self rule                     _lhsOself =+                        {-# LINE 71 "TfmToVisage.ag" #-}                         _self+                        {-# LINE 700 "TfmToVisage.hs" #-}                 in  ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpat)) ) -- Patterns ---------------------------------------------------- {-@@ -658,22 +752,34 @@                      _tlIvpats :: ([VisagePattern])                      -- "TfmToVisage.ag"(line 122, column 17)                      _lhsOvpats =+                         {-# LINE 122 "TfmToVisage.ag" #-}                          _hdIvpat : _tlIvpats+                         {-# LINE 758 "TfmToVisage.hs" #-}                      -- use rule "TfmToVisage.ag"(line 134, column 43)                      _lhsOfieldattrs =+                         {-# LINE 134 "TfmToVisage.ag" #-}                          _hdIfieldattrs  ++  _tlIfieldattrs+                         {-# LINE 763 "TfmToVisage.hs" #-}                      -- self rule                      _copy =+                         {-# LINE 23 "./Patterns.ag" #-}                          (:) _hdIcopy _tlIcopy+                         {-# LINE 768 "TfmToVisage.hs" #-}                      -- self rule                      _self =+                         {-# LINE 71 "TfmToVisage.ag" #-}                          (:) _hdIself _tlIself+                         {-# LINE 773 "TfmToVisage.hs" #-}                      -- self rule                      _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}                          _copy+                         {-# LINE 778 "TfmToVisage.hs" #-}                      -- self rule                      _lhsOself =+                         {-# LINE 71 "TfmToVisage.ag" #-}                          _self+                         {-# LINE 783 "TfmToVisage.hs" #-}                      ( _hdIcopy,_hdIfieldattrs,_hdIself,_hdIvpat) =                          (hd_ )                      ( _tlIcopy,_tlIfieldattrs,_tlIself,_tlIvpats) =@@ -687,22 +793,34 @@                      _lhsOself :: Patterns                      -- "TfmToVisage.ag"(line 123, column 17)                      _lhsOvpats =+                         {-# LINE 123 "TfmToVisage.ag" #-}                          []+                         {-# LINE 799 "TfmToVisage.hs" #-}                      -- use rule "TfmToVisage.ag"(line 134, column 43)                      _lhsOfieldattrs =+                         {-# LINE 134 "TfmToVisage.ag" #-}                          []+                         {-# LINE 804 "TfmToVisage.hs" #-}                      -- self rule                      _copy =+                         {-# LINE 23 "./Patterns.ag" #-}                          []+                         {-# LINE 809 "TfmToVisage.hs" #-}                      -- self rule                      _self =+                         {-# LINE 71 "TfmToVisage.ag" #-}                          []+                         {-# LINE 814 "TfmToVisage.hs" #-}                      -- self rule                      _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}                          _copy+                         {-# LINE 819 "TfmToVisage.hs" #-}                      -- self rule                      _lhsOself =+                         {-# LINE 71 "TfmToVisage.ag" #-}                          _self+                         {-# LINE 824 "TfmToVisage.hs" #-}                  in  ( _lhsOcopy,_lhsOfieldattrs,_lhsOself,_lhsOvpats)) ) -- Production -------------------------------------------------- {-@@ -748,19 +866,29 @@                        _rulesIvrules :: ([VisageRule])                        -- "TfmToVisage.ag"(line 100, column 17)                        _lhsOvprod =+                           {-# LINE 100 "TfmToVisage.ag" #-}                            VProduction con_ _childrenIvchildren _lhsrules _locrules+                           {-# LINE 872 "TfmToVisage.hs" #-}                        -- "TfmToVisage.ag"(line 101, column 17)                        _splitVRules =+                           {-# LINE 101 "TfmToVisage.ag" #-}                            splitVRules _rulesIvrules+                           {-# LINE 877 "TfmToVisage.hs" #-}                        -- "TfmToVisage.ag"(line 102, column 17)                        _locrules =+                           {-# LINE 102 "TfmToVisage.ag" #-}                            getForField "loc" _splitVRules+                           {-# LINE 882 "TfmToVisage.hs" #-}                        -- "TfmToVisage.ag"(line 103, column 17)                        _lhsrules =+                           {-# LINE 103 "TfmToVisage.ag" #-}                            getForField "lhs" _splitVRules+                           {-# LINE 887 "TfmToVisage.hs" #-}                        -- "TfmToVisage.ag"(line 104, column 17)                        _childrenOrulemap =+                           {-# LINE 104 "TfmToVisage.ag" #-}                            _splitVRules+                           {-# LINE 892 "TfmToVisage.hs" #-}                        ( _childrenIvchildren) =                            (children_ _childrenOrulemap )                        ( _rulesIvrules) =@@ -802,7 +930,9 @@                         _tlIvprods :: ([VisageProduction])                         -- "TfmToVisage.ag"(line 96, column 17)                         _lhsOvprods =+                            {-# LINE 96 "TfmToVisage.ag" #-}                             _hdIvprod : _tlIvprods+                            {-# LINE 936 "TfmToVisage.hs" #-}                         ( _hdIvprod) =                             (hd_ )                         ( _tlIvprods) =@@ -813,7 +943,9 @@     (T_Productions (let _lhsOvprods :: ([VisageProduction])                         -- "TfmToVisage.ag"(line 97, column 17)                         _lhsOvprods =+                            {-# LINE 97 "TfmToVisage.ag" #-}                             []+                            {-# LINE 949 "TfmToVisage.hs" #-}                     in  ( _lhsOvprods)) ) -- Rule -------------------------------------------------------- {-@@ -857,7 +989,9 @@                  _rhsIself :: Expression                  -- "TfmToVisage.ag"(line 119, column 11)                  _lhsOvrule =+                     {-# LINE 119 "TfmToVisage.ag" #-}                      VRule _patternIfieldattrs undefined _patternIvpat _rhsIself owrt_+                     {-# LINE 995 "TfmToVisage.hs" #-}                  ( _patternIcopy,_patternIfieldattrs,_patternIself,_patternIvpat) =                      (pattern_ )                  ( _rhsIself) =@@ -899,7 +1033,9 @@                   _tlIvrules :: ([VisageRule])                   -- "TfmToVisage.ag"(line 114, column 17)                   _lhsOvrules =+                      {-# LINE 114 "TfmToVisage.ag" #-}                       _hdIvrule : _tlIvrules+                      {-# LINE 1039 "TfmToVisage.hs" #-}                   ( _hdIvrule) =                       (hd_ )                   ( _tlIvrules) =@@ -910,7 +1046,9 @@     (T_Rules (let _lhsOvrules :: ([VisageRule])                   -- "TfmToVisage.ag"(line 115, column 17)                   _lhsOvrules =+                      {-# LINE 115 "TfmToVisage.ag" #-}                       []+                      {-# LINE 1052 "TfmToVisage.hs" #-}               in  ( _lhsOvrules)) ) -- TypeSig ----------------------------------------------------- {-
src-derived/Transform.hs view
@@ -2,4188 +2,5652 @@  -- UUAGC 0.9.14 (Transform.ag) module Transform where--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---import UU.Scanner.Position (Pos)-import Patterns   (Pattern)-import Expression (Expression)-import CommonTypes----- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-type DefinedSets = Map Identifier (Set NontermIdent) --type FieldMap  = [(Identifier, Type)] --type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap) --type AttrName   = (Identifier,Identifier) --type RuleInfo   = ([AttrName]->Pattern, Expression, [AttrName], Bool, String) --type SigInfo    = (Identifier,Type) --type UniqueInfo = (Identifier,Identifier) --type AugmentInfo = (Identifier,Expression)----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----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 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]) ->-              NontermIdent -> ConstructorIdent -> [RuleInfo] -> RulesAndErrors-checkRules attributes fields allinsts allsigs 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))-        -        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 (pat,exp,as,owrt,str) ((r1,e1),m1) -          = let (e2,m2,u2,b2) = foldr (checkDefi owrt) (e1,m1,[],[]) as-            in  ( (Rule (pat u2) exp owrt str : 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)--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) ->-      checkDup inst insts errs $ -              maybe (insts, Seq.singleton (MissingInstSig nt con inst) >< errs)-                    (\info@(_, NT nm _) -> 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)-    -    checkDup name insts errs e-      = let fields = Map.findWithDefault [] con $ Map.findWithDefault Map.empty nt fieldMap-            walk [] = Nothing-            walk ((i,_): fs) | i == name = Just name-                             | otherwise = walk fs-        in case walk fields of-             Just occ -> (insts, Seq.singleton (DupChild nt con name occ) >< errs)-             Nothing  -> e--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--unionunionplusplus = Map.unionWith (Map.unionWith (++))---mkUniqueRules :: Options -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Attributes,Attributes) -> NontermIdent -> ConstructorIdent -> Map Identifier Identifier -> [Rule]-mkUniqueRules opts allFields allAttrDecls nt con usMap-  = map apply groups-  where-    fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allFields)--    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 pat rhs False "-- generated by the unique rule mechanism."-    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 "}"---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---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)---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)---mergeParams :: ParamMap -> ParamMap -> ParamMap-mergeParams = Map.unionWith (++)---mergeCtx :: ContextMap -> ContextMap -> ContextMap-mergeCtx-  = Map.unionWith nubconcat-  where nubconcat a b = nub (a ++ b)---mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)---merge x y = foldr f y (Map.toList x)- where f ~(k,v) m = Map.insertWith (Map.union) k v m---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)---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---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---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]))-                    -> Grammar--constructGrammar nts ntParams gram attrs uses derivings wrappers allrules tsigs allinsts tsyns pragmaMap orderMap contextMap uniqueMap augmentsMap =-   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-                             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)-                                       cldrn = map (child False) flds ++ map (child True) insts-                                       child isVirtual (nm, tp) =-                                          let (inh,syn) = case tp of-                                                 NT nt _ -> let nt' = maybe nt id (deforestedNt nt)-                                                            in Map.findWithDefault (Map.empty,Map.empty) nt' attrs-                                                 _       -> (Map.empty,Map.empty)-                                          in Child nm tp inh syn isVirtual-                                   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---mapUnionWithSetUnion = Map.unionWith Set.union-mapUnionWithPlusPlus = Map.unionWith (++)--- 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 augmentSigs : _-            local allRulesErrs : _-            local allSigsErrs : _-            local allInstsErrs : _-            local allUniquesErrs : _-            local allAugmentErrs : _-            local checkedRulesPre : _-            local checkedSigs : _-            local checkedInsts : _-            local checkedUniques : _-            local checkedAugments : _-            local checkedRules : _-            local errs1       : _-            local errs2       : _-            local errs3       : _-            local errs4       : _-            local errs5       : _-            local errs6       : _-            local errs7       : _-            local errs8       : _-            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-                    _elemsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                    _elemsIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                    _elemsIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                    _elemsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                    _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 =-                        constructGrammar _allNonterminals-                                         _elemsIparamsCollect-                                         _allFields-                                         _allAttrDecls-                                         _elemsIuseMap-                                         _elemsIderivings-                                         (if wrappers _lhsIoptions then _allNonterminals     else _elemsIwrappers)-                                         _checkedRules-                                         _checkedSigs-                                         _checkedInsts-                                         _elemsItypeSyns-                                         _elemsIsemPragmasCollect-                                         _elemsIattrOrderCollect-                                         _elemsIctxCollect-                                         _checkedUniques-                                         _checkedAugments-                    -- "Transform.ag"(line 240, column 10)-                    _allFields =-                        let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)-                        in  foldr f (Map.empty) _elemsIcollectedFields-                    -- "Transform.ag"(line 243, column 10)-                    _allConstrs =-                        let f (nt,con,_) = Map.insertWith (++) nt [con]-                        in  foldr f (Map.empty) _elemsIcollectedFields-                    -- "Transform.ag"(line 246, column 10)-                    _allRules =-                        let f (nt,con,r) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [r])-                        in  foldr f (Map.empty) _elemsIcollectedRules-                    -- "Transform.ag"(line 249, column 10)-                    _allSigs =-                        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 ]-                                                )-                    -- "Transform.ag"(line 255, column 10)-                    _allInsts =-                        let f (nt,con,is) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con is)-                        in  foldr f (Map.empty) _elemsIcollectedInsts-                    -- "Transform.ag"(line 258, column 10)-                    _allUniques =-                        let f (nt,con,us) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con us)-                        in foldr f (Map.empty) _elemsIcollectedUniques-                    -- "Transform.ag"(line 260, column 10)-                    _allAugments =-                        let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)-                        in foldr f Map.empty _elemsIcollectedAugments-                    -- "Transform.ag"(line 263, column 10)-                    _augmentSigs =-                        let gen mp = []-                        in Map.map (Map.map gen) _allAugments-                    -- "Transform.ag"(line 266, column 10)-                    _allRulesErrs =-                        Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs    )) _allRules-                    -- "Transform.ag"(line 267, column 10)-                    _allSigsErrs =-                        Map.mapWithKey (Map.mapWithKey . (checkSigs                                                 )) _allSigs-                    -- "Transform.ag"(line 268, column 10)-                    _allInstsErrs =-                        Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals     _allSigs     _allFields   )) _allInsts-                    -- "Transform.ag"(line 269, column 10)-                    _allUniquesErrs =-                        Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls                                )) _allUniques-                    -- "Transform.ag"(line 270, column 10)-                    _allAugmentErrs =-                        Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls                               )) _allAugments-                    -- "Transform.ag"(line 272, column 10)-                    _checkedRulesPre =-                        Map.map (Map.map fst) _allRulesErrs-                    -- "Transform.ag"(line 273, column 10)-                    _checkedSigs =-                        Map.map (Map.map fst) _allSigsErrs     `unionunionplusplus` _augmentSigs-                    -- "Transform.ag"(line 274, column 10)-                    _checkedInsts =-                        Map.map (Map.map fst) _allInstsErrs-                    -- "Transform.ag"(line 275, column 10)-                    _checkedUniques =-                        Map.map (Map.map fst) _allUniquesErrs-                    -- "Transform.ag"(line 276, column 10)-                    _checkedAugments =-                        Map.map (Map.map fst) _allAugmentErrs-                    -- "Transform.ag"(line 277, column 10)-                    _checkedRules =-                        Map.unionWith (Map.unionWith (++)) _checkedRulesPre     (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allFields     _allAttrDecls    )) _checkedUniques    )-                    -- "Transform.ag"(line 279, column 10)-                    _errs1 =-                        let f = checkForDuplicates (DupSynonym)-                        in  Seq.fromList . f . map fst $ _elemsItypeSyns-                    -- "Transform.ag"(line 282, column 10)-                    _errs2 =-                        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-                    -- "Transform.ag"(line 286, column 10)-                    _errs3 =-                        let f (nt,cons) = checkForDuplicates (DupAlt nt) cons-                        in   Seq.empty-                    -- "Transform.ag"(line 290, column 10)-                    _errs4 =-                        let  f m s = Map.fold ((><) . snd) s m-                        in Map.fold f Seq.empty _allRulesErrs-                    -- "Transform.ag"(line 293, column 10)-                    _errs5 =-                        let  f m s = Map.fold ((><) . snd) s m-                        in Map.fold f Seq.empty _allSigsErrs-                    -- "Transform.ag"(line 296, column 10)-                    _errs6 =-                        let  f m s = Map.fold ((><) . snd) s m-                        in Map.fold f Seq.empty _allInstsErrs-                    -- "Transform.ag"(line 299, column 10)-                    _errs7 =-                        let  f m s = Map.fold ((><) . snd) s m-                        in Map.fold f Seq.empty _allUniquesErrs-                    -- "Transform.ag"(line 302, column 10)-                    _errs8 =-                        let  f m s = Map.fold ((><) . snd) s m-                        in Map.fold f Seq.empty _allAugmentErrs-                    -- "Transform.ag"(line 305, column 10)-                    _lhsOerrors =-                        _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8-                    -- "Transform.ag"(line 465, column 10)-                    _allNonterminals =-                        _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames-                    -- "Transform.ag"(line 485, column 8)-                    _elemsOallConstructors =-                        _elemsIcollectedConstructorsMap-                    -- "Transform.ag"(line 558, column 8)-                    _elemsOdefSets =-                        Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals    ))-                    -- "Transform.ag"(line 559, column 8)-                    _elemsOdefinedSets =-                        Map.map fst _elemsIdefSets-                    -- "Transform.ag"(line 811, column 8)-                    _elemsOattrDecls =-                        Map.empty-                    -- "Transform.ag"(line 850, column 9)-                    _allAttrDecls =-                        if withSelf _lhsIoptions-                         then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals    )-                         else               _elemsIattrDecls-                    -- use rule "Transform.ag"(line 44, column 19)-                    _lhsOblocks =-                        _elemsIblocks-                    -- use rule "Transform.ag"(line 953, column 37)-                    _lhsOmoduleDecl =-                        _elemsImoduleDecl-                    -- use rule "Transform.ag"(line 640, column 34)-                    _lhsOpragmas =-                        _elemsIpragmas-                    -- copy rule (from local)-                    _elemsOallAttrDecls =-                        _allAttrDecls-                    -- copy rule (from local)-                    _elemsOallFields =-                        _allFields-                    -- copy rule (from local)-                    _elemsOallNonterminals =-                        _allNonterminals-                    ( _elemsIattrDecls,_elemsIattrOrderCollect,_elemsIblocks,_elemsIcollectedAugments,_elemsIcollectedConstructorsMap,_elemsIcollectedFields,_elemsIcollectedInsts,_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 225, column 10)-                     _lhsOcollectedFields =-                         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))-                              ]-                     -- use rule "Transform.ag"(line 90, column 62)-                     _lhsOcollectedConstructorNames =-                         _namesIcollectedConstructorNames-                     ( _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 90, column 62)-                      _lhsOcollectedConstructorNames =-                          _hdIcollectedConstructorNames `Set.union` _tlIcollectedConstructorNames-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          _hdIcollectedFields ++ _tlIcollectedFields-                      -- copy rule (down)-                      _hdOallConstructors =-                          _lhsIallConstructors-                      -- copy rule (down)-                      _hdOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _hdOnts =-                          _lhsInts-                      -- copy rule (down)-                      _tlOallConstructors =-                          _lhsIallConstructors-                      -- copy rule (down)-                      _tlOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _tlOnts =-                          _lhsInts-                      ( _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 90, column 62)-                      _lhsOcollectedConstructorNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          []-                  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 819, column 15)-                       __tup1 =-                           checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls-                       -- "Transform.ag"(line 819, column 15)-                       (_attrDecls,_) =-                           __tup1-                       -- "Transform.ag"(line 819, column 15)-                       (_,_errors) =-                           __tup1-                       -- "Transform.ag"(line 821, column 15)-                       __tup2 =-                           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)))-                       -- "Transform.ag"(line 821, column 15)-                       (_inherited,_,_) =-                           __tup2-                       -- "Transform.ag"(line 821, column 15)-                       (_,_synthesized,_) =-                           __tup2-                       -- "Transform.ag"(line 821, column 15)-                       (_,_,_useMap) =-                           __tup2-                       -- "Transform.ag"(line 829, column 11)-                       _lhsOuseMap =-                           Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))-                       -- use rule "Transform.ag"(line 42, column 19)-                       _lhsOerrors =-                           _errors-                       -- copy rule (from local)-                       _lhsOattrDecls =-                           _attrDecls-                   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 625, column 17)-                           _lhsOconstructors =-                               \ds -> ds-                           -- use rule "Transform.ag"(line 90, column 62)-                           _lhsOcollectedConstructorNames =-                               Set.empty-                           -- use rule "Transform.ag"(line 42, column 19)-                           _lhsOerrors =-                               Seq.empty-                       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 624, column 17)-                           _lhsOconstructors =-                               \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds-                           -- use rule "Transform.ag"(line 90, column 62)-                           _lhsOcollectedConstructorNames =-                               _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames-                           -- use rule "Transform.ag"(line 42, column 19)-                           _lhsOerrors =-                               _set1Ierrors Seq.>< _set2Ierrors-                           ( _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 473, column 11)-                           _lhsOcollectedConstructorNames =-                               Set.singleton name_-                           -- "Transform.ag"(line 622, column 17)-                           _lhsOconstructors =-                               \ds -> Set.singleton name_-                           -- use rule "Transform.ag"(line 42, column 19)-                           _lhsOerrors =-                               Seq.empty-                       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 623, column 17)-                           _lhsOconstructors =-                               \ds -> _set1Iconstructors ds `Set.union`      _set2Iconstructors ds-                           -- use rule "Transform.ag"(line 90, column 62)-                           _lhsOcollectedConstructorNames =-                               _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames-                           -- use rule "Transform.ag"(line 42, column 19)-                           _lhsOerrors =-                               _set1Ierrors Seq.>< _set2Ierrors-                           ( _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-         collectedAugments    : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]-         collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)-         collectedFields      : [(NontermIdent, ConstructorIdent, FieldMap)]-         collectedInsts       : [ (NontermIdent, ConstructorIdent, [Identifier]) ]-         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, [AugmentInfo]) ]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),(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),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]) ]),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,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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 _lhsOcollectedAugments _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                      _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _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 771, column 7)-                      _lhsOctxCollect =-                          if null ctx_-                          then Map.empty-                          else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]-                      -- "Transform.ag"(line 815, column 10)-                      _attrsOnts =-                          _namesInontSet-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 44, column 19)-                      _lhsOblocks =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          []-                      -- use rule "Transform.ag"(line 91, column 48)-                      _lhsOcollectedConstructorsMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          []-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          []-                      -- use rule "Transform.ag"(line 83, column 50)-                      _lhsOcollectedNames =-                          _namesIcollectedNames-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          []-                      -- use rule "Transform.ag"(line 82, column 50)-                      _lhsOcollectedSetNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          []-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          []-                      -- use rule "Transform.ag"(line 792, column 33)-                      _lhsOderivings =-                          Map.empty-                      -- use rule "Transform.ag"(line 42, column 19)-                      _lhsOerrors =-                          _namesIerrors Seq.>< _attrsIerrors-                      -- use rule "Transform.ag"(line 953, column 37)-                      _lhsOmoduleDecl =-                          mzero-                      -- use rule "Transform.ag"(line 744, column 37)-                      _lhsOparamsCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 640, column 34)-                      _lhsOpragmas =-                          id-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 500, column 32)-                      _lhsOtypeSyns =-                          []-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          _attrsIuseMap-                      -- use rule "Transform.ag"(line 631, column 32)-                      _lhsOwrappers =-                          Set.empty-                      -- copy rule (up)-                      _lhsOattrDecls =-                          _attrsIattrDecls-                      -- copy rule (chain)-                      _lhsOdefSets =-                          _lhsIdefSets-                      -- copy rule (down)-                      _namesOallFields =-                          _lhsIallFields-                      -- copy rule (down)-                      _namesOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _namesOdefinedSets =-                          _lhsIdefinedSets-                      -- copy rule (down)-                      _attrsOallFields =-                          _lhsIallFields-                      -- copy rule (down)-                      _attrsOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _attrsOattrDecls =-                          _lhsIattrDecls-                      ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =-                          (names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets )-                      ( _attrsIattrDecls,_attrsIerrors,_attrsIuseMap) =-                          (attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOnts )-                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _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 163, column 10)-                      _altsOnts =-                          _namesInontSet-                      -- "Transform.ag"(line 479, column 11)-                      _lhsOcollectedConstructorsMap =-                          Map.fromList-                          [ (n, _altsIcollectedConstructorNames)-                          | n <- Set.toList _namesInontSet-                          ]-                      -- "Transform.ag"(line 748, column 7)-                      _lhsOparamsCollect =-                          if null params_-                          then Map.empty-                          else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]-                      -- "Transform.ag"(line 771, column 7)-                      _lhsOctxCollect =-                          if null ctx_-                          then Map.empty-                          else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]-                      -- "Transform.ag"(line 814, column 10)-                      _attrsOnts =-                          _namesInontSet-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 44, column 19)-                      _lhsOblocks =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          []-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          _altsIcollectedFields-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          []-                      -- use rule "Transform.ag"(line 83, column 50)-                      _lhsOcollectedNames =-                          _namesIcollectedNames-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          []-                      -- use rule "Transform.ag"(line 82, column 50)-                      _lhsOcollectedSetNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          []-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          []-                      -- use rule "Transform.ag"(line 792, column 33)-                      _lhsOderivings =-                          Map.empty-                      -- use rule "Transform.ag"(line 42, column 19)-                      _lhsOerrors =-                          _namesIerrors Seq.>< _attrsIerrors-                      -- use rule "Transform.ag"(line 953, column 37)-                      _lhsOmoduleDecl =-                          mzero-                      -- use rule "Transform.ag"(line 640, column 34)-                      _lhsOpragmas =-                          id-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 500, column 32)-                      _lhsOtypeSyns =-                          []-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          _attrsIuseMap-                      -- use rule "Transform.ag"(line 631, column 32)-                      _lhsOwrappers =-                          Set.empty-                      -- copy rule (up)-                      _lhsOattrDecls =-                          _attrsIattrDecls-                      -- copy rule (chain)-                      _lhsOdefSets =-                          _lhsIdefSets-                      -- copy rule (down)-                      _namesOallFields =-                          _lhsIallFields-                      -- copy rule (down)-                      _namesOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _namesOdefinedSets =-                          _lhsIdefinedSets-                      -- copy rule (down)-                      _attrsOallFields =-                          _lhsIallFields-                      -- copy rule (down)-                      _attrsOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _attrsOattrDecls =-                          _lhsIattrDecls-                      -- copy rule (down)-                      _altsOallConstructors =-                          _lhsIallConstructors-                      -- copy rule (down)-                      _altsOallNonterminals =-                          _lhsIallNonterminals-                      ( _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,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                      _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _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 799, column 14)-                      _lhsOderivings =-                          Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 44, column 19)-                      _lhsOblocks =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          []-                      -- use rule "Transform.ag"(line 91, column 48)-                      _lhsOcollectedConstructorsMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          []-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          []-                      -- use rule "Transform.ag"(line 83, column 50)-                      _lhsOcollectedNames =-                          _setIcollectedNames-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          []-                      -- use rule "Transform.ag"(line 82, column 50)-                      _lhsOcollectedSetNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          []-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          []-                      -- use rule "Transform.ag"(line 767, column 34)-                      _lhsOctxCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 42, column 19)-                      _lhsOerrors =-                          _setIerrors-                      -- use rule "Transform.ag"(line 953, column 37)-                      _lhsOmoduleDecl =-                          mzero-                      -- use rule "Transform.ag"(line 744, column 37)-                      _lhsOparamsCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 640, column 34)-                      _lhsOpragmas =-                          id-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 500, column 32)-                      _lhsOtypeSyns =-                          []-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 631, column 32)-                      _lhsOwrappers =-                          Set.empty-                      -- copy rule (chain)-                      _lhsOattrDecls =-                          _lhsIattrDecls-                      -- copy rule (chain)-                      _lhsOdefSets =-                          _lhsIdefSets-                      -- copy rule (down)-                      _setOallFields =-                          _lhsIallFields-                      -- copy rule (down)-                      _setOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _setOdefinedSets =-                          _lhsIdefinedSets-                      ( _setIcollectedNames,_setIerrors,_setInontSet) =-                          (set_ _setOallFields _setOallNonterminals _setOdefinedSets )-                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                      _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _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 957, column 7)-                      _lhsOmoduleDecl =-                          Just (name_, exports_, imports_)-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 44, column 19)-                      _lhsOblocks =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          []-                      -- use rule "Transform.ag"(line 91, column 48)-                      _lhsOcollectedConstructorsMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          []-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          []-                      -- use rule "Transform.ag"(line 83, column 50)-                      _lhsOcollectedNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          []-                      -- use rule "Transform.ag"(line 82, column 50)-                      _lhsOcollectedSetNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          []-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          []-                      -- use rule "Transform.ag"(line 767, column 34)-                      _lhsOctxCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 792, column 33)-                      _lhsOderivings =-                          Map.empty-                      -- use rule "Transform.ag"(line 42, column 19)-                      _lhsOerrors =-                          Seq.empty-                      -- use rule "Transform.ag"(line 744, column 37)-                      _lhsOparamsCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 640, column 34)-                      _lhsOpragmas =-                          id-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 500, column 32)-                      _lhsOtypeSyns =-                          []-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 631, column 32)-                      _lhsOwrappers =-                          Set.empty-                      -- copy rule (chain)-                      _lhsOattrDecls =-                          _lhsIattrDecls-                      -- copy rule (chain)-                      _lhsOdefSets =-                          _lhsIdefSets-                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                      _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _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 643, column 13)-                      _lhsOpragmas =-                          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  }-                                         "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_-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 44, column 19)-                      _lhsOblocks =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          []-                      -- use rule "Transform.ag"(line 91, column 48)-                      _lhsOcollectedConstructorsMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          []-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          []-                      -- use rule "Transform.ag"(line 83, column 50)-                      _lhsOcollectedNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          []-                      -- use rule "Transform.ag"(line 82, column 50)-                      _lhsOcollectedSetNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          []-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          []-                      -- use rule "Transform.ag"(line 767, column 34)-                      _lhsOctxCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 792, column 33)-                      _lhsOderivings =-                          Map.empty-                      -- use rule "Transform.ag"(line 42, column 19)-                      _lhsOerrors =-                          Seq.empty-                      -- use rule "Transform.ag"(line 953, column 37)-                      _lhsOmoduleDecl =-                          mzero-                      -- use rule "Transform.ag"(line 744, column 37)-                      _lhsOparamsCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 500, column 32)-                      _lhsOtypeSyns =-                          []-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 631, column 32)-                      _lhsOwrappers =-                          Set.empty-                      -- copy rule (chain)-                      _lhsOattrDecls =-                          _lhsIattrDecls-                      -- copy rule (chain)-                      _lhsOdefSets =-                          _lhsIdefSets-                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                      _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _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-                      _altsIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _altsIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _altsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])-                      _altsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])-                      _altsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])-                      _altsIerrors :: (Seq Error)-                      _altsIsemPragmasCollect :: PragmaMap-                      -- "Transform.ag"(line 164, column 10)-                      _altsOnts =-                          _namesInontSet-                      -- "Transform.ag"(line 771, column 7)-                      _lhsOctxCollect =-                          if null ctx_-                          then Map.empty-                          else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]-                      -- "Transform.ag"(line 816, column 10)-                      _attrsOnts =-                          _namesInontSet-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          _altsIattrOrderCollect-                      -- use rule "Transform.ag"(line 44, column 19)-                      _lhsOblocks =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          _altsIcollectedAugments-                      -- use rule "Transform.ag"(line 91, column 48)-                      _lhsOcollectedConstructorsMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          []-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          _altsIcollectedInsts-                      -- use rule "Transform.ag"(line 83, column 50)-                      _lhsOcollectedNames =-                          _namesIcollectedNames-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          _altsIcollectedRules-                      -- use rule "Transform.ag"(line 82, column 50)-                      _lhsOcollectedSetNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          _altsIcollectedSigs-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          _altsIcollectedUniques-                      -- use rule "Transform.ag"(line 792, column 33)-                      _lhsOderivings =-                          Map.empty-                      -- use rule "Transform.ag"(line 42, column 19)-                      _lhsOerrors =-                          _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors-                      -- use rule "Transform.ag"(line 953, column 37)-                      _lhsOmoduleDecl =-                          mzero-                      -- use rule "Transform.ag"(line 744, column 37)-                      _lhsOparamsCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 640, column 34)-                      _lhsOpragmas =-                          id-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          _altsIsemPragmasCollect-                      -- use rule "Transform.ag"(line 500, column 32)-                      _lhsOtypeSyns =-                          []-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          _attrsIuseMap-                      -- use rule "Transform.ag"(line 631, column 32)-                      _lhsOwrappers =-                          Set.empty-                      -- copy rule (up)-                      _lhsOattrDecls =-                          _attrsIattrDecls-                      -- copy rule (chain)-                      _lhsOdefSets =-                          _lhsIdefSets-                      -- copy rule (down)-                      _namesOallFields =-                          _lhsIallFields-                      -- copy rule (down)-                      _namesOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _namesOdefinedSets =-                          _lhsIdefinedSets-                      -- copy rule (down)-                      _attrsOallFields =-                          _lhsIallFields-                      -- copy rule (down)-                      _attrsOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _attrsOattrDecls =-                          _lhsIattrDecls-                      -- copy rule (down)-                      _altsOallAttrDecls =-                          _lhsIallAttrDecls-                      -- copy rule (down)-                      _altsOallFields =-                          _lhsIallFields-                      ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =-                          (names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets )-                      ( _attrsIattrDecls,_attrsIerrors,_attrsIuseMap) =-                          (attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOnts )-                      ( _altsIattrOrderCollect,_altsIcollectedAugments,_altsIcollectedInsts,_altsIcollectedRules,_altsIcollectedSigs,_altsIcollectedUniques,_altsIerrors,_altsIsemPragmasCollect) =-                          (alts_ _altsOallAttrDecls _altsOallFields _altsOnts )-                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                      _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _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 456, column 10)-                      _lhsOcollectedSetNames =-                          Set.singleton name_-                      -- "Transform.ag"(line 563, column 13)-                      __tup3 =-                          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)-                      -- "Transform.ag"(line 563, column 13)-                      (_defSets2,_) =-                          __tup3-                      -- "Transform.ag"(line 563, column 13)-                      (_,_errs) =-                          __tup3-                      -- "Transform.ag"(line 573, column 9)-                      _lhsOdefSets =-                          _defSets2-                      -- "Transform.ag"(line 573, column 9)-                      _lhsOerrors =-                          _errs >< _setIerrors-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 44, column 19)-                      _lhsOblocks =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          []-                      -- use rule "Transform.ag"(line 91, column 48)-                      _lhsOcollectedConstructorsMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          []-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          []-                      -- use rule "Transform.ag"(line 83, column 50)-                      _lhsOcollectedNames =-                          _setIcollectedNames-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          []-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          []-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          []-                      -- use rule "Transform.ag"(line 767, column 34)-                      _lhsOctxCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 792, column 33)-                      _lhsOderivings =-                          Map.empty-                      -- use rule "Transform.ag"(line 953, column 37)-                      _lhsOmoduleDecl =-                          mzero-                      -- use rule "Transform.ag"(line 744, column 37)-                      _lhsOparamsCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 640, column 34)-                      _lhsOpragmas =-                          id-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 500, column 32)-                      _lhsOtypeSyns =-                          []-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 631, column 32)-                      _lhsOwrappers =-                          Set.empty-                      -- copy rule (chain)-                      _lhsOattrDecls =-                          _lhsIattrDecls-                      -- copy rule (down)-                      _setOallFields =-                          _lhsIallFields-                      -- copy rule (down)-                      _setOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _setOdefinedSets =-                          _lhsIdefinedSets-                      ( _setIcollectedNames,_setIerrors,_setInontSet) =-                          (set_ _setOallFields _setOallNonterminals _setOdefinedSets )-                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                      _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _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 173, column 10)-                      _blockInfo =-                          ( let nm = getName name_-                            in if nm == "imports"-                               then BlockImport-                               else if nm == "optpragmas"-                                    then BlockPragma-                                    else BlockOther-                          , mbNt_-                          )-                      -- "Transform.ag"(line 181, column 10)-                      _blockValue =-                          [(lines_, pos_)]-                      -- "Transform.ag"(line 182, column 10)-                      _lhsOblocks =-                          Map.singleton _blockInfo     _blockValue-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          []-                      -- use rule "Transform.ag"(line 91, column 48)-                      _lhsOcollectedConstructorsMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          []-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          []-                      -- use rule "Transform.ag"(line 83, column 50)-                      _lhsOcollectedNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          []-                      -- use rule "Transform.ag"(line 82, column 50)-                      _lhsOcollectedSetNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          []-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          []-                      -- use rule "Transform.ag"(line 767, column 34)-                      _lhsOctxCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 792, column 33)-                      _lhsOderivings =-                          Map.empty-                      -- use rule "Transform.ag"(line 42, column 19)-                      _lhsOerrors =-                          Seq.empty-                      -- use rule "Transform.ag"(line 953, column 37)-                      _lhsOmoduleDecl =-                          mzero-                      -- use rule "Transform.ag"(line 744, column 37)-                      _lhsOparamsCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 640, column 34)-                      _lhsOpragmas =-                          id-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 500, column 32)-                      _lhsOtypeSyns =-                          []-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 631, column 32)-                      _lhsOwrappers =-                          Set.empty-                      -- copy rule (chain)-                      _lhsOattrDecls =-                          _lhsIattrDecls-                      -- copy rule (chain)-                      _lhsOdefSets =-                          _lhsIdefSets-                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [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-                      _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 235, column 10)-                      _lhsOcollectedFields =-                          map (\(x,y)->(name_, x, y)) _expanded-                      -- "Transform.ag"(line 459, column 11)-                      _lhsOcollectedNames =-                          Set.singleton name_-                      -- "Transform.ag"(line 513, column 11)-                      _expanded =-                          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)]-                      -- "Transform.ag"(line 542, column 11)-                      _argType =-                          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)-                      -- "Transform.ag"(line 549, column 11)-                      _lhsOtypeSyns =-                          [(name_,_argType)]-                      -- "Transform.ag"(line 754, column 7)-                      _lhsOparamsCollect =-                          if null params_-                          then Map.empty-                          else Map.singleton name_ params_-                      -- "Transform.ag"(line 777, column 7)-                      _lhsOctxCollect =-                          if null ctx_-                          then Map.empty-                          else Map.singleton name_ ctx_-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 44, column 19)-                      _lhsOblocks =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          []-                      -- use rule "Transform.ag"(line 91, column 48)-                      _lhsOcollectedConstructorsMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          []-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          []-                      -- use rule "Transform.ag"(line 82, column 50)-                      _lhsOcollectedSetNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          []-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          []-                      -- use rule "Transform.ag"(line 792, column 33)-                      _lhsOderivings =-                          Map.empty-                      -- use rule "Transform.ag"(line 42, column 19)-                      _lhsOerrors =-                          Seq.empty-                      -- use rule "Transform.ag"(line 953, column 37)-                      _lhsOmoduleDecl =-                          mzero-                      -- use rule "Transform.ag"(line 640, column 34)-                      _lhsOpragmas =-                          id-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 631, column 32)-                      _lhsOwrappers =-                          Set.empty-                      -- copy rule (chain)-                      _lhsOattrDecls =-                          _lhsIattrDecls-                      -- copy rule (chain)-                      _lhsOdefSets =-                          _lhsIdefSets-                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                      _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                      _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                      _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                      _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                      _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 634, column 13)-                      _lhsOwrappers =-                          _setInontSet-                      -- use rule "Transform.ag"(line 712, column 55)-                      _lhsOattrOrderCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 44, column 19)-                      _lhsOblocks =-                          Map.empty-                      -- use rule "Transform.ag"(line 150, column 32)-                      _lhsOcollectedAugments =-                          []-                      -- use rule "Transform.ag"(line 91, column 48)-                      _lhsOcollectedConstructorsMap =-                          Map.empty-                      -- use rule "Transform.ag"(line 122, column 28)-                      _lhsOcollectedFields =-                          []-                      -- use rule "Transform.ag"(line 148, column 32)-                      _lhsOcollectedInsts =-                          []-                      -- use rule "Transform.ag"(line 83, column 50)-                      _lhsOcollectedNames =-                          _setIcollectedNames-                      -- use rule "Transform.ag"(line 146, column 32)-                      _lhsOcollectedRules =-                          []-                      -- use rule "Transform.ag"(line 82, column 50)-                      _lhsOcollectedSetNames =-                          Set.empty-                      -- use rule "Transform.ag"(line 147, column 32)-                      _lhsOcollectedSigs =-                          []-                      -- use rule "Transform.ag"(line 149, column 32)-                      _lhsOcollectedUniques =-                          []-                      -- use rule "Transform.ag"(line 767, column 34)-                      _lhsOctxCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 792, column 33)-                      _lhsOderivings =-                          Map.empty-                      -- use rule "Transform.ag"(line 42, column 19)-                      _lhsOerrors =-                          _setIerrors-                      -- use rule "Transform.ag"(line 953, column 37)-                      _lhsOmoduleDecl =-                          mzero-                      -- use rule "Transform.ag"(line 744, column 37)-                      _lhsOparamsCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 640, column 34)-                      _lhsOpragmas =-                          id-                      -- use rule "Transform.ag"(line 684, column 56)-                      _lhsOsemPragmasCollect =-                          Map.empty-                      -- use rule "Transform.ag"(line 500, column 32)-                      _lhsOtypeSyns =-                          []-                      -- use rule "Transform.ag"(line 134, column 15)-                      _lhsOuseMap =-                          Map.empty-                      -- copy rule (chain)-                      _lhsOattrDecls =-                          _lhsIattrDecls-                      -- copy rule (chain)-                      _lhsOdefSets =-                          _lhsIdefSets-                      -- copy rule (down)-                      _setOallFields =-                          _lhsIallFields-                      -- copy rule (down)-                      _setOallNonterminals =-                          _lhsIallNonterminals-                      -- copy rule (down)-                      _setOdefinedSets =-                          _lhsIdefinedSets-                      ( _setIcollectedNames,_setIerrors,_setInontSet) =-                          (set_ _setOallFields _setOallNonterminals _setOdefinedSets )-                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-         collectedAugments    : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]-         collectedConstructorsMap : Map NontermIdent (Set ConstructorIdent)-         collectedFields      : [(NontermIdent, ConstructorIdent, FieldMap)]-         collectedInsts       : [ (NontermIdent, ConstructorIdent, [Identifier]) ]-         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, [AugmentInfo]) ]),(Map NontermIdent (Set ConstructorIdent)),([(NontermIdent, ConstructorIdent, FieldMap)]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),(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),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]) ]),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,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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 _lhsOcollectedAugments _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _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-                       _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                       _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                       _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                       _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                       _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-                       _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                       _hdIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                       _hdIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                       _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                       _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-                       _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                       _tlIcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                       _tlIcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                       _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                       _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 712, column 55)-                       _lhsOattrOrderCollect =-                           _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect-                       -- use rule "Transform.ag"(line 44, column 19)-                       _lhsOblocks =-                           _hdIblocks `mapUnionWithPlusPlus` _tlIblocks-                       -- use rule "Transform.ag"(line 150, column 32)-                       _lhsOcollectedAugments =-                           _hdIcollectedAugments ++ _tlIcollectedAugments-                       -- use rule "Transform.ag"(line 91, column 48)-                       _lhsOcollectedConstructorsMap =-                           _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap-                       -- use rule "Transform.ag"(line 122, column 28)-                       _lhsOcollectedFields =-                           _hdIcollectedFields ++ _tlIcollectedFields-                       -- use rule "Transform.ag"(line 148, column 32)-                       _lhsOcollectedInsts =-                           _hdIcollectedInsts ++ _tlIcollectedInsts-                       -- use rule "Transform.ag"(line 83, column 50)-                       _lhsOcollectedNames =-                           _hdIcollectedNames `Set.union` _tlIcollectedNames-                       -- use rule "Transform.ag"(line 146, column 32)-                       _lhsOcollectedRules =-                           _hdIcollectedRules ++ _tlIcollectedRules-                       -- use rule "Transform.ag"(line 82, column 50)-                       _lhsOcollectedSetNames =-                           _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames-                       -- use rule "Transform.ag"(line 147, column 32)-                       _lhsOcollectedSigs =-                           _hdIcollectedSigs ++ _tlIcollectedSigs-                       -- use rule "Transform.ag"(line 149, column 32)-                       _lhsOcollectedUniques =-                           _hdIcollectedUniques ++ _tlIcollectedUniques-                       -- use rule "Transform.ag"(line 767, column 34)-                       _lhsOctxCollect =-                           _hdIctxCollect `mergeCtx` _tlIctxCollect-                       -- use rule "Transform.ag"(line 792, column 33)-                       _lhsOderivings =-                           _hdIderivings `mergeDerivings` _tlIderivings-                       -- use rule "Transform.ag"(line 42, column 19)-                       _lhsOerrors =-                           _hdIerrors Seq.>< _tlIerrors-                       -- use rule "Transform.ag"(line 953, column 37)-                       _lhsOmoduleDecl =-                           _hdImoduleDecl `mplus` _tlImoduleDecl-                       -- use rule "Transform.ag"(line 744, column 37)-                       _lhsOparamsCollect =-                           _hdIparamsCollect `mergeParams` _tlIparamsCollect-                       -- use rule "Transform.ag"(line 640, column 34)-                       _lhsOpragmas =-                           _hdIpragmas . _tlIpragmas-                       -- use rule "Transform.ag"(line 684, column 56)-                       _lhsOsemPragmasCollect =-                           _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect-                       -- use rule "Transform.ag"(line 500, column 32)-                       _lhsOtypeSyns =-                           _hdItypeSyns ++ _tlItypeSyns-                       -- use rule "Transform.ag"(line 134, column 15)-                       _lhsOuseMap =-                           _hdIuseMap `merge` _tlIuseMap-                       -- use rule "Transform.ag"(line 631, column 32)-                       _lhsOwrappers =-                           _hdIwrappers `Set.union` _tlIwrappers-                       -- copy rule (up)-                       _lhsOattrDecls =-                           _tlIattrDecls-                       -- copy rule (up)-                       _lhsOdefSets =-                           _tlIdefSets-                       -- copy rule (down)-                       _hdOallAttrDecls =-                           _lhsIallAttrDecls-                       -- copy rule (down)-                       _hdOallConstructors =-                           _lhsIallConstructors-                       -- copy rule (down)-                       _hdOallFields =-                           _lhsIallFields-                       -- copy rule (down)-                       _hdOallNonterminals =-                           _lhsIallNonterminals-                       -- copy rule (down)-                       _hdOattrDecls =-                           _lhsIattrDecls-                       -- copy rule (down)-                       _hdOdefSets =-                           _lhsIdefSets-                       -- copy rule (down)-                       _hdOdefinedSets =-                           _lhsIdefinedSets-                       -- copy rule (down)-                       _tlOallAttrDecls =-                           _lhsIallAttrDecls-                       -- copy rule (down)-                       _tlOallConstructors =-                           _lhsIallConstructors-                       -- copy rule (down)-                       _tlOallFields =-                           _lhsIallFields-                       -- copy rule (down)-                       _tlOallNonterminals =-                           _lhsIallNonterminals-                       -- copy rule (chain)-                       _tlOattrDecls =-                           _hdIattrDecls-                       -- copy rule (chain)-                       _tlOdefSets =-                           _hdIdefSets-                       -- copy rule (down)-                       _tlOdefinedSets =-                           _lhsIdefinedSets-                       ( _hdIattrDecls,_hdIattrOrderCollect,_hdIblocks,_hdIcollectedAugments,_hdIcollectedConstructorsMap,_hdIcollectedFields,_hdIcollectedInsts,_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,_tlIcollectedAugments,_tlIcollectedConstructorsMap,_tlIcollectedFields,_tlIcollectedInsts,_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,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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-                       _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                       _lhsOcollectedConstructorsMap :: (Map NontermIdent (Set ConstructorIdent))-                       _lhsOcollectedFields :: ([(NontermIdent, ConstructorIdent, FieldMap)])-                       _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                       _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 712, column 55)-                       _lhsOattrOrderCollect =-                           Map.empty-                       -- use rule "Transform.ag"(line 44, column 19)-                       _lhsOblocks =-                           Map.empty-                       -- use rule "Transform.ag"(line 150, column 32)-                       _lhsOcollectedAugments =-                           []-                       -- use rule "Transform.ag"(line 91, column 48)-                       _lhsOcollectedConstructorsMap =-                           Map.empty-                       -- use rule "Transform.ag"(line 122, column 28)-                       _lhsOcollectedFields =-                           []-                       -- use rule "Transform.ag"(line 148, column 32)-                       _lhsOcollectedInsts =-                           []-                       -- use rule "Transform.ag"(line 83, column 50)-                       _lhsOcollectedNames =-                           Set.empty-                       -- use rule "Transform.ag"(line 146, column 32)-                       _lhsOcollectedRules =-                           []-                       -- use rule "Transform.ag"(line 82, column 50)-                       _lhsOcollectedSetNames =-                           Set.empty-                       -- use rule "Transform.ag"(line 147, column 32)-                       _lhsOcollectedSigs =-                           []-                       -- use rule "Transform.ag"(line 149, column 32)-                       _lhsOcollectedUniques =-                           []-                       -- use rule "Transform.ag"(line 767, column 34)-                       _lhsOctxCollect =-                           Map.empty-                       -- use rule "Transform.ag"(line 792, column 33)-                       _lhsOderivings =-                           Map.empty-                       -- use rule "Transform.ag"(line 42, column 19)-                       _lhsOerrors =-                           Seq.empty-                       -- use rule "Transform.ag"(line 953, column 37)-                       _lhsOmoduleDecl =-                           mzero-                       -- use rule "Transform.ag"(line 744, column 37)-                       _lhsOparamsCollect =-                           Map.empty-                       -- use rule "Transform.ag"(line 640, column 34)-                       _lhsOpragmas =-                           id-                       -- use rule "Transform.ag"(line 684, column 56)-                       _lhsOsemPragmasCollect =-                           Map.empty-                       -- use rule "Transform.ag"(line 500, column 32)-                       _lhsOtypeSyns =-                           []-                       -- use rule "Transform.ag"(line 134, column 15)-                       _lhsOuseMap =-                           Map.empty-                       -- use rule "Transform.ag"(line 631, column 32)-                       _lhsOwrappers =-                           Set.empty-                       -- copy rule (chain)-                       _lhsOattrDecls =-                           _lhsIattrDecls-                       -- copy rule (chain)-                       _lhsOdefSets =-                           _lhsIdefSets-                   in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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 577, column 16)-                         _lhsOnontSet =-                             _lhsIallNonterminals-                         -- use rule "Transform.ag"(line 83, column 50)-                         _lhsOcollectedNames =-                             Set.empty-                         -- use rule "Transform.ag"(line 42, column 19)-                         _lhsOerrors =-                             Seq.empty-                     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 583, column 16)-                         _lhsOnontSet =-                             Set.difference    _set1InontSet _set2InontSet-                         -- use rule "Transform.ag"(line 83, column 50)-                         _lhsOcollectedNames =-                             _set1IcollectedNames `Set.union` _set2IcollectedNames-                         -- use rule "Transform.ag"(line 42, column 19)-                         _lhsOerrors =-                             _set1Ierrors Seq.>< _set2Ierrors-                         -- copy rule (down)-                         _set1OallFields =-                             _lhsIallFields-                         -- copy rule (down)-                         _set1OallNonterminals =-                             _lhsIallNonterminals-                         -- copy rule (down)-                         _set1OdefinedSets =-                             _lhsIdefinedSets-                         -- copy rule (down)-                         _set2OallFields =-                             _lhsIallFields-                         -- copy rule (down)-                         _set2OallNonterminals =-                             _lhsIallNonterminals-                         -- copy rule (down)-                         _set2OdefinedSets =-                             _lhsIdefinedSets-                         ( _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 582, column 16)-                         _lhsOnontSet =-                             Set.intersection  _set1InontSet _set2InontSet-                         -- use rule "Transform.ag"(line 83, column 50)-                         _lhsOcollectedNames =-                             _set1IcollectedNames `Set.union` _set2IcollectedNames-                         -- use rule "Transform.ag"(line 42, column 19)-                         _lhsOerrors =-                             _set1Ierrors Seq.>< _set2Ierrors-                         -- copy rule (down)-                         _set1OallFields =-                             _lhsIallFields-                         -- copy rule (down)-                         _set1OallNonterminals =-                             _lhsIallNonterminals-                         -- copy rule (down)-                         _set1OdefinedSets =-                             _lhsIdefinedSets-                         -- copy rule (down)-                         _set2OallFields =-                             _lhsIallFields-                         -- copy rule (down)-                         _set2OallNonterminals =-                             _lhsIallNonterminals-                         -- copy rule (down)-                         _set2OdefinedSets =-                             _lhsIdefinedSets-                         ( _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 462, column 14)-                         _lhsOcollectedNames =-                             Set.singleton name_-                         -- "Transform.ag"(line 578, column 20)-                         __tup4 =-                             case Map.lookup name_ _lhsIdefinedSets of-                                          Nothing  -> (Set.empty, Seq.singleton (UndefNont name_))-                                          Just set -> (set, Seq.empty)-                         -- "Transform.ag"(line 578, column 20)-                         (_nontSet,_) =-                             __tup4-                         -- "Transform.ag"(line 578, column 20)-                         (_,_errors) =-                             __tup4-                         -- use rule "Transform.ag"(line 42, column 19)-                         _lhsOerrors =-                             _errors-                         -- copy rule (from local)-                         _lhsOnontSet =-                             _nontSet-                     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 584, column 16)-                         _lhsOnontSet =-                             let table = flattenDatas _lhsIallFields-                             in path table from_ to_-                         -- "Transform.ag"(line 586, column 16)-                         _lhsOerrors =-                             let check name | Set.member name _lhsIallNonterminals-                                                        = Seq.empty-                                            | otherwise = Seq.singleton (UndefNont name)-                             in check from_ >< check to_-                         -- use rule "Transform.ag"(line 83, column 50)-                         _lhsOcollectedNames =-                             Set.empty-                     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 581, column 16)-                         _lhsOnontSet =-                             Set.union         _set1InontSet _set2InontSet-                         -- use rule "Transform.ag"(line 83, column 50)-                         _lhsOcollectedNames =-                             _set1IcollectedNames `Set.union` _set2IcollectedNames-                         -- use rule "Transform.ag"(line 42, column 19)-                         _lhsOerrors =-                             _set1Ierrors Seq.>< _set2Ierrors-                         -- copy rule (down)-                         _set1OallFields =-                             _lhsIallFields-                         -- copy rule (down)-                         _set1OallNonterminals =-                             _lhsIallNonterminals-                         -- copy rule (down)-                         _set1OdefinedSets =-                             _lhsIdefinedSets-                         -- copy rule (down)-                         _set2OallFields =-                             _lhsIallFields-                         -- copy rule (down)-                         _set2OallNonterminals =-                             _lhsIallNonterminals-                         -- copy rule (down)-                         _set2OdefinedSets =-                             _lhsIdefinedSets-                         ( _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 929, column 11)-                    _lhsOdefinedAttrs =-                        (field_, attr_) : _patIdefinedAttrs-                    -- "Transform.ag"(line 930, column 11)-                    _lhsOpatunder =-                        \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy-                    -- "Transform.ag"(line 931, column 11)-                    _lhsOdefinedInsts =-                        (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts-                    -- "Transform.ag"(line 946, column 16)-                    _lhsOstpos =-                        getPos field_-                    -- self rule-                    _copy =-                        Alias field_ attr_ _patIcopy _partsIcopy-                    -- self rule-                    _lhsOcopy =-                        _copy-                    ( _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 933, column 12)-                    _lhsOpatunder =-                        \us -> Constr name_ (_patsIpatunder us)-                    -- "Transform.ag"(line 944, column 16)-                    _lhsOstpos =-                        getPos name_-                    -- use rule "Transform.ag"(line 924, column 42)-                    _lhsOdefinedAttrs =-                        _patsIdefinedAttrs-                    -- use rule "Transform.ag"(line 923, column 55)-                    _lhsOdefinedInsts =-                        _patsIdefinedInsts-                    -- self rule-                    _copy =-                        Constr name_ _patsIcopy-                    -- self rule-                    _lhsOcopy =-                        _copy-                    ( _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 935, column 17)-                    _lhsOpatunder =-                        \us -> Irrefutable (_patIpatunder us)-                    -- use rule "Transform.ag"(line 924, column 42)-                    _lhsOdefinedAttrs =-                        _patIdefinedAttrs-                    -- use rule "Transform.ag"(line 923, column 55)-                    _lhsOdefinedInsts =-                        _patIdefinedInsts-                    -- self rule-                    _copy =-                        Irrefutable _patIcopy-                    -- self rule-                    _lhsOcopy =-                        _copy-                    -- copy rule (up)-                    _lhsOstpos =-                        _patIstpos-                    ( _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 934, column 13)-                    _lhsOpatunder =-                        \us -> Product pos_ (_patsIpatunder us)-                    -- "Transform.ag"(line 945, column 16)-                    _lhsOstpos =-                        pos_-                    -- use rule "Transform.ag"(line 924, column 42)-                    _lhsOdefinedAttrs =-                        _patsIdefinedAttrs-                    -- use rule "Transform.ag"(line 923, column 55)-                    _lhsOdefinedInsts =-                        _patsIdefinedInsts-                    -- self rule-                    _copy =-                        Product pos_ _patsIcopy-                    -- self rule-                    _lhsOcopy =-                        _copy-                    ( _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 932, column 16)-                    _lhsOpatunder =-                        \us -> _copy-                    -- "Transform.ag"(line 947, column 16)-                    _lhsOstpos =-                        pos_-                    -- use rule "Transform.ag"(line 924, column 42)-                    _lhsOdefinedAttrs =-                        []-                    -- use rule "Transform.ag"(line 923, column 55)-                    _lhsOdefinedInsts =-                        []-                    -- self rule-                    _copy =-                        Underscore pos_-                    -- self rule-                    _lhsOcopy =-                        _copy-                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 939, column 10)-                     _lhsOpatunder =-                         \us -> (_hdIpatunder us) : (_tlIpatunder us)-                     -- use rule "Transform.ag"(line 924, column 42)-                     _lhsOdefinedAttrs =-                         _hdIdefinedAttrs ++ _tlIdefinedAttrs-                     -- use rule "Transform.ag"(line 923, column 55)-                     _lhsOdefinedInsts =-                         _hdIdefinedInsts ++ _tlIdefinedInsts-                     -- self rule-                     _copy =-                         (:) _hdIcopy _tlIcopy-                     -- self rule-                     _lhsOcopy =-                         _copy-                     ( _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 938, column 9)-                     _lhsOpatunder =-                         \us ->  []-                     -- use rule "Transform.ag"(line 924, column 42)-                     _lhsOdefinedAttrs =-                         []-                     -- use rule "Transform.ag"(line 923, column 55)-                     _lhsOdefinedInsts =-                         []-                     -- self rule-                     _copy =-                         []-                     -- self rule-                     _lhsOcopy =-                         _copy-                 in  ( _lhsOcopy,_lhsOdefinedAttrs,_lhsOdefinedInsts,_lhsOpatunder)) )--- SemAlt -------------------------------------------------------{--   visit 0:-      inherited attributes:-         allAttrDecls         : Map NontermIdent (Attributes, Attributes)-         allFields            : DataTypes-         nts                  : Set NontermIdent-      synthesized attributes:-         attrOrderCollect     : AttrOrderMap-         collectedAugments    : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]-         collectedInsts       : [ (NontermIdent, ConstructorIdent, [Identifier]) ]-         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, [AugmentInfo]) ]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (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),collectedAugments_Syn_SemAlt :: !([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),collectedInsts_Syn_SemAlt :: !([ (NontermIdent, ConstructorIdent, [Identifier]) ]),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,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) =-             (sem _lhsIallAttrDecls _lhsIallFields _lhsInts )-     in  (Syn_SemAlt _lhsOattrOrderCollect _lhsOcollectedAugments _lhsOcollectedInsts _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]) ])-                        _constructorSetIcollectedConstructorNames :: (Set ConstructorIdent)-                        _constructorSetIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))-                        _constructorSetIerrors :: (Seq Error)-                        _rulesIaugmentInfos :: ([AugmentInfo])-                        _rulesIdefinedInsts :: ([Identifier])-                        _rulesIorderDepsCollect :: (Set Dependency)-                        _rulesIpragmaNamesCollect :: ([Identifier])-                        _rulesIruleInfos :: ([RuleInfo])-                        _rulesIsigInfos :: ([SigInfo])-                        _rulesIuniqueInfos :: ([UniqueInfo])-                        -- "Transform.ag"(line 688, column 7)-                        _pragmaNames =-                            Set.fromList _rulesIpragmaNamesCollect-                        -- "Transform.ag"(line 689, column 7)-                        _lhsOsemPragmasCollect =-                            foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames-                                                           | (nt, conset, _) <- _coninfo-                                                           , con <- Set.toList conset-                                                           ]-                        -- "Transform.ag"(line 717, column 7)-                        _attrOrders =-                            [ orderMapSingle nt con _rulesIorderDepsCollect-                            | (nt, conset, _) <- _coninfo-                            , con <- Set.toList conset-                            ]-                        -- "Transform.ag"(line 723, column 7)-                        _lhsOattrOrderCollect =-                            foldr orderMapUnion Map.empty _attrOrders-                        -- "Transform.ag"(line 867, column 12)-                        _coninfo =-                            [ (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-                            ]-                        -- "Transform.ag"(line 874, column 12)-                        _lhsOerrors =-                            Seq.fromList-                               [ UndefAlt nt con-                               | (nt, conset, conkeys) <- _coninfo-                               , con <- Set.toList (Set.difference conset conkeys)-                               ]-                        -- "Transform.ag"(line 879, column 12)-                        _lhsOcollectedRules =-                            [ (nt,con,r)-                            | (nt, conset, _) <- _coninfo-                            , con <- Set.toList conset-                            , r <- _rulesIruleInfos-                            ]-                        -- "Transform.ag"(line 885, column 12)-                        _lhsOcollectedSigs =-                            [ (nt,con,ts)-                            | (nt, conset, _) <- _coninfo-                            , con <- Set.toList conset-                            , ts <- _rulesIsigInfos-                            ]-                        -- "Transform.ag"(line 892, column 12)-                        _lhsOcollectedInsts =-                            [ (nt,con,_rulesIdefinedInsts)-                            | (nt, conset, _) <- _coninfo-                            , con <- Set.toList conset-                            ]-                        -- "Transform.ag"(line 898, column 12)-                        _lhsOcollectedUniques =-                            [ (nt,con,_rulesIuniqueInfos)-                            | (nt, conset, _) <- _coninfo-                            , con <- Set.toList conset-                            ]-                        -- "Transform.ag"(line 904, column 12)-                        _lhsOcollectedAugments =-                            [ (nt, con, _rulesIaugmentInfos)-                            | (nt, conset, _) <- _coninfo-                            , con <- Set.toList conset-                            ]-                        ( _constructorSetIcollectedConstructorNames,_constructorSetIconstructors,_constructorSetIerrors) =-                            (constructorSet_ )-                        ( _rulesIaugmentInfos,_rulesIdefinedInsts,_rulesIorderDepsCollect,_rulesIpragmaNamesCollect,_rulesIruleInfos,_rulesIsigInfos,_rulesIuniqueInfos) =-                            (rules_ )-                    in  ( _lhsOattrOrderCollect,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )--- SemAlts ------------------------------------------------------{--   visit 0:-      inherited attributes:-         allAttrDecls         : Map NontermIdent (Attributes, Attributes)-         allFields            : DataTypes-         nts                  : Set NontermIdent-      synthesized attributes:-         attrOrderCollect     : AttrOrderMap-         collectedAugments    : [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]-         collectedInsts       : [ (NontermIdent, ConstructorIdent, [Identifier]) ]-         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, [AugmentInfo]) ]),([ (NontermIdent, ConstructorIdent, [Identifier]) ]),([ (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),collectedAugments_Syn_SemAlts :: !([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]),collectedInsts_Syn_SemAlts :: !([ (NontermIdent, ConstructorIdent, [Identifier]) ]),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,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) =-             (sem _lhsIallAttrDecls _lhsIallFields _lhsInts )-     in  (Syn_SemAlts _lhsOattrOrderCollect _lhsOcollectedAugments _lhsOcollectedInsts _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-                         _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                         _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                         _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-                         _hdIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                         _hdIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                         _hdIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])-                         _hdIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])-                         _hdIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])-                         _hdIerrors :: (Seq Error)-                         _hdIsemPragmasCollect :: PragmaMap-                         _tlIattrOrderCollect :: AttrOrderMap-                         _tlIcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                         _tlIcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                         _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])-                         _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])-                         _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])-                         _tlIerrors :: (Seq Error)-                         _tlIsemPragmasCollect :: PragmaMap-                         -- use rule "Transform.ag"(line 712, column 55)-                         _lhsOattrOrderCollect =-                             _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect-                         -- use rule "Transform.ag"(line 150, column 32)-                         _lhsOcollectedAugments =-                             _hdIcollectedAugments ++ _tlIcollectedAugments-                         -- use rule "Transform.ag"(line 148, column 32)-                         _lhsOcollectedInsts =-                             _hdIcollectedInsts ++ _tlIcollectedInsts-                         -- use rule "Transform.ag"(line 146, column 32)-                         _lhsOcollectedRules =-                             _hdIcollectedRules ++ _tlIcollectedRules-                         -- use rule "Transform.ag"(line 147, column 32)-                         _lhsOcollectedSigs =-                             _hdIcollectedSigs ++ _tlIcollectedSigs-                         -- use rule "Transform.ag"(line 149, column 32)-                         _lhsOcollectedUniques =-                             _hdIcollectedUniques ++ _tlIcollectedUniques-                         -- use rule "Transform.ag"(line 42, column 19)-                         _lhsOerrors =-                             _hdIerrors Seq.>< _tlIerrors-                         -- use rule "Transform.ag"(line 684, column 56)-                         _lhsOsemPragmasCollect =-                             _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect-                         -- copy rule (down)-                         _hdOallAttrDecls =-                             _lhsIallAttrDecls-                         -- copy rule (down)-                         _hdOallFields =-                             _lhsIallFields-                         -- copy rule (down)-                         _hdOnts =-                             _lhsInts-                         -- copy rule (down)-                         _tlOallAttrDecls =-                             _lhsIallAttrDecls-                         -- copy rule (down)-                         _tlOallFields =-                             _lhsIallFields-                         -- copy rule (down)-                         _tlOnts =-                             _lhsInts-                         ( _hdIattrOrderCollect,_hdIcollectedAugments,_hdIcollectedInsts,_hdIcollectedRules,_hdIcollectedSigs,_hdIcollectedUniques,_hdIerrors,_hdIsemPragmasCollect) =-                             (hd_ _hdOallAttrDecls _hdOallFields _hdOnts )-                         ( _tlIattrOrderCollect,_tlIcollectedAugments,_tlIcollectedInsts,_tlIcollectedRules,_tlIcollectedSigs,_tlIcollectedUniques,_tlIerrors,_tlIsemPragmasCollect) =-                             (tl_ _tlOallAttrDecls _tlOallFields _tlOnts )-                     in  ( _lhsOattrOrderCollect,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )-sem_SemAlts_Nil :: T_SemAlts -sem_SemAlts_Nil  =-    (T_SemAlts (\ _lhsIallAttrDecls-                  _lhsIallFields-                  _lhsInts ->-                    (let _lhsOattrOrderCollect :: AttrOrderMap-                         _lhsOcollectedAugments :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ])-                         _lhsOcollectedInsts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ])-                         _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])-                         _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])-                         _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])-                         _lhsOerrors :: (Seq Error)-                         _lhsOsemPragmasCollect :: PragmaMap-                         -- use rule "Transform.ag"(line 712, column 55)-                         _lhsOattrOrderCollect =-                             Map.empty-                         -- use rule "Transform.ag"(line 150, column 32)-                         _lhsOcollectedAugments =-                             []-                         -- use rule "Transform.ag"(line 148, column 32)-                         _lhsOcollectedInsts =-                             []-                         -- use rule "Transform.ag"(line 146, column 32)-                         _lhsOcollectedRules =-                             []-                         -- use rule "Transform.ag"(line 147, column 32)-                         _lhsOcollectedSigs =-                             []-                         -- use rule "Transform.ag"(line 149, column 32)-                         _lhsOcollectedUniques =-                             []-                         -- use rule "Transform.ag"(line 42, column 19)-                         _lhsOerrors =-                             Seq.empty-                         -- use rule "Transform.ag"(line 684, column 56)-                         _lhsOsemPragmasCollect =-                             Map.empty-                     in  ( _lhsOattrOrderCollect,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )--- SemDef -------------------------------------------------------{--   visit 0:-      synthesized attributes:-         augmentInfos         : [AugmentInfo]-         definedInsts         : [Identifier]-         orderDepsCollect     : Set Dependency-         pragmaNamesCollect   : [Identifier]-         ruleInfos            : [RuleInfo]-         sigInfos             : [SigInfo]-         uniqueInfos          : [UniqueInfo]-   alternatives:-      alternative AttrOrderBefore:-         child before         : {[(Identifier,Identifier)]}-         child after          : {[(Identifier,Identifier)]}-         visit 0:-            local dependency  : _-      alternative AugmentDef:-         child ident          : {Identifier}-         child rhs            : {Expression}-      alternative Def:-         child pattern        : Pattern -         child rhs            : {Expression}-         child owrt           : {Bool}-      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 (AttrOrderBefore _before _after )  =-    (sem_SemDef_AttrOrderBefore _before _after )-sem_SemDef (AugmentDef _ident _rhs )  =-    (sem_SemDef_AugmentDef _ident _rhs )-sem_SemDef (Def _pattern _rhs _owrt )  =-    (sem_SemDef_Def (sem_Pattern _pattern ) _rhs _owrt )-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 (( ([AugmentInfo]),([Identifier]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))-data Inh_SemDef  = Inh_SemDef {}-data Syn_SemDef  = Syn_SemDef {augmentInfos_Syn_SemDef :: !([AugmentInfo]),definedInsts_Syn_SemDef :: !([Identifier]),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 ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) =-             (sem )-     in  (Syn_SemDef _lhsOaugmentInfos _lhsOdefinedInsts _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos ))-sem_SemDef_AttrOrderBefore :: ([(Identifier,Identifier)]) ->-                              ([(Identifier,Identifier)]) ->-                              T_SemDef -sem_SemDef_AttrOrderBefore before_ after_  =-    (T_SemDef (let _lhsOorderDepsCollect :: (Set Dependency)-                   _lhsOaugmentInfos :: ([AugmentInfo])-                   _lhsOdefinedInsts :: ([Identifier])-                   _lhsOpragmaNamesCollect :: ([Identifier])-                   _lhsOruleInfos :: ([RuleInfo])-                   _lhsOsigInfos :: ([SigInfo])-                   _lhsOuniqueInfos :: ([UniqueInfo])-                   -- "Transform.ag"(line 729, column 7)-                   _dependency =-                       [ Dependency b a | b <- before_, a <- after_ ]-                   -- "Transform.ag"(line 730, column 7)-                   _lhsOorderDepsCollect =-                       Set.fromList _dependency-                   -- use rule "Transform.ag"(line 862, column 40)-                   _lhsOaugmentInfos =-                       []-                   -- use rule "Transform.ag"(line 923, column 55)-                   _lhsOdefinedInsts =-                       []-                   -- use rule "Transform.ag"(line 694, column 46)-                   _lhsOpragmaNamesCollect =-                       []-                   -- use rule "Transform.ag"(line 859, column 40)-                   _lhsOruleInfos =-                       []-                   -- use rule "Transform.ag"(line 860, column 40)-                   _lhsOsigInfos =-                       []-                   -- use rule "Transform.ag"(line 861, column 40)-                   _lhsOuniqueInfos =-                       []-               in  ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_AugmentDef :: Identifier ->-                         Expression ->-                         T_SemDef -sem_SemDef_AugmentDef ident_ rhs_  =-    (T_SemDef (let _lhsOaugmentInfos :: ([AugmentInfo])-                   _lhsOdefinedInsts :: ([Identifier])-                   _lhsOorderDepsCollect :: (Set Dependency)-                   _lhsOpragmaNamesCollect :: ([Identifier])-                   _lhsOruleInfos :: ([RuleInfo])-                   _lhsOsigInfos :: ([SigInfo])-                   _lhsOuniqueInfos :: ([UniqueInfo])-                   -- "Transform.ag"(line 920, column 17)-                   _lhsOaugmentInfos =-                       [ (ident_, rhs_) ]-                   -- use rule "Transform.ag"(line 923, column 55)-                   _lhsOdefinedInsts =-                       []-                   -- use rule "Transform.ag"(line 725, column 44)-                   _lhsOorderDepsCollect =-                       Set.empty-                   -- use rule "Transform.ag"(line 694, column 46)-                   _lhsOpragmaNamesCollect =-                       []-                   -- use rule "Transform.ag"(line 859, column 40)-                   _lhsOruleInfos =-                       []-                   -- use rule "Transform.ag"(line 860, column 40)-                   _lhsOsigInfos =-                       []-                   -- use rule "Transform.ag"(line 861, column 40)-                   _lhsOuniqueInfos =-                       []-               in  ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_Def :: T_Pattern  ->-                  Expression ->-                  Bool ->-                  T_SemDef -sem_SemDef_Def (T_Pattern pattern_ ) rhs_ owrt_  =-    (T_SemDef (let _lhsOruleInfos :: ([RuleInfo])-                   _lhsOaugmentInfos :: ([AugmentInfo])-                   _lhsOdefinedInsts :: ([Identifier])-                   _lhsOorderDepsCollect :: (Set Dependency)-                   _lhsOpragmaNamesCollect :: ([Identifier])-                   _lhsOsigInfos :: ([SigInfo])-                   _lhsOuniqueInfos :: ([UniqueInfo])-                   _patternIcopy :: Pattern-                   _patternIdefinedAttrs :: ([AttrName])-                   _patternIdefinedInsts :: ([Identifier])-                   _patternIpatunder :: ([AttrName]->Pattern)-                   _patternIstpos :: Pos-                   -- "Transform.ag"(line 911, column 10)-                   _lhsOruleInfos =-                       [ (_patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos) ]-                   -- use rule "Transform.ag"(line 862, column 40)-                   _lhsOaugmentInfos =-                       []-                   -- use rule "Transform.ag"(line 923, column 55)-                   _lhsOdefinedInsts =-                       _patternIdefinedInsts-                   -- use rule "Transform.ag"(line 725, column 44)-                   _lhsOorderDepsCollect =-                       Set.empty-                   -- use rule "Transform.ag"(line 694, column 46)-                   _lhsOpragmaNamesCollect =-                       []-                   -- use rule "Transform.ag"(line 860, column 40)-                   _lhsOsigInfos =-                       []-                   -- use rule "Transform.ag"(line 861, column 40)-                   _lhsOuniqueInfos =-                       []-                   ( _patternIcopy,_patternIdefinedAttrs,_patternIdefinedInsts,_patternIpatunder,_patternIstpos) =-                       (pattern_ )-               in  ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_SemPragma :: ([NontermIdent]) ->-                        T_SemDef -sem_SemDef_SemPragma names_  =-    (T_SemDef (let _lhsOpragmaNamesCollect :: ([Identifier])-                   _lhsOaugmentInfos :: ([AugmentInfo])-                   _lhsOdefinedInsts :: ([Identifier])-                   _lhsOorderDepsCollect :: (Set Dependency)-                   _lhsOruleInfos :: ([RuleInfo])-                   _lhsOsigInfos :: ([SigInfo])-                   _lhsOuniqueInfos :: ([UniqueInfo])-                   -- "Transform.ag"(line 698, column 7)-                   _lhsOpragmaNamesCollect =-                       names_-                   -- use rule "Transform.ag"(line 862, column 40)-                   _lhsOaugmentInfos =-                       []-                   -- use rule "Transform.ag"(line 923, column 55)-                   _lhsOdefinedInsts =-                       []-                   -- use rule "Transform.ag"(line 725, column 44)-                   _lhsOorderDepsCollect =-                       Set.empty-                   -- use rule "Transform.ag"(line 859, column 40)-                   _lhsOruleInfos =-                       []-                   -- use rule "Transform.ag"(line 860, column 40)-                   _lhsOsigInfos =-                       []-                   -- use rule "Transform.ag"(line 861, column 40)-                   _lhsOuniqueInfos =-                       []-               in  ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_TypeDef :: Identifier ->-                      Type ->-                      T_SemDef -sem_SemDef_TypeDef ident_ tp_  =-    (T_SemDef (let _lhsOsigInfos :: ([SigInfo])-                   _lhsOaugmentInfos :: ([AugmentInfo])-                   _lhsOdefinedInsts :: ([Identifier])-                   _lhsOorderDepsCollect :: (Set Dependency)-                   _lhsOpragmaNamesCollect :: ([Identifier])-                   _lhsOruleInfos :: ([RuleInfo])-                   _lhsOuniqueInfos :: ([UniqueInfo])-                   -- "Transform.ag"(line 914, column 14)-                   _lhsOsigInfos =-                       [ (ident_, tp_) ]-                   -- use rule "Transform.ag"(line 862, column 40)-                   _lhsOaugmentInfos =-                       []-                   -- use rule "Transform.ag"(line 923, column 55)-                   _lhsOdefinedInsts =-                       []-                   -- use rule "Transform.ag"(line 725, column 44)-                   _lhsOorderDepsCollect =-                       Set.empty-                   -- use rule "Transform.ag"(line 694, column 46)-                   _lhsOpragmaNamesCollect =-                       []-                   -- use rule "Transform.ag"(line 859, column 40)-                   _lhsOruleInfos =-                       []-                   -- use rule "Transform.ag"(line 861, column 40)-                   _lhsOuniqueInfos =-                       []-               in  ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_UniqueDef :: Identifier ->-                        Identifier ->-                        T_SemDef -sem_SemDef_UniqueDef ident_ ref_  =-    (T_SemDef (let _lhsOuniqueInfos :: ([UniqueInfo])-                   _lhsOaugmentInfos :: ([AugmentInfo])-                   _lhsOdefinedInsts :: ([Identifier])-                   _lhsOorderDepsCollect :: (Set Dependency)-                   _lhsOpragmaNamesCollect :: ([Identifier])-                   _lhsOruleInfos :: ([RuleInfo])-                   _lhsOsigInfos :: ([SigInfo])-                   -- "Transform.ag"(line 917, column 16)-                   _lhsOuniqueInfos =-                       [ (ident_, ref_) ]-                   -- use rule "Transform.ag"(line 862, column 40)-                   _lhsOaugmentInfos =-                       []-                   -- use rule "Transform.ag"(line 923, column 55)-                   _lhsOdefinedInsts =-                       []-                   -- use rule "Transform.ag"(line 725, column 44)-                   _lhsOorderDepsCollect =-                       Set.empty-                   -- use rule "Transform.ag"(line 694, column 46)-                   _lhsOpragmaNamesCollect =-                       []-                   -- use rule "Transform.ag"(line 859, column 40)-                   _lhsOruleInfos =-                       []-                   -- use rule "Transform.ag"(line 860, column 40)-                   _lhsOsigInfos =-                       []-               in  ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )--- SemDefs ------------------------------------------------------{--   visit 0:-      synthesized attributes:-         augmentInfos         : [AugmentInfo]-         definedInsts         : [Identifier]-         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 (( ([AugmentInfo]),([Identifier]),(Set Dependency),([Identifier]),([RuleInfo]),([SigInfo]),([UniqueInfo])))-data Inh_SemDefs  = Inh_SemDefs {}-data Syn_SemDefs  = Syn_SemDefs {augmentInfos_Syn_SemDefs :: !([AugmentInfo]),definedInsts_Syn_SemDefs :: !([Identifier]),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 ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) =-             (sem )-     in  (Syn_SemDefs _lhsOaugmentInfos _lhsOdefinedInsts _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 _lhsOaugmentInfos :: ([AugmentInfo])-                    _lhsOdefinedInsts :: ([Identifier])-                    _lhsOorderDepsCollect :: (Set Dependency)-                    _lhsOpragmaNamesCollect :: ([Identifier])-                    _lhsOruleInfos :: ([RuleInfo])-                    _lhsOsigInfos :: ([SigInfo])-                    _lhsOuniqueInfos :: ([UniqueInfo])-                    _hdIaugmentInfos :: ([AugmentInfo])-                    _hdIdefinedInsts :: ([Identifier])-                    _hdIorderDepsCollect :: (Set Dependency)-                    _hdIpragmaNamesCollect :: ([Identifier])-                    _hdIruleInfos :: ([RuleInfo])-                    _hdIsigInfos :: ([SigInfo])-                    _hdIuniqueInfos :: ([UniqueInfo])-                    _tlIaugmentInfos :: ([AugmentInfo])-                    _tlIdefinedInsts :: ([Identifier])-                    _tlIorderDepsCollect :: (Set Dependency)-                    _tlIpragmaNamesCollect :: ([Identifier])-                    _tlIruleInfos :: ([RuleInfo])-                    _tlIsigInfos :: ([SigInfo])-                    _tlIuniqueInfos :: ([UniqueInfo])-                    -- use rule "Transform.ag"(line 862, column 40)-                    _lhsOaugmentInfos =-                        _hdIaugmentInfos ++ _tlIaugmentInfos-                    -- use rule "Transform.ag"(line 923, column 55)-                    _lhsOdefinedInsts =-                        _hdIdefinedInsts ++ _tlIdefinedInsts-                    -- use rule "Transform.ag"(line 725, column 44)-                    _lhsOorderDepsCollect =-                        _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect-                    -- use rule "Transform.ag"(line 694, column 46)-                    _lhsOpragmaNamesCollect =-                        _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect-                    -- use rule "Transform.ag"(line 859, column 40)-                    _lhsOruleInfos =-                        _hdIruleInfos ++ _tlIruleInfos-                    -- use rule "Transform.ag"(line 860, column 40)-                    _lhsOsigInfos =-                        _hdIsigInfos ++ _tlIsigInfos-                    -- use rule "Transform.ag"(line 861, column 40)-                    _lhsOuniqueInfos =-                        _hdIuniqueInfos ++ _tlIuniqueInfos-                    ( _hdIaugmentInfos,_hdIdefinedInsts,_hdIorderDepsCollect,_hdIpragmaNamesCollect,_hdIruleInfos,_hdIsigInfos,_hdIuniqueInfos) =-                        (hd_ )-                    ( _tlIaugmentInfos,_tlIdefinedInsts,_tlIorderDepsCollect,_tlIpragmaNamesCollect,_tlIruleInfos,_tlIsigInfos,_tlIuniqueInfos) =-                        (tl_ )-                in  ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDefs_Nil :: T_SemDefs -sem_SemDefs_Nil  =-    (T_SemDefs (let _lhsOaugmentInfos :: ([AugmentInfo])-                    _lhsOdefinedInsts :: ([Identifier])-                    _lhsOorderDepsCollect :: (Set Dependency)-                    _lhsOpragmaNamesCollect :: ([Identifier])-                    _lhsOruleInfos :: ([RuleInfo])-                    _lhsOsigInfos :: ([SigInfo])-                    _lhsOuniqueInfos :: ([UniqueInfo])-                    -- use rule "Transform.ag"(line 862, column 40)-                    _lhsOaugmentInfos =-                        []-                    -- use rule "Transform.ag"(line 923, column 55)-                    _lhsOdefinedInsts =-                        []-                    -- use rule "Transform.ag"(line 725, column 44)-                    _lhsOorderDepsCollect =-                        Set.empty-                    -- use rule "Transform.ag"(line 694, column 46)-                    _lhsOpragmaNamesCollect =-                        []-                    -- use rule "Transform.ag"(line 859, column 40)-                    _lhsOruleInfos =-                        []-                    -- use rule "Transform.ag"(line 860, column 40)-                    _lhsOsigInfos =-                        []-                    -- use rule "Transform.ag"(line 861, column 40)-                    _lhsOuniqueInfos =-                        []-                in  ( _lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+{-# 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 99 "Transform.ag" #-}+type DefinedSets = Map Identifier (Set NontermIdent) +{-# LINE 46 "../src-derived/Transform.hs" #-}++{-# LINE 119 "Transform.ag" #-}+type FieldMap  = [(Identifier, Type)] +{-# LINE 50 "../src-derived/Transform.hs" #-}++{-# LINE 120 "Transform.ag" #-}+type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap) +{-# LINE 54 "../src-derived/Transform.hs" #-}++{-# LINE 140 "Transform.ag" #-}+type AttrName   = (Identifier,Identifier) +{-# LINE 58 "../src-derived/Transform.hs" #-}++{-# LINE 141 "Transform.ag" #-}+type RuleInfo   = ([AttrName]->Pattern, Expression, [AttrName], Bool, String) +{-# LINE 62 "../src-derived/Transform.hs" #-}++{-# LINE 142 "Transform.ag" #-}+type SigInfo    = (Identifier,Type) +{-# LINE 66 "../src-derived/Transform.hs" #-}++{-# LINE 143 "Transform.ag" #-}+type UniqueInfo = (Identifier,Identifier) +{-# LINE 70 "../src-derived/Transform.hs" #-}++{-# LINE 144 "Transform.ag" #-}+type AugmentInfo = (Identifier,Expression)+{-# LINE 74 "../src-derived/Transform.hs" #-}++{-# LINE 145 "Transform.ag" #-}+type AroundInfo  = (Identifier,Expression)+{-# LINE 78 "../src-derived/Transform.hs" #-}++{-# LINE 192 "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 109 "../src-derived/Transform.hs" #-}++{-# LINE 317 "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 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]) ->+              NontermIdent -> ConstructorIdent -> [RuleInfo] -> RulesAndErrors+checkRules attributes fields allinsts allsigs 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))+        +        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 (pat,exp,as,owrt,str) ((r1,e1),m1) +          = let (e2,m2,u2,b2) = foldr (checkDefi owrt) (e1,m1,[],[]) as+            in  ( (Rule (pat u2) exp owrt str : 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)++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) ->+      checkDup inst insts errs $ +              maybe (insts, Seq.singleton (MissingInstSig nt con inst) >< errs)+                    (\info@(_, NT nm _) -> 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)+    +    checkDup name insts errs e+      = let fields = Map.findWithDefault [] con $ Map.findWithDefault Map.empty nt fieldMap+            walk [] = Nothing+            walk ((i,_): fs) | i == name = Just name+                             | otherwise = walk fs+        in case walk fields of+             Just occ -> (insts, Seq.singleton (DupChild nt con name occ) >< errs)+             Nothing  -> e++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++unionunionplusplus = Map.unionWith (Map.unionWith (++))+{-# LINE 236 "../src-derived/Transform.hs" #-}++{-# LINE 444 "Transform.ag" #-}++mkUniqueRules :: Options -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Attributes,Attributes) -> NontermIdent -> ConstructorIdent -> Map Identifier Identifier -> [Rule]+mkUniqueRules opts allFields allAttrDecls nt con usMap+  = map apply groups+  where+    fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allFields)++    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 pat rhs False "-- generated by the unique rule mechanism."+    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 263 "../src-derived/Transform.hs" #-}++{-# LINE 614 "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 288 "../src-derived/Transform.hs" #-}++{-# LINE 722 "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 297 "../src-derived/Transform.hs" #-}++{-# LINE 754 "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 306 "../src-derived/Transform.hs" #-}++{-# LINE 780 "Transform.ag" #-}++mergeParams :: ParamMap -> ParamMap -> ParamMap+mergeParams = Map.unionWith (++)+{-# LINE 312 "../src-derived/Transform.hs" #-}++{-# LINE 803 "Transform.ag" #-}++mergeCtx :: ContextMap -> ContextMap -> ContextMap+mergeCtx+  = Map.unionWith nubconcat+  where nubconcat a b = nub (a ++ b)+{-# LINE 320 "../src-derived/Transform.hs" #-}++{-# LINE 816 "Transform.ag" #-}++mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)+{-# LINE 325 "../src-derived/Transform.hs" #-}++{-# LINE 827 "Transform.ag" #-}++merge x y = foldr f y (Map.toList x)+ where f ~(k,v) m = Map.insertWith (Map.union) k v m+{-# LINE 331 "../src-derived/Transform.hs" #-}++{-# LINE 854 "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 341 "../src-derived/Transform.hs" #-}++{-# LINE 865 "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 347 "../src-derived/Transform.hs" #-}++{-# LINE 995 "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 356 "../src-derived/Transform.hs" #-}++{-# LINE 1002 "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]))+                    -> Grammar++constructGrammar nts ntParams gram attrs uses derivings wrappers allrules tsigs allinsts tsyns pragmaMap orderMap contextMap uniqueMap augmentsMap aroundsMap =+   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+                             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)+                                       cldrn = map (child False) flds ++ map (child True) insts+                                       child isVirtual (nm, tp) =+                                          let (inh,syn) = case tp of+                                                 NT nt _ -> let nt' = maybe nt id (deforestedNt nt)+                                                            in Map.findWithDefault (Map.empty,Map.empty) nt' attrs+                                                 _       -> (Map.empty,Map.empty)+                                          in Child nm tp inh syn isVirtual+                                   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+{-# LINE 401 "../src-derived/Transform.hs" #-}++{-# LINE 1046 "Transform.ag" #-}++mapUnionWithSetUnion = Map.unionWith Set.union+mapUnionWithPlusPlus = Map.unionWith (++)+{-# LINE 407 "../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 augmentSigs : _+            local allRulesErrs : _+            local allSigsErrs : _+            local allInstsErrs : _+            local allUniquesErrs : _+            local allAugmentErrs : _+            local allAroundsErrs : _+            local checkedRulesPre : _+            local checkedSigs : _+            local checkedInsts : _+            local checkedUniques : _+            local checkedAugments : _+            local checkedArounds : _+            local checkedRules : _+            local errs1       : _+            local errs2       : _+            local errs3       : _+            local errs4       : _+            local errs5       : _+            local errs6       : _+            local errs7       : _+            local errs8       : _+            local errs9       : _+            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]) ])+                    _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+                        {-# LINE 534 "Transform.hs" #-}+                    -- "Transform.ag"(line 243, column 10)+                    _allFields =+                        {-# LINE 243 "Transform.ag" #-}+                        let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)+                        in  foldr f (Map.empty) _elemsIcollectedFields+                        {-# LINE 540 "Transform.hs" #-}+                    -- "Transform.ag"(line 246, column 10)+                    _allConstrs =+                        {-# LINE 246 "Transform.ag" #-}+                        let f (nt,con,_) = Map.insertWith (++) nt [con]+                        in  foldr f (Map.empty) _elemsIcollectedFields+                        {-# LINE 546 "Transform.hs" #-}+                    -- "Transform.ag"(line 249, column 10)+                    _allRules =+                        {-# LINE 249 "Transform.ag" #-}+                        let f (nt,con,r) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [r])+                        in  foldr f (Map.empty) _elemsIcollectedRules+                        {-# LINE 552 "Transform.hs" #-}+                    -- "Transform.ag"(line 252, column 10)+                    _allSigs =+                        {-# LINE 252 "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 561 "Transform.hs" #-}+                    -- "Transform.ag"(line 258, column 10)+                    _allInsts =+                        {-# LINE 258 "Transform.ag" #-}+                        let f (nt,con,is) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con is)+                        in  foldr f (Map.empty) _elemsIcollectedInsts+                        {-# LINE 567 "Transform.hs" #-}+                    -- "Transform.ag"(line 261, column 10)+                    _allUniques =+                        {-# LINE 261 "Transform.ag" #-}+                        let f (nt,con,us) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con us)+                        in foldr f (Map.empty) _elemsIcollectedUniques+                        {-# LINE 573 "Transform.hs" #-}+                    -- "Transform.ag"(line 263, column 10)+                    _allAugments =+                        {-# LINE 263 "Transform.ag" #-}+                        let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+                        in foldr f Map.empty _elemsIcollectedAugments+                        {-# LINE 579 "Transform.hs" #-}+                    -- "Transform.ag"(line 265, column 10)+                    _allArounds =+                        {-# LINE 265 "Transform.ag" #-}+                        let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+                        in foldr f Map.empty _elemsIcollectedArounds+                        {-# LINE 585 "Transform.hs" #-}+                    -- "Transform.ag"(line 268, column 10)+                    _augmentSigs =+                        {-# LINE 268 "Transform.ag" #-}+                        let gen mp = []+                        in Map.map (Map.map gen) _allAugments+                        {-# LINE 591 "Transform.hs" #-}+                    -- "Transform.ag"(line 271, column 10)+                    _allRulesErrs =+                        {-# LINE 271 "Transform.ag" #-}+                        Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs    )) _allRules+                        {-# LINE 596 "Transform.hs" #-}+                    -- "Transform.ag"(line 272, column 10)+                    _allSigsErrs =+                        {-# LINE 272 "Transform.ag" #-}+                        Map.mapWithKey (Map.mapWithKey . (checkSigs                                                 )) _allSigs+                        {-# LINE 601 "Transform.hs" #-}+                    -- "Transform.ag"(line 273, column 10)+                    _allInstsErrs =+                        {-# LINE 273 "Transform.ag" #-}+                        Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals     _allSigs     _allFields   )) _allInsts+                        {-# LINE 606 "Transform.hs" #-}+                    -- "Transform.ag"(line 274, column 10)+                    _allUniquesErrs =+                        {-# LINE 274 "Transform.ag" #-}+                        Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls                                )) _allUniques+                        {-# LINE 611 "Transform.hs" #-}+                    -- "Transform.ag"(line 275, column 10)+                    _allAugmentErrs =+                        {-# LINE 275 "Transform.ag" #-}+                        Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls                               )) _allAugments+                        {-# LINE 616 "Transform.hs" #-}+                    -- "Transform.ag"(line 276, column 10)+                    _allAroundsErrs =+                        {-# LINE 276 "Transform.ag" #-}+                        Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields    )) _allArounds+                        {-# LINE 621 "Transform.hs" #-}+                    -- "Transform.ag"(line 278, column 10)+                    _checkedRulesPre =+                        {-# LINE 278 "Transform.ag" #-}+                        Map.map (Map.map fst) _allRulesErrs+                        {-# LINE 626 "Transform.hs" #-}+                    -- "Transform.ag"(line 279, column 10)+                    _checkedSigs =+                        {-# LINE 279 "Transform.ag" #-}+                        Map.map (Map.map fst) _allSigsErrs     `unionunionplusplus` _augmentSigs+                        {-# LINE 631 "Transform.hs" #-}+                    -- "Transform.ag"(line 280, column 10)+                    _checkedInsts =+                        {-# LINE 280 "Transform.ag" #-}+                        Map.map (Map.map fst) _allInstsErrs+                        {-# LINE 636 "Transform.hs" #-}+                    -- "Transform.ag"(line 281, column 10)+                    _checkedUniques =+                        {-# LINE 281 "Transform.ag" #-}+                        Map.map (Map.map fst) _allUniquesErrs+                        {-# LINE 641 "Transform.hs" #-}+                    -- "Transform.ag"(line 282, column 10)+                    _checkedAugments =+                        {-# LINE 282 "Transform.ag" #-}+                        Map.map (Map.map fst) _allAugmentErrs+                        {-# LINE 646 "Transform.hs" #-}+                    -- "Transform.ag"(line 283, column 10)+                    _checkedArounds =+                        {-# LINE 283 "Transform.ag" #-}+                        Map.map (Map.map fst) _allAroundsErrs+                        {-# LINE 651 "Transform.hs" #-}+                    -- "Transform.ag"(line 284, column 10)+                    _checkedRules =+                        {-# LINE 284 "Transform.ag" #-}+                        Map.unionWith (Map.unionWith (++)) _checkedRulesPre     (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allFields     _allAttrDecls    )) _checkedUniques    )+                        {-# LINE 656 "Transform.hs" #-}+                    -- "Transform.ag"(line 286, column 10)+                    _errs1 =+                        {-# LINE 286 "Transform.ag" #-}+                        let f = checkForDuplicates (DupSynonym)+                        in  Seq.fromList . f . map fst $ _elemsItypeSyns+                        {-# LINE 662 "Transform.hs" #-}+                    -- "Transform.ag"(line 289, column 10)+                    _errs2 =+                        {-# LINE 289 "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 669 "Transform.hs" #-}+                    -- "Transform.ag"(line 293, column 10)+                    _errs3 =+                        {-# LINE 293 "Transform.ag" #-}+                        let f (nt,cons) = checkForDuplicates (DupAlt nt) cons+                        in   Seq.empty+                        {-# LINE 675 "Transform.hs" #-}+                    -- "Transform.ag"(line 297, column 10)+                    _errs4 =+                        {-# LINE 297 "Transform.ag" #-}+                        let  f m s = Map.fold ((><) . snd) s m+                        in Map.fold f Seq.empty _allRulesErrs+                        {-# LINE 681 "Transform.hs" #-}+                    -- "Transform.ag"(line 300, column 10)+                    _errs5 =+                        {-# LINE 300 "Transform.ag" #-}+                        let  f m s = Map.fold ((><) . snd) s m+                        in Map.fold f Seq.empty _allSigsErrs+                        {-# LINE 687 "Transform.hs" #-}+                    -- "Transform.ag"(line 303, column 10)+                    _errs6 =+                        {-# LINE 303 "Transform.ag" #-}+                        let  f m s = Map.fold ((><) . snd) s m+                        in Map.fold f Seq.empty _allInstsErrs+                        {-# LINE 693 "Transform.hs" #-}+                    -- "Transform.ag"(line 306, column 10)+                    _errs7 =+                        {-# LINE 306 "Transform.ag" #-}+                        let  f m s = Map.fold ((><) . snd) s m+                        in Map.fold f Seq.empty _allUniquesErrs+                        {-# LINE 699 "Transform.hs" #-}+                    -- "Transform.ag"(line 309, column 10)+                    _errs8 =+                        {-# LINE 309 "Transform.ag" #-}+                        let  f m s = Map.fold ((><) . snd) s m+                        in Map.fold f Seq.empty _allAugmentErrs+                        {-# LINE 705 "Transform.hs" #-}+                    -- "Transform.ag"(line 312, column 10)+                    _errs9 =+                        {-# LINE 312 "Transform.ag" #-}+                        let  f m s = Map.fold ((><) . snd) s m+                        in Map.fold f Seq.empty _allAroundsErrs+                        {-# LINE 711 "Transform.hs" #-}+                    -- "Transform.ag"(line 315, column 10)+                    _lhsOerrors =+                        {-# LINE 315 "Transform.ag" #-}+                        _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9+                        {-# LINE 716 "Transform.hs" #-}+                    -- "Transform.ag"(line 487, column 10)+                    _allNonterminals =+                        {-# LINE 487 "Transform.ag" #-}+                        _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames+                        {-# LINE 721 "Transform.hs" #-}+                    -- "Transform.ag"(line 507, column 8)+                    _elemsOallConstructors =+                        {-# LINE 507 "Transform.ag" #-}+                        _elemsIcollectedConstructorsMap+                        {-# LINE 726 "Transform.hs" #-}+                    -- "Transform.ag"(line 580, column 8)+                    _elemsOdefSets =+                        {-# LINE 580 "Transform.ag" #-}+                        Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals    ))+                        {-# LINE 731 "Transform.hs" #-}+                    -- "Transform.ag"(line 581, column 8)+                    _elemsOdefinedSets =+                        {-# LINE 581 "Transform.ag" #-}+                        Map.map fst _elemsIdefSets+                        {-# LINE 736 "Transform.hs" #-}+                    -- "Transform.ag"(line 833, column 8)+                    _elemsOattrDecls =+                        {-# LINE 833 "Transform.ag" #-}+                        Map.empty+                        {-# LINE 741 "Transform.hs" #-}+                    -- "Transform.ag"(line 872, column 9)+                    _allAttrDecls =+                        {-# LINE 872 "Transform.ag" #-}+                        if withSelf _lhsIoptions+                         then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals    )+                         else               _elemsIattrDecls+                        {-# LINE 748 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 44, column 19)+                    _lhsOblocks =+                        {-# LINE 44 "Transform.ag" #-}+                        _elemsIblocks+                        {-# LINE 753 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 985, column 37)+                    _lhsOmoduleDecl =+                        {-# LINE 985 "Transform.ag" #-}+                        _elemsImoduleDecl+                        {-# LINE 758 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 662, column 34)+                    _lhsOpragmas =+                        {-# LINE 662 "Transform.ag" #-}+                        _elemsIpragmas+                        {-# LINE 763 "Transform.hs" #-}+                    -- copy rule (from local)+                    _elemsOallAttrDecls =+                        {-# LINE 735 "Transform.ag" #-}+                        _allAttrDecls+                        {-# LINE 768 "Transform.hs" #-}+                    -- copy rule (from local)+                    _elemsOallFields =+                        {-# LINE 126 "Transform.ag" #-}+                        _allFields+                        {-# LINE 773 "Transform.hs" #-}+                    -- copy rule (from local)+                    _elemsOallNonterminals =+                        {-# LINE 86 "Transform.ag" #-}+                        _allNonterminals+                        {-# LINE 778 "Transform.hs" #-}+                    ( _elemsIattrDecls,_elemsIattrOrderCollect,_elemsIblocks,_elemsIcollectedArounds,_elemsIcollectedAugments,_elemsIcollectedConstructorsMap,_elemsIcollectedFields,_elemsIcollectedInsts,_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 228, column 10)+                     _lhsOcollectedFields =+                         {-# LINE 228 "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 841 "Transform.hs" #-}+                     -- use rule "Transform.ag"(line 91, column 62)+                     _lhsOcollectedConstructorNames =+                         {-# LINE 91 "Transform.ag" #-}+                         _namesIcollectedConstructorNames+                         {-# LINE 846 "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 91, column 62)+                      _lhsOcollectedConstructorNames =+                          {-# LINE 91 "Transform.ag" #-}+                          _hdIcollectedConstructorNames `Set.union` _tlIcollectedConstructorNames+                          {-# LINE 908 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          _hdIcollectedFields ++ _tlIcollectedFields+                          {-# LINE 913 "Transform.hs" #-}+                      -- copy rule (down)+                      _hdOallConstructors =+                          {-# LINE 94 "Transform.ag" #-}+                          _lhsIallConstructors+                          {-# LINE 918 "Transform.hs" #-}+                      -- copy rule (down)+                      _hdOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 923 "Transform.hs" #-}+                      -- copy rule (down)+                      _hdOnts =+                          {-# LINE 163 "Transform.ag" #-}+                          _lhsInts+                          {-# LINE 928 "Transform.hs" #-}+                      -- copy rule (down)+                      _tlOallConstructors =+                          {-# LINE 94 "Transform.ag" #-}+                          _lhsIallConstructors+                          {-# LINE 933 "Transform.hs" #-}+                      -- copy rule (down)+                      _tlOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 938 "Transform.hs" #-}+                      -- copy rule (down)+                      _tlOnts =+                          {-# LINE 163 "Transform.ag" #-}+                          _lhsInts+                          {-# LINE 943 "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 91, column 62)+                      _lhsOcollectedConstructorNames =+                          {-# LINE 91 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 960 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          []+                          {-# LINE 965 "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 841, column 15)+                       __tup1 =+                           {-# LINE 841 "Transform.ag" #-}+                           checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls+                           {-# LINE 1031 "Transform.hs" #-}+                       -- "Transform.ag"(line 841, column 15)+                       (_attrDecls,_) =+                           {-# LINE 841 "Transform.ag" #-}+                           __tup1+                           {-# LINE 1036 "Transform.hs" #-}+                       -- "Transform.ag"(line 841, column 15)+                       (_,_errors) =+                           {-# LINE 841 "Transform.ag" #-}+                           __tup1+                           {-# LINE 1041 "Transform.hs" #-}+                       -- "Transform.ag"(line 843, column 15)+                       __tup2 =+                           {-# LINE 843 "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 1053 "Transform.hs" #-}+                       -- "Transform.ag"(line 843, column 15)+                       (_inherited,_,_) =+                           {-# LINE 843 "Transform.ag" #-}+                           __tup2+                           {-# LINE 1058 "Transform.hs" #-}+                       -- "Transform.ag"(line 843, column 15)+                       (_,_synthesized,_) =+                           {-# LINE 843 "Transform.ag" #-}+                           __tup2+                           {-# LINE 1063 "Transform.hs" #-}+                       -- "Transform.ag"(line 843, column 15)+                       (_,_,_useMap) =+                           {-# LINE 843 "Transform.ag" #-}+                           __tup2+                           {-# LINE 1068 "Transform.hs" #-}+                       -- "Transform.ag"(line 851, column 11)+                       _lhsOuseMap =+                           {-# LINE 851 "Transform.ag" #-}+                           Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))+                           {-# LINE 1073 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 42, column 19)+                       _lhsOerrors =+                           {-# LINE 42 "Transform.ag" #-}+                           _errors+                           {-# LINE 1078 "Transform.hs" #-}+                       -- copy rule (from local)+                       _lhsOattrDecls =+                           {-# LINE 134 "Transform.ag" #-}+                           _attrDecls+                           {-# LINE 1083 "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 647, column 17)+                           _lhsOconstructors =+                               {-# LINE 647 "Transform.ag" #-}+                               \ds -> ds+                               {-# LINE 1134 "Transform.hs" #-}+                           -- use rule "Transform.ag"(line 91, column 62)+                           _lhsOcollectedConstructorNames =+                               {-# LINE 91 "Transform.ag" #-}+                               Set.empty+                               {-# LINE 1139 "Transform.hs" #-}+                           -- use rule "Transform.ag"(line 42, column 19)+                           _lhsOerrors =+                               {-# LINE 42 "Transform.ag" #-}+                               Seq.empty+                               {-# LINE 1144 "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 646, column 17)+                           _lhsOconstructors =+                               {-# LINE 646 "Transform.ag" #-}+                               \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds+                               {-# LINE 1163 "Transform.hs" #-}+                           -- use rule "Transform.ag"(line 91, column 62)+                           _lhsOcollectedConstructorNames =+                               {-# LINE 91 "Transform.ag" #-}+                               _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+                               {-# LINE 1168 "Transform.hs" #-}+                           -- use rule "Transform.ag"(line 42, column 19)+                           _lhsOerrors =+                               {-# LINE 42 "Transform.ag" #-}+                               _set1Ierrors Seq.>< _set2Ierrors+                               {-# LINE 1173 "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 495, column 11)+                           _lhsOcollectedConstructorNames =+                               {-# LINE 495 "Transform.ag" #-}+                               Set.singleton name_+                               {-# LINE 1189 "Transform.hs" #-}+                           -- "Transform.ag"(line 644, column 17)+                           _lhsOconstructors =+                               {-# LINE 644 "Transform.ag" #-}+                               \ds -> Set.singleton name_+                               {-# LINE 1194 "Transform.hs" #-}+                           -- use rule "Transform.ag"(line 42, column 19)+                           _lhsOerrors =+                               {-# LINE 42 "Transform.ag" #-}+                               Seq.empty+                               {-# LINE 1199 "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 645, column 17)+                           _lhsOconstructors =+                               {-# LINE 645 "Transform.ag" #-}+                               \ds -> _set1Iconstructors ds `Set.union`      _set2Iconstructors ds+                               {-# LINE 1218 "Transform.hs" #-}+                           -- use rule "Transform.ag"(line 91, column 62)+                           _lhsOcollectedConstructorNames =+                               {-# LINE 91 "Transform.ag" #-}+                               _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+                               {-# LINE 1223 "Transform.hs" #-}+                           -- use rule "Transform.ag"(line 42, column 19)+                           _lhsOerrors =+                               {-# LINE 42 "Transform.ag" #-}+                               _set1Ierrors Seq.>< _set2Ierrors+                               {-# LINE 1228 "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]) ]+         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]) ]),(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]) ]),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,_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 _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]) ])+                      _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 793, column 7)+                      _lhsOctxCollect =+                          {-# LINE 793 "Transform.ag" #-}+                          if null ctx_+                          then Map.empty+                          else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+                          {-# LINE 1427 "Transform.hs" #-}+                      -- "Transform.ag"(line 837, column 10)+                      _attrsOnts =+                          {-# LINE 837 "Transform.ag" #-}+                          _namesInontSet+                          {-# LINE 1432 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1437 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 44, column 19)+                      _lhsOblocks =+                          {-# LINE 44 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1442 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          []+                          {-# LINE 1447 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          []+                          {-# LINE 1452 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 92, column 48)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 92 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1457 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          []+                          {-# LINE 1462 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          []+                          {-# LINE 1467 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 84, column 50)+                      _lhsOcollectedNames =+                          {-# LINE 84 "Transform.ag" #-}+                          _namesIcollectedNames+                          {-# LINE 1472 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          []+                          {-# LINE 1477 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 83, column 50)+                      _lhsOcollectedSetNames =+                          {-# LINE 83 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 1482 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          []+                          {-# LINE 1487 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          []+                          {-# LINE 1492 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 814, column 33)+                      _lhsOderivings =+                          {-# LINE 814 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1497 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 42, column 19)+                      _lhsOerrors =+                          {-# LINE 42 "Transform.ag" #-}+                          _namesIerrors Seq.>< _attrsIerrors+                          {-# LINE 1502 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 985, column 37)+                      _lhsOmoduleDecl =+                          {-# LINE 985 "Transform.ag" #-}+                          mzero+                          {-# LINE 1507 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 766, column 37)+                      _lhsOparamsCollect =+                          {-# LINE 766 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1512 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 662, column 34)+                      _lhsOpragmas =+                          {-# LINE 662 "Transform.ag" #-}+                          id+                          {-# LINE 1517 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1522 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 522, column 32)+                      _lhsOtypeSyns =+                          {-# LINE 522 "Transform.ag" #-}+                          []+                          {-# LINE 1527 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          _attrsIuseMap+                          {-# LINE 1532 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 653, column 32)+                      _lhsOwrappers =+                          {-# LINE 653 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 1537 "Transform.hs" #-}+                      -- copy rule (up)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _attrsIattrDecls+                          {-# LINE 1542 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOdefSets =+                          {-# LINE 102 "Transform.ag" #-}+                          _lhsIdefSets+                          {-# LINE 1547 "Transform.hs" #-}+                      -- copy rule (down)+                      _namesOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 1552 "Transform.hs" #-}+                      -- copy rule (down)+                      _namesOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 1557 "Transform.hs" #-}+                      -- copy rule (down)+                      _namesOdefinedSets =+                          {-# LINE 105 "Transform.ag" #-}+                          _lhsIdefinedSets+                          {-# LINE 1562 "Transform.hs" #-}+                      -- copy rule (down)+                      _attrsOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 1567 "Transform.hs" #-}+                      -- copy rule (down)+                      _attrsOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 1572 "Transform.hs" #-}+                      -- copy rule (down)+                      _attrsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 1577 "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,_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]) ])+                      _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 166, column 10)+                      _altsOnts =+                          {-# LINE 166 "Transform.ag" #-}+                          _namesInontSet+                          {-# LINE 1645 "Transform.hs" #-}+                      -- "Transform.ag"(line 501, column 11)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 501 "Transform.ag" #-}+                          Map.fromList+                          [ (n, _altsIcollectedConstructorNames)+                          | n <- Set.toList _namesInontSet+                          ]+                          {-# LINE 1653 "Transform.hs" #-}+                      -- "Transform.ag"(line 770, column 7)+                      _lhsOparamsCollect =+                          {-# LINE 770 "Transform.ag" #-}+                          if null params_+                          then Map.empty+                          else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]+                          {-# LINE 1660 "Transform.hs" #-}+                      -- "Transform.ag"(line 793, column 7)+                      _lhsOctxCollect =+                          {-# LINE 793 "Transform.ag" #-}+                          if null ctx_+                          then Map.empty+                          else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+                          {-# LINE 1667 "Transform.hs" #-}+                      -- "Transform.ag"(line 836, column 10)+                      _attrsOnts =+                          {-# LINE 836 "Transform.ag" #-}+                          _namesInontSet+                          {-# LINE 1672 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1677 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 44, column 19)+                      _lhsOblocks =+                          {-# LINE 44 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1682 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          []+                          {-# LINE 1687 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          []+                          {-# LINE 1692 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          _altsIcollectedFields+                          {-# LINE 1697 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          []+                          {-# LINE 1702 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 84, column 50)+                      _lhsOcollectedNames =+                          {-# LINE 84 "Transform.ag" #-}+                          _namesIcollectedNames+                          {-# LINE 1707 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          []+                          {-# LINE 1712 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 83, column 50)+                      _lhsOcollectedSetNames =+                          {-# LINE 83 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 1717 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          []+                          {-# LINE 1722 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          []+                          {-# LINE 1727 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 814, column 33)+                      _lhsOderivings =+                          {-# LINE 814 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1732 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 42, column 19)+                      _lhsOerrors =+                          {-# LINE 42 "Transform.ag" #-}+                          _namesIerrors Seq.>< _attrsIerrors+                          {-# LINE 1737 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 985, column 37)+                      _lhsOmoduleDecl =+                          {-# LINE 985 "Transform.ag" #-}+                          mzero+                          {-# LINE 1742 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 662, column 34)+                      _lhsOpragmas =+                          {-# LINE 662 "Transform.ag" #-}+                          id+                          {-# LINE 1747 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1752 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 522, column 32)+                      _lhsOtypeSyns =+                          {-# LINE 522 "Transform.ag" #-}+                          []+                          {-# LINE 1757 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          _attrsIuseMap+                          {-# LINE 1762 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 653, column 32)+                      _lhsOwrappers =+                          {-# LINE 653 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 1767 "Transform.hs" #-}+                      -- copy rule (up)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _attrsIattrDecls+                          {-# LINE 1772 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOdefSets =+                          {-# LINE 102 "Transform.ag" #-}+                          _lhsIdefSets+                          {-# LINE 1777 "Transform.hs" #-}+                      -- copy rule (down)+                      _namesOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 1782 "Transform.hs" #-}+                      -- copy rule (down)+                      _namesOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 1787 "Transform.hs" #-}+                      -- copy rule (down)+                      _namesOdefinedSets =+                          {-# LINE 105 "Transform.ag" #-}+                          _lhsIdefinedSets+                          {-# LINE 1792 "Transform.hs" #-}+                      -- copy rule (down)+                      _attrsOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 1797 "Transform.hs" #-}+                      -- copy rule (down)+                      _attrsOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 1802 "Transform.hs" #-}+                      -- copy rule (down)+                      _attrsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 1807 "Transform.hs" #-}+                      -- copy rule (down)+                      _altsOallConstructors =+                          {-# LINE 94 "Transform.ag" #-}+                          _lhsIallConstructors+                          {-# LINE 1812 "Transform.hs" #-}+                      -- copy rule (down)+                      _altsOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 1817 "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,_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]) ])+                      _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 821, column 14)+                      _lhsOderivings =+                          {-# LINE 821 "Transform.ag" #-}+                          Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]+                          {-# LINE 1871 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1876 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 44, column 19)+                      _lhsOblocks =+                          {-# LINE 44 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1881 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          []+                          {-# LINE 1886 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          []+                          {-# LINE 1891 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 92, column 48)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 92 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1896 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          []+                          {-# LINE 1901 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          []+                          {-# LINE 1906 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 84, column 50)+                      _lhsOcollectedNames =+                          {-# LINE 84 "Transform.ag" #-}+                          _setIcollectedNames+                          {-# LINE 1911 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          []+                          {-# LINE 1916 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 83, column 50)+                      _lhsOcollectedSetNames =+                          {-# LINE 83 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 1921 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          []+                          {-# LINE 1926 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          []+                          {-# LINE 1931 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 789, column 34)+                      _lhsOctxCollect =+                          {-# LINE 789 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1936 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 42, column 19)+                      _lhsOerrors =+                          {-# LINE 42 "Transform.ag" #-}+                          _setIerrors+                          {-# LINE 1941 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 985, column 37)+                      _lhsOmoduleDecl =+                          {-# LINE 985 "Transform.ag" #-}+                          mzero+                          {-# LINE 1946 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 766, column 37)+                      _lhsOparamsCollect =+                          {-# LINE 766 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1951 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 662, column 34)+                      _lhsOpragmas =+                          {-# LINE 662 "Transform.ag" #-}+                          id+                          {-# LINE 1956 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1961 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 522, column 32)+                      _lhsOtypeSyns =+                          {-# LINE 522 "Transform.ag" #-}+                          []+                          {-# LINE 1966 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 1971 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 653, column 32)+                      _lhsOwrappers =+                          {-# LINE 653 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 1976 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 1981 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOdefSets =+                          {-# LINE 102 "Transform.ag" #-}+                          _lhsIdefSets+                          {-# LINE 1986 "Transform.hs" #-}+                      -- copy rule (down)+                      _setOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 1991 "Transform.hs" #-}+                      -- copy rule (down)+                      _setOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 1996 "Transform.hs" #-}+                      -- copy rule (down)+                      _setOdefinedSets =+                          {-# LINE 105 "Transform.ag" #-}+                          _lhsIdefinedSets+                          {-# LINE 2001 "Transform.hs" #-}+                      ( _setIcollectedNames,_setIerrors,_setInontSet) =+                          (set_ _setOallFields _setOallNonterminals _setOdefinedSets )+                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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]) ])+                      _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 989, column 7)+                      _lhsOmoduleDecl =+                          {-# LINE 989 "Transform.ag" #-}+                          Just (name_, exports_, imports_)+                          {-# LINE 2046 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2051 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 44, column 19)+                      _lhsOblocks =+                          {-# LINE 44 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2056 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          []+                          {-# LINE 2061 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          []+                          {-# LINE 2066 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 92, column 48)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 92 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2071 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          []+                          {-# LINE 2076 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          []+                          {-# LINE 2081 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 84, column 50)+                      _lhsOcollectedNames =+                          {-# LINE 84 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2086 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          []+                          {-# LINE 2091 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 83, column 50)+                      _lhsOcollectedSetNames =+                          {-# LINE 83 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2096 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          []+                          {-# LINE 2101 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          []+                          {-# LINE 2106 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 789, column 34)+                      _lhsOctxCollect =+                          {-# LINE 789 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2111 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 814, column 33)+                      _lhsOderivings =+                          {-# LINE 814 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2116 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 42, column 19)+                      _lhsOerrors =+                          {-# LINE 42 "Transform.ag" #-}+                          Seq.empty+                          {-# LINE 2121 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 766, column 37)+                      _lhsOparamsCollect =+                          {-# LINE 766 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2126 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 662, column 34)+                      _lhsOpragmas =+                          {-# LINE 662 "Transform.ag" #-}+                          id+                          {-# LINE 2131 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2136 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 522, column 32)+                      _lhsOtypeSyns =+                          {-# LINE 522 "Transform.ag" #-}+                          []+                          {-# LINE 2141 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2146 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 653, column 32)+                      _lhsOwrappers =+                          {-# LINE 653 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2151 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 2156 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOdefSets =+                          {-# LINE 102 "Transform.ag" #-}+                          _lhsIdefSets+                          {-# LINE 2161 "Transform.hs" #-}+                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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]) ])+                      _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 665, column 13)+                      _lhsOpragmas =+                          {-# LINE 665 "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  }+                                         "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 2241 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2246 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 44, column 19)+                      _lhsOblocks =+                          {-# LINE 44 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2251 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          []+                          {-# LINE 2256 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          []+                          {-# LINE 2261 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 92, column 48)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 92 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2266 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          []+                          {-# LINE 2271 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          []+                          {-# LINE 2276 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 84, column 50)+                      _lhsOcollectedNames =+                          {-# LINE 84 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2281 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          []+                          {-# LINE 2286 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 83, column 50)+                      _lhsOcollectedSetNames =+                          {-# LINE 83 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2291 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          []+                          {-# LINE 2296 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          []+                          {-# LINE 2301 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 789, column 34)+                      _lhsOctxCollect =+                          {-# LINE 789 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2306 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 814, column 33)+                      _lhsOderivings =+                          {-# LINE 814 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2311 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 42, column 19)+                      _lhsOerrors =+                          {-# LINE 42 "Transform.ag" #-}+                          Seq.empty+                          {-# LINE 2316 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 985, column 37)+                      _lhsOmoduleDecl =+                          {-# LINE 985 "Transform.ag" #-}+                          mzero+                          {-# LINE 2321 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 766, column 37)+                      _lhsOparamsCollect =+                          {-# LINE 766 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2326 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2331 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 522, column 32)+                      _lhsOtypeSyns =+                          {-# LINE 522 "Transform.ag" #-}+                          []+                          {-# LINE 2336 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2341 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 653, column 32)+                      _lhsOwrappers =+                          {-# LINE 653 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2346 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 2351 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOdefSets =+                          {-# LINE 102 "Transform.ag" #-}+                          _lhsIdefSets+                          {-# LINE 2356 "Transform.hs" #-}+                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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]) ])+                      _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]) ])+                      _altsIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+                      _altsIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+                      _altsIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+                      _altsIerrors :: (Seq Error)+                      _altsIsemPragmasCollect :: PragmaMap+                      -- "Transform.ag"(line 167, column 10)+                      _altsOnts =+                          {-# LINE 167 "Transform.ag" #-}+                          _namesInontSet+                          {-# LINE 2425 "Transform.hs" #-}+                      -- "Transform.ag"(line 793, column 7)+                      _lhsOctxCollect =+                          {-# LINE 793 "Transform.ag" #-}+                          if null ctx_+                          then Map.empty+                          else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+                          {-# LINE 2432 "Transform.hs" #-}+                      -- "Transform.ag"(line 838, column 10)+                      _attrsOnts =+                          {-# LINE 838 "Transform.ag" #-}+                          _namesInontSet+                          {-# LINE 2437 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          _altsIattrOrderCollect+                          {-# LINE 2442 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 44, column 19)+                      _lhsOblocks =+                          {-# LINE 44 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2447 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          _altsIcollectedArounds+                          {-# LINE 2452 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          _altsIcollectedAugments+                          {-# LINE 2457 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 92, column 48)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 92 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2462 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          []+                          {-# LINE 2467 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          _altsIcollectedInsts+                          {-# LINE 2472 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 84, column 50)+                      _lhsOcollectedNames =+                          {-# LINE 84 "Transform.ag" #-}+                          _namesIcollectedNames+                          {-# LINE 2477 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          _altsIcollectedRules+                          {-# LINE 2482 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 83, column 50)+                      _lhsOcollectedSetNames =+                          {-# LINE 83 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2487 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          _altsIcollectedSigs+                          {-# LINE 2492 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          _altsIcollectedUniques+                          {-# LINE 2497 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 814, column 33)+                      _lhsOderivings =+                          {-# LINE 814 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2502 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 42, column 19)+                      _lhsOerrors =+                          {-# LINE 42 "Transform.ag" #-}+                          _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors+                          {-# LINE 2507 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 985, column 37)+                      _lhsOmoduleDecl =+                          {-# LINE 985 "Transform.ag" #-}+                          mzero+                          {-# LINE 2512 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 766, column 37)+                      _lhsOparamsCollect =+                          {-# LINE 766 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2517 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 662, column 34)+                      _lhsOpragmas =+                          {-# LINE 662 "Transform.ag" #-}+                          id+                          {-# LINE 2522 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          _altsIsemPragmasCollect+                          {-# LINE 2527 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 522, column 32)+                      _lhsOtypeSyns =+                          {-# LINE 522 "Transform.ag" #-}+                          []+                          {-# LINE 2532 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          _attrsIuseMap+                          {-# LINE 2537 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 653, column 32)+                      _lhsOwrappers =+                          {-# LINE 653 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2542 "Transform.hs" #-}+                      -- copy rule (up)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _attrsIattrDecls+                          {-# LINE 2547 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOdefSets =+                          {-# LINE 102 "Transform.ag" #-}+                          _lhsIdefSets+                          {-# LINE 2552 "Transform.hs" #-}+                      -- copy rule (down)+                      _namesOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 2557 "Transform.hs" #-}+                      -- copy rule (down)+                      _namesOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 2562 "Transform.hs" #-}+                      -- copy rule (down)+                      _namesOdefinedSets =+                          {-# LINE 105 "Transform.ag" #-}+                          _lhsIdefinedSets+                          {-# LINE 2567 "Transform.hs" #-}+                      -- copy rule (down)+                      _attrsOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 2572 "Transform.hs" #-}+                      -- copy rule (down)+                      _attrsOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 2577 "Transform.hs" #-}+                      -- copy rule (down)+                      _attrsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 2582 "Transform.hs" #-}+                      -- copy rule (down)+                      _altsOallAttrDecls =+                          {-# LINE 735 "Transform.ag" #-}+                          _lhsIallAttrDecls+                          {-# LINE 2587 "Transform.hs" #-}+                      -- copy rule (down)+                      _altsOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 2592 "Transform.hs" #-}+                      ( _namesIcollectedNames,_namesIerrors,_namesInontSet) =+                          (names_ _namesOallFields _namesOallNonterminals _namesOdefinedSets )+                      ( _attrsIattrDecls,_attrsIerrors,_attrsIuseMap) =+                          (attrs_ _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOnts )+                      ( _altsIattrOrderCollect,_altsIcollectedArounds,_altsIcollectedAugments,_altsIcollectedInsts,_altsIcollectedRules,_altsIcollectedSigs,_altsIcollectedUniques,_altsIerrors,_altsIsemPragmasCollect) =+                          (alts_ _altsOallAttrDecls _altsOallFields _altsOnts )+                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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]) ])+                      _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 478, column 10)+                      _lhsOcollectedSetNames =+                          {-# LINE 478 "Transform.ag" #-}+                          Set.singleton name_+                          {-# LINE 2646 "Transform.hs" #-}+                      -- "Transform.ag"(line 585, column 13)+                      __tup3 =+                          {-# LINE 585 "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 2660 "Transform.hs" #-}+                      -- "Transform.ag"(line 585, column 13)+                      (_defSets2,_) =+                          {-# LINE 585 "Transform.ag" #-}+                          __tup3+                          {-# LINE 2665 "Transform.hs" #-}+                      -- "Transform.ag"(line 585, column 13)+                      (_,_errs) =+                          {-# LINE 585 "Transform.ag" #-}+                          __tup3+                          {-# LINE 2670 "Transform.hs" #-}+                      -- "Transform.ag"(line 595, column 9)+                      _lhsOdefSets =+                          {-# LINE 595 "Transform.ag" #-}+                          _defSets2+                          {-# LINE 2675 "Transform.hs" #-}+                      -- "Transform.ag"(line 595, column 9)+                      _lhsOerrors =+                          {-# LINE 596 "Transform.ag" #-}+                          _errs >< _setIerrors+                          {-# LINE 2680 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2685 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 44, column 19)+                      _lhsOblocks =+                          {-# LINE 44 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2690 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          []+                          {-# LINE 2695 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          []+                          {-# LINE 2700 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 92, column 48)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 92 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2705 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          []+                          {-# LINE 2710 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          []+                          {-# LINE 2715 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 84, column 50)+                      _lhsOcollectedNames =+                          {-# LINE 84 "Transform.ag" #-}+                          _setIcollectedNames+                          {-# LINE 2720 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          []+                          {-# LINE 2725 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          []+                          {-# LINE 2730 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          []+                          {-# LINE 2735 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 789, column 34)+                      _lhsOctxCollect =+                          {-# LINE 789 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2740 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 814, column 33)+                      _lhsOderivings =+                          {-# LINE 814 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2745 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 985, column 37)+                      _lhsOmoduleDecl =+                          {-# LINE 985 "Transform.ag" #-}+                          mzero+                          {-# LINE 2750 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 766, column 37)+                      _lhsOparamsCollect =+                          {-# LINE 766 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2755 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 662, column 34)+                      _lhsOpragmas =+                          {-# LINE 662 "Transform.ag" #-}+                          id+                          {-# LINE 2760 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2765 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 522, column 32)+                      _lhsOtypeSyns =+                          {-# LINE 522 "Transform.ag" #-}+                          []+                          {-# LINE 2770 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2775 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 653, column 32)+                      _lhsOwrappers =+                          {-# LINE 653 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2780 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 2785 "Transform.hs" #-}+                      -- copy rule (down)+                      _setOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 2790 "Transform.hs" #-}+                      -- copy rule (down)+                      _setOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 2795 "Transform.hs" #-}+                      -- copy rule (down)+                      _setOdefinedSets =+                          {-# LINE 105 "Transform.ag" #-}+                          _lhsIdefinedSets+                          {-# LINE 2800 "Transform.hs" #-}+                      ( _setIcollectedNames,_setIerrors,_setInontSet) =+                          (set_ _setOallFields _setOallNonterminals _setOdefinedSets )+                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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]) ])+                      _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 176, column 10)+                      _blockInfo =+                          {-# LINE 176 "Transform.ag" #-}+                          ( let nm = getName name_+                            in if nm == "imports"+                               then BlockImport+                               else if nm == "optpragmas"+                                    then BlockPragma+                                    else BlockOther+                          , mbNt_+                          )+                          {-# LINE 2852 "Transform.hs" #-}+                      -- "Transform.ag"(line 184, column 10)+                      _blockValue =+                          {-# LINE 184 "Transform.ag" #-}+                          [(lines_, pos_)]+                          {-# LINE 2857 "Transform.hs" #-}+                      -- "Transform.ag"(line 185, column 10)+                      _lhsOblocks =+                          {-# LINE 185 "Transform.ag" #-}+                          Map.singleton _blockInfo     _blockValue+                          {-# LINE 2862 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2867 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          []+                          {-# LINE 2872 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          []+                          {-# LINE 2877 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 92, column 48)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 92 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2882 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          []+                          {-# LINE 2887 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          []+                          {-# LINE 2892 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 84, column 50)+                      _lhsOcollectedNames =+                          {-# LINE 84 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2897 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          []+                          {-# LINE 2902 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 83, column 50)+                      _lhsOcollectedSetNames =+                          {-# LINE 83 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2907 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          []+                          {-# LINE 2912 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          []+                          {-# LINE 2917 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 789, column 34)+                      _lhsOctxCollect =+                          {-# LINE 789 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2922 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 814, column 33)+                      _lhsOderivings =+                          {-# LINE 814 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2927 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 42, column 19)+                      _lhsOerrors =+                          {-# LINE 42 "Transform.ag" #-}+                          Seq.empty+                          {-# LINE 2932 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 985, column 37)+                      _lhsOmoduleDecl =+                          {-# LINE 985 "Transform.ag" #-}+                          mzero+                          {-# LINE 2937 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 766, column 37)+                      _lhsOparamsCollect =+                          {-# LINE 766 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2942 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 662, column 34)+                      _lhsOpragmas =+                          {-# LINE 662 "Transform.ag" #-}+                          id+                          {-# LINE 2947 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2952 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 522, column 32)+                      _lhsOtypeSyns =+                          {-# LINE 522 "Transform.ag" #-}+                          []+                          {-# LINE 2957 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 2962 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 653, column 32)+                      _lhsOwrappers =+                          {-# LINE 653 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 2967 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 2972 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOdefSets =+                          {-# LINE 102 "Transform.ag" #-}+                          _lhsIdefSets+                          {-# LINE 2977 "Transform.hs" #-}+                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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]) ])+                      _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 238, column 10)+                      _lhsOcollectedFields =+                          {-# LINE 238 "Transform.ag" #-}+                          map (\(x,y)->(name_, x, y)) _expanded+                          {-# LINE 3021 "Transform.hs" #-}+                      -- "Transform.ag"(line 481, column 11)+                      _lhsOcollectedNames =+                          {-# LINE 481 "Transform.ag" #-}+                          Set.singleton name_+                          {-# LINE 3026 "Transform.hs" #-}+                      -- "Transform.ag"(line 535, column 11)+                      _expanded =+                          {-# LINE 535 "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 3059 "Transform.hs" #-}+                      -- "Transform.ag"(line 564, column 11)+                      _argType =+                          {-# LINE 564 "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 3070 "Transform.hs" #-}+                      -- "Transform.ag"(line 571, column 11)+                      _lhsOtypeSyns =+                          {-# LINE 571 "Transform.ag" #-}+                          [(name_,_argType)]+                          {-# LINE 3075 "Transform.hs" #-}+                      -- "Transform.ag"(line 776, column 7)+                      _lhsOparamsCollect =+                          {-# LINE 776 "Transform.ag" #-}+                          if null params_+                          then Map.empty+                          else Map.singleton name_ params_+                          {-# LINE 3082 "Transform.hs" #-}+                      -- "Transform.ag"(line 799, column 7)+                      _lhsOctxCollect =+                          {-# LINE 799 "Transform.ag" #-}+                          if null ctx_+                          then Map.empty+                          else Map.singleton name_ ctx_+                          {-# LINE 3089 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3094 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 44, column 19)+                      _lhsOblocks =+                          {-# LINE 44 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3099 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          []+                          {-# LINE 3104 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          []+                          {-# LINE 3109 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 92, column 48)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 92 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3114 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          []+                          {-# LINE 3119 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          []+                          {-# LINE 3124 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 83, column 50)+                      _lhsOcollectedSetNames =+                          {-# LINE 83 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 3129 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          []+                          {-# LINE 3134 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          []+                          {-# LINE 3139 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 814, column 33)+                      _lhsOderivings =+                          {-# LINE 814 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3144 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 42, column 19)+                      _lhsOerrors =+                          {-# LINE 42 "Transform.ag" #-}+                          Seq.empty+                          {-# LINE 3149 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 985, column 37)+                      _lhsOmoduleDecl =+                          {-# LINE 985 "Transform.ag" #-}+                          mzero+                          {-# LINE 3154 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 662, column 34)+                      _lhsOpragmas =+                          {-# LINE 662 "Transform.ag" #-}+                          id+                          {-# LINE 3159 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3164 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3169 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 653, column 32)+                      _lhsOwrappers =+                          {-# LINE 653 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 3174 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 3179 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOdefSets =+                          {-# LINE 102 "Transform.ag" #-}+                          _lhsIdefSets+                          {-# LINE 3184 "Transform.hs" #-}+                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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]) ])+                      _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 656, column 13)+                      _lhsOwrappers =+                          {-# LINE 656 "Transform.ag" #-}+                          _setInontSet+                          {-# LINE 3231 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 734, column 55)+                      _lhsOattrOrderCollect =+                          {-# LINE 734 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3236 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 44, column 19)+                      _lhsOblocks =+                          {-# LINE 44 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3241 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 153, column 32)+                      _lhsOcollectedArounds =+                          {-# LINE 153 "Transform.ag" #-}+                          []+                          {-# LINE 3246 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 152, column 32)+                      _lhsOcollectedAugments =+                          {-# LINE 152 "Transform.ag" #-}+                          []+                          {-# LINE 3251 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 92, column 48)+                      _lhsOcollectedConstructorsMap =+                          {-# LINE 92 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3256 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 123, column 28)+                      _lhsOcollectedFields =+                          {-# LINE 123 "Transform.ag" #-}+                          []+                          {-# LINE 3261 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 150, column 32)+                      _lhsOcollectedInsts =+                          {-# LINE 150 "Transform.ag" #-}+                          []+                          {-# LINE 3266 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 84, column 50)+                      _lhsOcollectedNames =+                          {-# LINE 84 "Transform.ag" #-}+                          _setIcollectedNames+                          {-# LINE 3271 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 148, column 32)+                      _lhsOcollectedRules =+                          {-# LINE 148 "Transform.ag" #-}+                          []+                          {-# LINE 3276 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 83, column 50)+                      _lhsOcollectedSetNames =+                          {-# LINE 83 "Transform.ag" #-}+                          Set.empty+                          {-# LINE 3281 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 149, column 32)+                      _lhsOcollectedSigs =+                          {-# LINE 149 "Transform.ag" #-}+                          []+                          {-# LINE 3286 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 151, column 32)+                      _lhsOcollectedUniques =+                          {-# LINE 151 "Transform.ag" #-}+                          []+                          {-# LINE 3291 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 789, column 34)+                      _lhsOctxCollect =+                          {-# LINE 789 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3296 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 814, column 33)+                      _lhsOderivings =+                          {-# LINE 814 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3301 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 42, column 19)+                      _lhsOerrors =+                          {-# LINE 42 "Transform.ag" #-}+                          _setIerrors+                          {-# LINE 3306 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 985, column 37)+                      _lhsOmoduleDecl =+                          {-# LINE 985 "Transform.ag" #-}+                          mzero+                          {-# LINE 3311 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 766, column 37)+                      _lhsOparamsCollect =+                          {-# LINE 766 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3316 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 662, column 34)+                      _lhsOpragmas =+                          {-# LINE 662 "Transform.ag" #-}+                          id+                          {-# LINE 3321 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 706, column 56)+                      _lhsOsemPragmasCollect =+                          {-# LINE 706 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3326 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 522, column 32)+                      _lhsOtypeSyns =+                          {-# LINE 522 "Transform.ag" #-}+                          []+                          {-# LINE 3331 "Transform.hs" #-}+                      -- use rule "Transform.ag"(line 135, column 15)+                      _lhsOuseMap =+                          {-# LINE 135 "Transform.ag" #-}+                          Map.empty+                          {-# LINE 3336 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOattrDecls =+                          {-# LINE 134 "Transform.ag" #-}+                          _lhsIattrDecls+                          {-# LINE 3341 "Transform.hs" #-}+                      -- copy rule (chain)+                      _lhsOdefSets =+                          {-# LINE 102 "Transform.ag" #-}+                          _lhsIdefSets+                          {-# LINE 3346 "Transform.hs" #-}+                      -- copy rule (down)+                      _setOallFields =+                          {-# LINE 126 "Transform.ag" #-}+                          _lhsIallFields+                          {-# LINE 3351 "Transform.hs" #-}+                      -- copy rule (down)+                      _setOallNonterminals =+                          {-# LINE 86 "Transform.ag" #-}+                          _lhsIallNonterminals+                          {-# LINE 3356 "Transform.hs" #-}+                      -- copy rule (down)+                      _setOdefinedSets =+                          {-# LINE 105 "Transform.ag" #-}+                          _lhsIdefinedSets+                          {-# LINE 3361 "Transform.hs" #-}+                      ( _setIcollectedNames,_setIerrors,_setInontSet) =+                          (set_ _setOallFields _setOallNonterminals _setOdefinedSets )+                  in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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]) ]+         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]) ]),(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]) ]),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,_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 _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]) ])+                       _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]) ])+                       _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]) ])+                       _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 734, column 55)+                       _lhsOattrOrderCollect =+                           {-# LINE 734 "Transform.ag" #-}+                           _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+                           {-# LINE 3530 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 44, column 19)+                       _lhsOblocks =+                           {-# LINE 44 "Transform.ag" #-}+                           _hdIblocks `mapUnionWithPlusPlus` _tlIblocks+                           {-# LINE 3535 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 153, column 32)+                       _lhsOcollectedArounds =+                           {-# LINE 153 "Transform.ag" #-}+                           _hdIcollectedArounds ++ _tlIcollectedArounds+                           {-# LINE 3540 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 152, column 32)+                       _lhsOcollectedAugments =+                           {-# LINE 152 "Transform.ag" #-}+                           _hdIcollectedAugments ++ _tlIcollectedAugments+                           {-# LINE 3545 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 92, column 48)+                       _lhsOcollectedConstructorsMap =+                           {-# LINE 92 "Transform.ag" #-}+                           _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap+                           {-# LINE 3550 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 123, column 28)+                       _lhsOcollectedFields =+                           {-# LINE 123 "Transform.ag" #-}+                           _hdIcollectedFields ++ _tlIcollectedFields+                           {-# LINE 3555 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 150, column 32)+                       _lhsOcollectedInsts =+                           {-# LINE 150 "Transform.ag" #-}+                           _hdIcollectedInsts ++ _tlIcollectedInsts+                           {-# LINE 3560 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 84, column 50)+                       _lhsOcollectedNames =+                           {-# LINE 84 "Transform.ag" #-}+                           _hdIcollectedNames `Set.union` _tlIcollectedNames+                           {-# LINE 3565 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 148, column 32)+                       _lhsOcollectedRules =+                           {-# LINE 148 "Transform.ag" #-}+                           _hdIcollectedRules ++ _tlIcollectedRules+                           {-# LINE 3570 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 83, column 50)+                       _lhsOcollectedSetNames =+                           {-# LINE 83 "Transform.ag" #-}+                           _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames+                           {-# LINE 3575 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 149, column 32)+                       _lhsOcollectedSigs =+                           {-# LINE 149 "Transform.ag" #-}+                           _hdIcollectedSigs ++ _tlIcollectedSigs+                           {-# LINE 3580 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 151, column 32)+                       _lhsOcollectedUniques =+                           {-# LINE 151 "Transform.ag" #-}+                           _hdIcollectedUniques ++ _tlIcollectedUniques+                           {-# LINE 3585 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 789, column 34)+                       _lhsOctxCollect =+                           {-# LINE 789 "Transform.ag" #-}+                           _hdIctxCollect `mergeCtx` _tlIctxCollect+                           {-# LINE 3590 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 814, column 33)+                       _lhsOderivings =+                           {-# LINE 814 "Transform.ag" #-}+                           _hdIderivings `mergeDerivings` _tlIderivings+                           {-# LINE 3595 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 42, column 19)+                       _lhsOerrors =+                           {-# LINE 42 "Transform.ag" #-}+                           _hdIerrors Seq.>< _tlIerrors+                           {-# LINE 3600 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 985, column 37)+                       _lhsOmoduleDecl =+                           {-# LINE 985 "Transform.ag" #-}+                           _hdImoduleDecl `mplus` _tlImoduleDecl+                           {-# LINE 3605 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 766, column 37)+                       _lhsOparamsCollect =+                           {-# LINE 766 "Transform.ag" #-}+                           _hdIparamsCollect `mergeParams` _tlIparamsCollect+                           {-# LINE 3610 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 662, column 34)+                       _lhsOpragmas =+                           {-# LINE 662 "Transform.ag" #-}+                           _hdIpragmas . _tlIpragmas+                           {-# LINE 3615 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 706, column 56)+                       _lhsOsemPragmasCollect =+                           {-# LINE 706 "Transform.ag" #-}+                           _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+                           {-# LINE 3620 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 522, column 32)+                       _lhsOtypeSyns =+                           {-# LINE 522 "Transform.ag" #-}+                           _hdItypeSyns ++ _tlItypeSyns+                           {-# LINE 3625 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 135, column 15)+                       _lhsOuseMap =+                           {-# LINE 135 "Transform.ag" #-}+                           _hdIuseMap `merge` _tlIuseMap+                           {-# LINE 3630 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 653, column 32)+                       _lhsOwrappers =+                           {-# LINE 653 "Transform.ag" #-}+                           _hdIwrappers `Set.union` _tlIwrappers+                           {-# LINE 3635 "Transform.hs" #-}+                       -- copy rule (up)+                       _lhsOattrDecls =+                           {-# LINE 134 "Transform.ag" #-}+                           _tlIattrDecls+                           {-# LINE 3640 "Transform.hs" #-}+                       -- copy rule (up)+                       _lhsOdefSets =+                           {-# LINE 102 "Transform.ag" #-}+                           _tlIdefSets+                           {-# LINE 3645 "Transform.hs" #-}+                       -- copy rule (down)+                       _hdOallAttrDecls =+                           {-# LINE 735 "Transform.ag" #-}+                           _lhsIallAttrDecls+                           {-# LINE 3650 "Transform.hs" #-}+                       -- copy rule (down)+                       _hdOallConstructors =+                           {-# LINE 94 "Transform.ag" #-}+                           _lhsIallConstructors+                           {-# LINE 3655 "Transform.hs" #-}+                       -- copy rule (down)+                       _hdOallFields =+                           {-# LINE 126 "Transform.ag" #-}+                           _lhsIallFields+                           {-# LINE 3660 "Transform.hs" #-}+                       -- copy rule (down)+                       _hdOallNonterminals =+                           {-# LINE 86 "Transform.ag" #-}+                           _lhsIallNonterminals+                           {-# LINE 3665 "Transform.hs" #-}+                       -- copy rule (down)+                       _hdOattrDecls =+                           {-# LINE 134 "Transform.ag" #-}+                           _lhsIattrDecls+                           {-# LINE 3670 "Transform.hs" #-}+                       -- copy rule (down)+                       _hdOdefSets =+                           {-# LINE 102 "Transform.ag" #-}+                           _lhsIdefSets+                           {-# LINE 3675 "Transform.hs" #-}+                       -- copy rule (down)+                       _hdOdefinedSets =+                           {-# LINE 105 "Transform.ag" #-}+                           _lhsIdefinedSets+                           {-# LINE 3680 "Transform.hs" #-}+                       -- copy rule (down)+                       _tlOallAttrDecls =+                           {-# LINE 735 "Transform.ag" #-}+                           _lhsIallAttrDecls+                           {-# LINE 3685 "Transform.hs" #-}+                       -- copy rule (down)+                       _tlOallConstructors =+                           {-# LINE 94 "Transform.ag" #-}+                           _lhsIallConstructors+                           {-# LINE 3690 "Transform.hs" #-}+                       -- copy rule (down)+                       _tlOallFields =+                           {-# LINE 126 "Transform.ag" #-}+                           _lhsIallFields+                           {-# LINE 3695 "Transform.hs" #-}+                       -- copy rule (down)+                       _tlOallNonterminals =+                           {-# LINE 86 "Transform.ag" #-}+                           _lhsIallNonterminals+                           {-# LINE 3700 "Transform.hs" #-}+                       -- copy rule (chain)+                       _tlOattrDecls =+                           {-# LINE 134 "Transform.ag" #-}+                           _hdIattrDecls+                           {-# LINE 3705 "Transform.hs" #-}+                       -- copy rule (chain)+                       _tlOdefSets =+                           {-# LINE 102 "Transform.ag" #-}+                           _hdIdefSets+                           {-# LINE 3710 "Transform.hs" #-}+                       -- copy rule (down)+                       _tlOdefinedSets =+                           {-# LINE 105 "Transform.ag" #-}+                           _lhsIdefinedSets+                           {-# LINE 3715 "Transform.hs" #-}+                       ( _hdIattrDecls,_hdIattrOrderCollect,_hdIblocks,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedConstructorsMap,_hdIcollectedFields,_hdIcollectedInsts,_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,_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,_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]) ])+                       _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 734, column 55)+                       _lhsOattrOrderCollect =+                           {-# LINE 734 "Transform.ag" #-}+                           Map.empty+                           {-# LINE 3758 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 44, column 19)+                       _lhsOblocks =+                           {-# LINE 44 "Transform.ag" #-}+                           Map.empty+                           {-# LINE 3763 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 153, column 32)+                       _lhsOcollectedArounds =+                           {-# LINE 153 "Transform.ag" #-}+                           []+                           {-# LINE 3768 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 152, column 32)+                       _lhsOcollectedAugments =+                           {-# LINE 152 "Transform.ag" #-}+                           []+                           {-# LINE 3773 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 92, column 48)+                       _lhsOcollectedConstructorsMap =+                           {-# LINE 92 "Transform.ag" #-}+                           Map.empty+                           {-# LINE 3778 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 123, column 28)+                       _lhsOcollectedFields =+                           {-# LINE 123 "Transform.ag" #-}+                           []+                           {-# LINE 3783 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 150, column 32)+                       _lhsOcollectedInsts =+                           {-# LINE 150 "Transform.ag" #-}+                           []+                           {-# LINE 3788 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 84, column 50)+                       _lhsOcollectedNames =+                           {-# LINE 84 "Transform.ag" #-}+                           Set.empty+                           {-# LINE 3793 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 148, column 32)+                       _lhsOcollectedRules =+                           {-# LINE 148 "Transform.ag" #-}+                           []+                           {-# LINE 3798 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 83, column 50)+                       _lhsOcollectedSetNames =+                           {-# LINE 83 "Transform.ag" #-}+                           Set.empty+                           {-# LINE 3803 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 149, column 32)+                       _lhsOcollectedSigs =+                           {-# LINE 149 "Transform.ag" #-}+                           []+                           {-# LINE 3808 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 151, column 32)+                       _lhsOcollectedUniques =+                           {-# LINE 151 "Transform.ag" #-}+                           []+                           {-# LINE 3813 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 789, column 34)+                       _lhsOctxCollect =+                           {-# LINE 789 "Transform.ag" #-}+                           Map.empty+                           {-# LINE 3818 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 814, column 33)+                       _lhsOderivings =+                           {-# LINE 814 "Transform.ag" #-}+                           Map.empty+                           {-# LINE 3823 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 42, column 19)+                       _lhsOerrors =+                           {-# LINE 42 "Transform.ag" #-}+                           Seq.empty+                           {-# LINE 3828 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 985, column 37)+                       _lhsOmoduleDecl =+                           {-# LINE 985 "Transform.ag" #-}+                           mzero+                           {-# LINE 3833 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 766, column 37)+                       _lhsOparamsCollect =+                           {-# LINE 766 "Transform.ag" #-}+                           Map.empty+                           {-# LINE 3838 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 662, column 34)+                       _lhsOpragmas =+                           {-# LINE 662 "Transform.ag" #-}+                           id+                           {-# LINE 3843 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 706, column 56)+                       _lhsOsemPragmasCollect =+                           {-# LINE 706 "Transform.ag" #-}+                           Map.empty+                           {-# LINE 3848 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 522, column 32)+                       _lhsOtypeSyns =+                           {-# LINE 522 "Transform.ag" #-}+                           []+                           {-# LINE 3853 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 135, column 15)+                       _lhsOuseMap =+                           {-# LINE 135 "Transform.ag" #-}+                           Map.empty+                           {-# LINE 3858 "Transform.hs" #-}+                       -- use rule "Transform.ag"(line 653, column 32)+                       _lhsOwrappers =+                           {-# LINE 653 "Transform.ag" #-}+                           Set.empty+                           {-# LINE 3863 "Transform.hs" #-}+                       -- copy rule (chain)+                       _lhsOattrDecls =+                           {-# LINE 134 "Transform.ag" #-}+                           _lhsIattrDecls+                           {-# LINE 3868 "Transform.hs" #-}+                       -- copy rule (chain)+                       _lhsOdefSets =+                           {-# LINE 102 "Transform.ag" #-}+                           _lhsIdefSets+                           {-# LINE 3873 "Transform.hs" #-}+                   in  ( _lhsOattrDecls,_lhsOattrOrderCollect,_lhsOblocks,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedConstructorsMap,_lhsOcollectedFields,_lhsOcollectedInsts,_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 599, column 16)+                         _lhsOnontSet =+                             {-# LINE 599 "Transform.ag" #-}+                             _lhsIallNonterminals+                             {-# LINE 3948 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 84, column 50)+                         _lhsOcollectedNames =+                             {-# LINE 84 "Transform.ag" #-}+                             Set.empty+                             {-# LINE 3953 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 42, column 19)+                         _lhsOerrors =+                             {-# LINE 42 "Transform.ag" #-}+                             Seq.empty+                             {-# LINE 3958 "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 605, column 16)+                         _lhsOnontSet =+                             {-# LINE 605 "Transform.ag" #-}+                             Set.difference    _set1InontSet _set2InontSet+                             {-# LINE 3986 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 84, column 50)+                         _lhsOcollectedNames =+                             {-# LINE 84 "Transform.ag" #-}+                             _set1IcollectedNames `Set.union` _set2IcollectedNames+                             {-# LINE 3991 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 42, column 19)+                         _lhsOerrors =+                             {-# LINE 42 "Transform.ag" #-}+                             _set1Ierrors Seq.>< _set2Ierrors+                             {-# LINE 3996 "Transform.hs" #-}+                         -- copy rule (down)+                         _set1OallFields =+                             {-# LINE 126 "Transform.ag" #-}+                             _lhsIallFields+                             {-# LINE 4001 "Transform.hs" #-}+                         -- copy rule (down)+                         _set1OallNonterminals =+                             {-# LINE 86 "Transform.ag" #-}+                             _lhsIallNonterminals+                             {-# LINE 4006 "Transform.hs" #-}+                         -- copy rule (down)+                         _set1OdefinedSets =+                             {-# LINE 105 "Transform.ag" #-}+                             _lhsIdefinedSets+                             {-# LINE 4011 "Transform.hs" #-}+                         -- copy rule (down)+                         _set2OallFields =+                             {-# LINE 126 "Transform.ag" #-}+                             _lhsIallFields+                             {-# LINE 4016 "Transform.hs" #-}+                         -- copy rule (down)+                         _set2OallNonterminals =+                             {-# LINE 86 "Transform.ag" #-}+                             _lhsIallNonterminals+                             {-# LINE 4021 "Transform.hs" #-}+                         -- copy rule (down)+                         _set2OdefinedSets =+                             {-# LINE 105 "Transform.ag" #-}+                             _lhsIdefinedSets+                             {-# LINE 4026 "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 604, column 16)+                         _lhsOnontSet =+                             {-# LINE 604 "Transform.ag" #-}+                             Set.intersection  _set1InontSet _set2InontSet+                             {-# LINE 4058 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 84, column 50)+                         _lhsOcollectedNames =+                             {-# LINE 84 "Transform.ag" #-}+                             _set1IcollectedNames `Set.union` _set2IcollectedNames+                             {-# LINE 4063 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 42, column 19)+                         _lhsOerrors =+                             {-# LINE 42 "Transform.ag" #-}+                             _set1Ierrors Seq.>< _set2Ierrors+                             {-# LINE 4068 "Transform.hs" #-}+                         -- copy rule (down)+                         _set1OallFields =+                             {-# LINE 126 "Transform.ag" #-}+                             _lhsIallFields+                             {-# LINE 4073 "Transform.hs" #-}+                         -- copy rule (down)+                         _set1OallNonterminals =+                             {-# LINE 86 "Transform.ag" #-}+                             _lhsIallNonterminals+                             {-# LINE 4078 "Transform.hs" #-}+                         -- copy rule (down)+                         _set1OdefinedSets =+                             {-# LINE 105 "Transform.ag" #-}+                             _lhsIdefinedSets+                             {-# LINE 4083 "Transform.hs" #-}+                         -- copy rule (down)+                         _set2OallFields =+                             {-# LINE 126 "Transform.ag" #-}+                             _lhsIallFields+                             {-# LINE 4088 "Transform.hs" #-}+                         -- copy rule (down)+                         _set2OallNonterminals =+                             {-# LINE 86 "Transform.ag" #-}+                             _lhsIallNonterminals+                             {-# LINE 4093 "Transform.hs" #-}+                         -- copy rule (down)+                         _set2OdefinedSets =+                             {-# LINE 105 "Transform.ag" #-}+                             _lhsIdefinedSets+                             {-# LINE 4098 "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 484, column 14)+                         _lhsOcollectedNames =+                             {-# LINE 484 "Transform.ag" #-}+                             Set.singleton name_+                             {-# LINE 4117 "Transform.hs" #-}+                         -- "Transform.ag"(line 600, column 20)+                         __tup4 =+                             {-# LINE 600 "Transform.ag" #-}+                             case Map.lookup name_ _lhsIdefinedSets of+                                          Nothing  -> (Set.empty, Seq.singleton (UndefNont name_))+                                          Just set -> (set, Seq.empty)+                             {-# LINE 4124 "Transform.hs" #-}+                         -- "Transform.ag"(line 600, column 20)+                         (_nontSet,_) =+                             {-# LINE 600 "Transform.ag" #-}+                             __tup4+                             {-# LINE 4129 "Transform.hs" #-}+                         -- "Transform.ag"(line 600, column 20)+                         (_,_errors) =+                             {-# LINE 600 "Transform.ag" #-}+                             __tup4+                             {-# LINE 4134 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 42, column 19)+                         _lhsOerrors =+                             {-# LINE 42 "Transform.ag" #-}+                             _errors+                             {-# LINE 4139 "Transform.hs" #-}+                         -- copy rule (from local)+                         _lhsOnontSet =+                             {-# LINE 110 "Transform.ag" #-}+                             _nontSet+                             {-# LINE 4144 "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 606, column 16)+                         _lhsOnontSet =+                             {-# LINE 606 "Transform.ag" #-}+                             let table = flattenDatas _lhsIallFields+                             in path table from_ to_+                             {-# LINE 4161 "Transform.hs" #-}+                         -- "Transform.ag"(line 608, column 16)+                         _lhsOerrors =+                             {-# LINE 608 "Transform.ag" #-}+                             let check name | Set.member name _lhsIallNonterminals+                                                        = Seq.empty+                                            | otherwise = Seq.singleton (UndefNont name)+                             in check from_ >< check to_+                             {-# LINE 4169 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 84, column 50)+                         _lhsOcollectedNames =+                             {-# LINE 84 "Transform.ag" #-}+                             Set.empty+                             {-# LINE 4174 "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 603, column 16)+                         _lhsOnontSet =+                             {-# LINE 603 "Transform.ag" #-}+                             Set.union         _set1InontSet _set2InontSet+                             {-# LINE 4202 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 84, column 50)+                         _lhsOcollectedNames =+                             {-# LINE 84 "Transform.ag" #-}+                             _set1IcollectedNames `Set.union` _set2IcollectedNames+                             {-# LINE 4207 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 42, column 19)+                         _lhsOerrors =+                             {-# LINE 42 "Transform.ag" #-}+                             _set1Ierrors Seq.>< _set2Ierrors+                             {-# LINE 4212 "Transform.hs" #-}+                         -- copy rule (down)+                         _set1OallFields =+                             {-# LINE 126 "Transform.ag" #-}+                             _lhsIallFields+                             {-# LINE 4217 "Transform.hs" #-}+                         -- copy rule (down)+                         _set1OallNonterminals =+                             {-# LINE 86 "Transform.ag" #-}+                             _lhsIallNonterminals+                             {-# LINE 4222 "Transform.hs" #-}+                         -- copy rule (down)+                         _set1OdefinedSets =+                             {-# LINE 105 "Transform.ag" #-}+                             _lhsIdefinedSets+                             {-# LINE 4227 "Transform.hs" #-}+                         -- copy rule (down)+                         _set2OallFields =+                             {-# LINE 126 "Transform.ag" #-}+                             _lhsIallFields+                             {-# LINE 4232 "Transform.hs" #-}+                         -- copy rule (down)+                         _set2OallNonterminals =+                             {-# LINE 86 "Transform.ag" #-}+                             _lhsIallNonterminals+                             {-# LINE 4237 "Transform.hs" #-}+                         -- copy rule (down)+                         _set2OdefinedSets =+                             {-# LINE 105 "Transform.ag" #-}+                             _lhsIdefinedSets+                             {-# LINE 4242 "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 961, column 11)+                    _lhsOdefinedAttrs =+                        {-# LINE 961 "Transform.ag" #-}+                        (field_, attr_) : _patIdefinedAttrs+                        {-# LINE 4332 "Transform.hs" #-}+                    -- "Transform.ag"(line 962, column 11)+                    _lhsOpatunder =+                        {-# LINE 962 "Transform.ag" #-}+                        \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy+                        {-# LINE 4337 "Transform.hs" #-}+                    -- "Transform.ag"(line 963, column 11)+                    _lhsOdefinedInsts =+                        {-# LINE 963 "Transform.ag" #-}+                        (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts+                        {-# LINE 4342 "Transform.hs" #-}+                    -- "Transform.ag"(line 978, column 16)+                    _lhsOstpos =+                        {-# LINE 978 "Transform.ag" #-}+                        getPos field_+                        {-# LINE 4347 "Transform.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Alias field_ attr_ _patIcopy _partsIcopy+                        {-# LINE 4352 "Transform.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 4357 "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 965, column 12)+                    _lhsOpatunder =+                        {-# LINE 965 "Transform.ag" #-}+                        \us -> Constr name_ (_patsIpatunder us)+                        {-# LINE 4380 "Transform.hs" #-}+                    -- "Transform.ag"(line 976, column 16)+                    _lhsOstpos =+                        {-# LINE 976 "Transform.ag" #-}+                        getPos name_+                        {-# LINE 4385 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 956, column 42)+                    _lhsOdefinedAttrs =+                        {-# LINE 956 "Transform.ag" #-}+                        _patsIdefinedAttrs+                        {-# LINE 4390 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 955, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 955 "Transform.ag" #-}+                        _patsIdefinedInsts+                        {-# LINE 4395 "Transform.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Constr name_ _patsIcopy+                        {-# LINE 4400 "Transform.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 4405 "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 967, column 17)+                    _lhsOpatunder =+                        {-# LINE 967 "Transform.ag" #-}+                        \us -> Irrefutable (_patIpatunder us)+                        {-# LINE 4426 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 956, column 42)+                    _lhsOdefinedAttrs =+                        {-# LINE 956 "Transform.ag" #-}+                        _patIdefinedAttrs+                        {-# LINE 4431 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 955, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 955 "Transform.ag" #-}+                        _patIdefinedInsts+                        {-# LINE 4436 "Transform.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Irrefutable _patIcopy+                        {-# LINE 4441 "Transform.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 4446 "Transform.hs" #-}+                    -- copy rule (up)+                    _lhsOstpos =+                        {-# LINE 973 "Transform.ag" #-}+                        _patIstpos+                        {-# LINE 4451 "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 966, column 13)+                    _lhsOpatunder =+                        {-# LINE 966 "Transform.ag" #-}+                        \us -> Product pos_ (_patsIpatunder us)+                        {-# LINE 4472 "Transform.hs" #-}+                    -- "Transform.ag"(line 977, column 16)+                    _lhsOstpos =+                        {-# LINE 977 "Transform.ag" #-}+                        pos_+                        {-# LINE 4477 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 956, column 42)+                    _lhsOdefinedAttrs =+                        {-# LINE 956 "Transform.ag" #-}+                        _patsIdefinedAttrs+                        {-# LINE 4482 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 955, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 955 "Transform.ag" #-}+                        _patsIdefinedInsts+                        {-# LINE 4487 "Transform.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Product pos_ _patsIcopy+                        {-# LINE 4492 "Transform.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 4497 "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 964, column 16)+                    _lhsOpatunder =+                        {-# LINE 964 "Transform.ag" #-}+                        \us -> _copy+                        {-# LINE 4513 "Transform.hs" #-}+                    -- "Transform.ag"(line 979, column 16)+                    _lhsOstpos =+                        {-# LINE 979 "Transform.ag" #-}+                        pos_+                        {-# LINE 4518 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 956, column 42)+                    _lhsOdefinedAttrs =+                        {-# LINE 956 "Transform.ag" #-}+                        []+                        {-# LINE 4523 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 955, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 955 "Transform.ag" #-}+                        []+                        {-# LINE 4528 "Transform.hs" #-}+                    -- self rule+                    _copy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        Underscore pos_+                        {-# LINE 4533 "Transform.hs" #-}+                    -- self rule+                    _lhsOcopy =+                        {-# LINE 23 "./Patterns.ag" #-}+                        _copy+                        {-# LINE 4538 "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 971, column 10)+                     _lhsOpatunder =+                         {-# LINE 971 "Transform.ag" #-}+                         \us -> (_hdIpatunder us) : (_tlIpatunder us)+                         {-# LINE 4595 "Transform.hs" #-}+                     -- use rule "Transform.ag"(line 956, column 42)+                     _lhsOdefinedAttrs =+                         {-# LINE 956 "Transform.ag" #-}+                         _hdIdefinedAttrs ++ _tlIdefinedAttrs+                         {-# LINE 4600 "Transform.hs" #-}+                     -- use rule "Transform.ag"(line 955, column 55)+                     _lhsOdefinedInsts =+                         {-# LINE 955 "Transform.ag" #-}+                         _hdIdefinedInsts ++ _tlIdefinedInsts+                         {-# LINE 4605 "Transform.hs" #-}+                     -- self rule+                     _copy =+                         {-# LINE 23 "./Patterns.ag" #-}+                         (:) _hdIcopy _tlIcopy+                         {-# LINE 4610 "Transform.hs" #-}+                     -- self rule+                     _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}+                         _copy+                         {-# LINE 4615 "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 970, column 9)+                     _lhsOpatunder =+                         {-# LINE 970 "Transform.ag" #-}+                         \us ->  []+                         {-# LINE 4631 "Transform.hs" #-}+                     -- use rule "Transform.ag"(line 956, column 42)+                     _lhsOdefinedAttrs =+                         {-# LINE 956 "Transform.ag" #-}+                         []+                         {-# LINE 4636 "Transform.hs" #-}+                     -- use rule "Transform.ag"(line 955, column 55)+                     _lhsOdefinedInsts =+                         {-# LINE 955 "Transform.ag" #-}+                         []+                         {-# LINE 4641 "Transform.hs" #-}+                     -- self rule+                     _copy =+                         {-# LINE 23 "./Patterns.ag" #-}+                         []+                         {-# LINE 4646 "Transform.hs" #-}+                     -- self rule+                     _lhsOcopy =+                         {-# LINE 23 "./Patterns.ag" #-}+                         _copy+                         {-# LINE 4651 "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]) ]+         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, 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]) ]),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,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) =+             (sem _lhsIallAttrDecls _lhsIallFields _lhsInts )+     in  (Syn_SemAlt _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _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])  ])+                        _constructorSetIcollectedConstructorNames :: (Set ConstructorIdent)+                        _constructorSetIconstructors :: ((Set ConstructorIdent->Set ConstructorIdent))+                        _constructorSetIerrors :: (Seq Error)+                        _rulesIaroundInfos :: ([AroundInfo])+                        _rulesIaugmentInfos :: ([AugmentInfo])+                        _rulesIdefinedInsts :: ([Identifier])+                        _rulesIorderDepsCollect :: (Set Dependency)+                        _rulesIpragmaNamesCollect :: ([Identifier])+                        _rulesIruleInfos :: ([RuleInfo])+                        _rulesIsigInfos :: ([SigInfo])+                        _rulesIuniqueInfos :: ([UniqueInfo])+                        -- "Transform.ag"(line 710, column 7)+                        _pragmaNames =+                            {-# LINE 710 "Transform.ag" #-}+                            Set.fromList _rulesIpragmaNamesCollect+                            {-# LINE 4731 "Transform.hs" #-}+                        -- "Transform.ag"(line 711, column 7)+                        _lhsOsemPragmasCollect =+                            {-# LINE 711 "Transform.ag" #-}+                            foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames+                                                           | (nt, conset, _) <- _coninfo+                                                           , con <- Set.toList conset+                                                           ]+                            {-# LINE 4739 "Transform.hs" #-}+                        -- "Transform.ag"(line 739, column 7)+                        _attrOrders =+                            {-# LINE 739 "Transform.ag" #-}+                            [ orderMapSingle nt con _rulesIorderDepsCollect+                            | (nt, conset, _) <- _coninfo+                            , con <- Set.toList conset+                            ]+                            {-# LINE 4747 "Transform.hs" #-}+                        -- "Transform.ag"(line 745, column 7)+                        _lhsOattrOrderCollect =+                            {-# LINE 745 "Transform.ag" #-}+                            foldr orderMapUnion Map.empty _attrOrders+                            {-# LINE 4752 "Transform.hs" #-}+                        -- "Transform.ag"(line 890, column 12)+                        _coninfo =+                            {-# LINE 890 "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 4762 "Transform.hs" #-}+                        -- "Transform.ag"(line 897, column 12)+                        _lhsOerrors =+                            {-# LINE 897 "Transform.ag" #-}+                            Seq.fromList+                               [ UndefAlt nt con+                               | (nt, conset, conkeys) <- _coninfo+                               , con <- Set.toList (Set.difference conset conkeys)+                               ]+                            {-# LINE 4771 "Transform.hs" #-}+                        -- "Transform.ag"(line 902, column 12)+                        _lhsOcollectedRules =+                            {-# LINE 902 "Transform.ag" #-}+                            [ (nt,con,r)+                            | (nt, conset, _) <- _coninfo+                            , con <- Set.toList conset+                            , r <- _rulesIruleInfos+                            ]+                            {-# LINE 4780 "Transform.hs" #-}+                        -- "Transform.ag"(line 908, column 12)+                        _lhsOcollectedSigs =+                            {-# LINE 908 "Transform.ag" #-}+                            [ (nt,con,ts)+                            | (nt, conset, _) <- _coninfo+                            , con <- Set.toList conset+                            , ts <- _rulesIsigInfos+                            ]+                            {-# LINE 4789 "Transform.hs" #-}+                        -- "Transform.ag"(line 915, column 12)+                        _lhsOcollectedInsts =+                            {-# LINE 915 "Transform.ag" #-}+                            [ (nt,con,_rulesIdefinedInsts)+                            | (nt, conset, _) <- _coninfo+                            , con <- Set.toList conset+                            ]+                            {-# LINE 4797 "Transform.hs" #-}+                        -- "Transform.ag"(line 921, column 12)+                        _lhsOcollectedUniques =+                            {-# LINE 921 "Transform.ag" #-}+                            [ (nt,con,_rulesIuniqueInfos)+                            | (nt, conset, _) <- _coninfo+                            , con <- Set.toList conset+                            ]+                            {-# LINE 4805 "Transform.hs" #-}+                        -- "Transform.ag"(line 927, column 12)+                        _lhsOcollectedAugments =+                            {-# LINE 927 "Transform.ag" #-}+                            [ (nt, con, _rulesIaugmentInfos)+                            | (nt, conset, _) <- _coninfo+                            , con <- Set.toList conset+                            ]+                            {-# LINE 4813 "Transform.hs" #-}+                        -- "Transform.ag"(line 933, column 12)+                        _lhsOcollectedArounds =+                            {-# LINE 933 "Transform.ag" #-}+                            [ (nt, con, _rulesIaroundInfos)+                            | (nt, conset, _) <- _coninfo+                            , con <- Set.toList conset+                            ]+                            {-# LINE 4821 "Transform.hs" #-}+                        ( _constructorSetIcollectedConstructorNames,_constructorSetIconstructors,_constructorSetIerrors) =+                            (constructorSet_ )+                        ( _rulesIaroundInfos,_rulesIaugmentInfos,_rulesIdefinedInsts,_rulesIorderDepsCollect,_rulesIpragmaNamesCollect,_rulesIruleInfos,_rulesIsigInfos,_rulesIuniqueInfos) =+                            (rules_ )+                    in  ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_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]) ]+         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, 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]) ]),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,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect) =+             (sem _lhsIallAttrDecls _lhsIallFields _lhsInts )+     in  (Syn_SemAlts _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _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]) ])+                         _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]) ])+                         _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]) ])+                         _tlIcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+                         _tlIcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+                         _tlIcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+                         _tlIerrors :: (Seq Error)+                         _tlIsemPragmasCollect :: PragmaMap+                         -- use rule "Transform.ag"(line 734, column 55)+                         _lhsOattrOrderCollect =+                             {-# LINE 734 "Transform.ag" #-}+                             _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+                             {-# LINE 4913 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 153, column 32)+                         _lhsOcollectedArounds =+                             {-# LINE 153 "Transform.ag" #-}+                             _hdIcollectedArounds ++ _tlIcollectedArounds+                             {-# LINE 4918 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 152, column 32)+                         _lhsOcollectedAugments =+                             {-# LINE 152 "Transform.ag" #-}+                             _hdIcollectedAugments ++ _tlIcollectedAugments+                             {-# LINE 4923 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 150, column 32)+                         _lhsOcollectedInsts =+                             {-# LINE 150 "Transform.ag" #-}+                             _hdIcollectedInsts ++ _tlIcollectedInsts+                             {-# LINE 4928 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 148, column 32)+                         _lhsOcollectedRules =+                             {-# LINE 148 "Transform.ag" #-}+                             _hdIcollectedRules ++ _tlIcollectedRules+                             {-# LINE 4933 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 149, column 32)+                         _lhsOcollectedSigs =+                             {-# LINE 149 "Transform.ag" #-}+                             _hdIcollectedSigs ++ _tlIcollectedSigs+                             {-# LINE 4938 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 151, column 32)+                         _lhsOcollectedUniques =+                             {-# LINE 151 "Transform.ag" #-}+                             _hdIcollectedUniques ++ _tlIcollectedUniques+                             {-# LINE 4943 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 42, column 19)+                         _lhsOerrors =+                             {-# LINE 42 "Transform.ag" #-}+                             _hdIerrors Seq.>< _tlIerrors+                             {-# LINE 4948 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 706, column 56)+                         _lhsOsemPragmasCollect =+                             {-# LINE 706 "Transform.ag" #-}+                             _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+                             {-# LINE 4953 "Transform.hs" #-}+                         -- copy rule (down)+                         _hdOallAttrDecls =+                             {-# LINE 735 "Transform.ag" #-}+                             _lhsIallAttrDecls+                             {-# LINE 4958 "Transform.hs" #-}+                         -- copy rule (down)+                         _hdOallFields =+                             {-# LINE 126 "Transform.ag" #-}+                             _lhsIallFields+                             {-# LINE 4963 "Transform.hs" #-}+                         -- copy rule (down)+                         _hdOnts =+                             {-# LINE 163 "Transform.ag" #-}+                             _lhsInts+                             {-# LINE 4968 "Transform.hs" #-}+                         -- copy rule (down)+                         _tlOallAttrDecls =+                             {-# LINE 735 "Transform.ag" #-}+                             _lhsIallAttrDecls+                             {-# LINE 4973 "Transform.hs" #-}+                         -- copy rule (down)+                         _tlOallFields =+                             {-# LINE 126 "Transform.ag" #-}+                             _lhsIallFields+                             {-# LINE 4978 "Transform.hs" #-}+                         -- copy rule (down)+                         _tlOnts =+                             {-# LINE 163 "Transform.ag" #-}+                             _lhsInts+                             {-# LINE 4983 "Transform.hs" #-}+                         ( _hdIattrOrderCollect,_hdIcollectedArounds,_hdIcollectedAugments,_hdIcollectedInsts,_hdIcollectedRules,_hdIcollectedSigs,_hdIcollectedUniques,_hdIerrors,_hdIsemPragmasCollect) =+                             (hd_ _hdOallAttrDecls _hdOallFields _hdOnts )+                         ( _tlIattrOrderCollect,_tlIcollectedArounds,_tlIcollectedAugments,_tlIcollectedInsts,_tlIcollectedRules,_tlIcollectedSigs,_tlIcollectedUniques,_tlIerrors,_tlIsemPragmasCollect) =+                             (tl_ _tlOallAttrDecls _tlOallFields _tlOnts )+                     in  ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_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]) ])+                         _lhsOcollectedRules :: ([ (NontermIdent, ConstructorIdent, RuleInfo)])+                         _lhsOcollectedSigs :: ([ (NontermIdent, ConstructorIdent, SigInfo) ])+                         _lhsOcollectedUniques :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ])+                         _lhsOerrors :: (Seq Error)+                         _lhsOsemPragmasCollect :: PragmaMap+                         -- use rule "Transform.ag"(line 734, column 55)+                         _lhsOattrOrderCollect =+                             {-# LINE 734 "Transform.ag" #-}+                             Map.empty+                             {-# LINE 5007 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 153, column 32)+                         _lhsOcollectedArounds =+                             {-# LINE 153 "Transform.ag" #-}+                             []+                             {-# LINE 5012 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 152, column 32)+                         _lhsOcollectedAugments =+                             {-# LINE 152 "Transform.ag" #-}+                             []+                             {-# LINE 5017 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 150, column 32)+                         _lhsOcollectedInsts =+                             {-# LINE 150 "Transform.ag" #-}+                             []+                             {-# LINE 5022 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 148, column 32)+                         _lhsOcollectedRules =+                             {-# LINE 148 "Transform.ag" #-}+                             []+                             {-# LINE 5027 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 149, column 32)+                         _lhsOcollectedSigs =+                             {-# LINE 149 "Transform.ag" #-}+                             []+                             {-# LINE 5032 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 151, column 32)+                         _lhsOcollectedUniques =+                             {-# LINE 151 "Transform.ag" #-}+                             []+                             {-# LINE 5037 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 42, column 19)+                         _lhsOerrors =+                             {-# LINE 42 "Transform.ag" #-}+                             Seq.empty+                             {-# LINE 5042 "Transform.hs" #-}+                         -- use rule "Transform.ag"(line 706, column 56)+                         _lhsOsemPragmasCollect =+                             {-# LINE 706 "Transform.ag" #-}+                             Map.empty+                             {-# LINE 5047 "Transform.hs" #-}+                     in  ( _lhsOattrOrderCollect,_lhsOcollectedArounds,_lhsOcollectedAugments,_lhsOcollectedInsts,_lhsOcollectedRules,_lhsOcollectedSigs,_lhsOcollectedUniques,_lhsOerrors,_lhsOsemPragmasCollect))) )+-- SemDef ------------------------------------------------------+{-+   visit 0:+      synthesized attributes:+         aroundInfos          : [AroundInfo]+         augmentInfos         : [AugmentInfo]+         definedInsts         : [Identifier]+         orderDepsCollect     : Set Dependency+         pragmaNamesCollect   : [Identifier]+         ruleInfos            : [RuleInfo]+         sigInfos             : [SigInfo]+         uniqueInfos          : [UniqueInfo]+   alternatives:+      alternative AroundDef:+         child ident          : {Identifier}+         child rhs            : {Expression}+      alternative AttrOrderBefore:+         child before         : {[(Identifier,Identifier)]}+         child after          : {[(Identifier,Identifier)]}+         visit 0:+            local dependency  : _+      alternative AugmentDef:+         child ident          : {Identifier}+         child rhs            : {Expression}+      alternative Def:+         child pattern        : Pattern +         child rhs            : {Expression}+         child owrt           : {Bool}+      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 _pattern _rhs _owrt )  =+    (sem_SemDef_Def (sem_Pattern _pattern ) _rhs _owrt )+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]),(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]),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,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) =+             (sem )+     in  (Syn_SemDef _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _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])+                   _lhsOorderDepsCollect :: (Set Dependency)+                   _lhsOpragmaNamesCollect :: ([Identifier])+                   _lhsOruleInfos :: ([RuleInfo])+                   _lhsOsigInfos :: ([SigInfo])+                   _lhsOuniqueInfos :: ([UniqueInfo])+                   -- "Transform.ag"(line 952, column 17)+                   _lhsOaroundInfos =+                       {-# LINE 952 "Transform.ag" #-}+                       [ (ident_, rhs_) ]+                       {-# LINE 5130 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 884, column 40)+                   _lhsOaugmentInfos =+                       {-# LINE 884 "Transform.ag" #-}+                       []+                       {-# LINE 5135 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 955, column 55)+                   _lhsOdefinedInsts =+                       {-# LINE 955 "Transform.ag" #-}+                       []+                       {-# LINE 5140 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 747, column 44)+                   _lhsOorderDepsCollect =+                       {-# LINE 747 "Transform.ag" #-}+                       Set.empty+                       {-# LINE 5145 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 716, column 46)+                   _lhsOpragmaNamesCollect =+                       {-# LINE 716 "Transform.ag" #-}+                       []+                       {-# LINE 5150 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 881, column 40)+                   _lhsOruleInfos =+                       {-# LINE 881 "Transform.ag" #-}+                       []+                       {-# LINE 5155 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 882, column 40)+                   _lhsOsigInfos =+                       {-# LINE 882 "Transform.ag" #-}+                       []+                       {-# LINE 5160 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 883, column 40)+                   _lhsOuniqueInfos =+                       {-# LINE 883 "Transform.ag" #-}+                       []+                       {-# LINE 5165 "Transform.hs" #-}+               in  ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_AttrOrderBefore :: ([(Identifier,Identifier)]) ->+                              ([(Identifier,Identifier)]) ->+                              T_SemDef +sem_SemDef_AttrOrderBefore before_ after_  =+    (T_SemDef (let _lhsOorderDepsCollect :: (Set Dependency)+                   _lhsOaroundInfos :: ([AroundInfo])+                   _lhsOaugmentInfos :: ([AugmentInfo])+                   _lhsOdefinedInsts :: ([Identifier])+                   _lhsOpragmaNamesCollect :: ([Identifier])+                   _lhsOruleInfos :: ([RuleInfo])+                   _lhsOsigInfos :: ([SigInfo])+                   _lhsOuniqueInfos :: ([UniqueInfo])+                   -- "Transform.ag"(line 751, column 7)+                   _dependency =+                       {-# LINE 751 "Transform.ag" #-}+                       [ Dependency b a | b <- before_, a <- after_ ]+                       {-# LINE 5183 "Transform.hs" #-}+                   -- "Transform.ag"(line 752, column 7)+                   _lhsOorderDepsCollect =+                       {-# LINE 752 "Transform.ag" #-}+                       Set.fromList _dependency+                       {-# LINE 5188 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 885, column 40)+                   _lhsOaroundInfos =+                       {-# LINE 885 "Transform.ag" #-}+                       []+                       {-# LINE 5193 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 884, column 40)+                   _lhsOaugmentInfos =+                       {-# LINE 884 "Transform.ag" #-}+                       []+                       {-# LINE 5198 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 955, column 55)+                   _lhsOdefinedInsts =+                       {-# LINE 955 "Transform.ag" #-}+                       []+                       {-# LINE 5203 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 716, column 46)+                   _lhsOpragmaNamesCollect =+                       {-# LINE 716 "Transform.ag" #-}+                       []+                       {-# LINE 5208 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 881, column 40)+                   _lhsOruleInfos =+                       {-# LINE 881 "Transform.ag" #-}+                       []+                       {-# LINE 5213 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 882, column 40)+                   _lhsOsigInfos =+                       {-# LINE 882 "Transform.ag" #-}+                       []+                       {-# LINE 5218 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 883, column 40)+                   _lhsOuniqueInfos =+                       {-# LINE 883 "Transform.ag" #-}+                       []+                       {-# LINE 5223 "Transform.hs" #-}+               in  ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_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])+                   _lhsOorderDepsCollect :: (Set Dependency)+                   _lhsOpragmaNamesCollect :: ([Identifier])+                   _lhsOruleInfos :: ([RuleInfo])+                   _lhsOsigInfos :: ([SigInfo])+                   _lhsOuniqueInfos :: ([UniqueInfo])+                   -- "Transform.ag"(line 949, column 17)+                   _lhsOaugmentInfos =+                       {-# LINE 949 "Transform.ag" #-}+                       [ (ident_, rhs_) ]+                       {-# LINE 5241 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 885, column 40)+                   _lhsOaroundInfos =+                       {-# LINE 885 "Transform.ag" #-}+                       []+                       {-# LINE 5246 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 955, column 55)+                   _lhsOdefinedInsts =+                       {-# LINE 955 "Transform.ag" #-}+                       []+                       {-# LINE 5251 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 747, column 44)+                   _lhsOorderDepsCollect =+                       {-# LINE 747 "Transform.ag" #-}+                       Set.empty+                       {-# LINE 5256 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 716, column 46)+                   _lhsOpragmaNamesCollect =+                       {-# LINE 716 "Transform.ag" #-}+                       []+                       {-# LINE 5261 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 881, column 40)+                   _lhsOruleInfos =+                       {-# LINE 881 "Transform.ag" #-}+                       []+                       {-# LINE 5266 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 882, column 40)+                   _lhsOsigInfos =+                       {-# LINE 882 "Transform.ag" #-}+                       []+                       {-# LINE 5271 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 883, column 40)+                   _lhsOuniqueInfos =+                       {-# LINE 883 "Transform.ag" #-}+                       []+                       {-# LINE 5276 "Transform.hs" #-}+               in  ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_Def :: T_Pattern  ->+                  Expression ->+                  Bool ->+                  T_SemDef +sem_SemDef_Def (T_Pattern pattern_ ) rhs_ owrt_  =+    (T_SemDef (let _lhsOruleInfos :: ([RuleInfo])+                   _lhsOaroundInfos :: ([AroundInfo])+                   _lhsOaugmentInfos :: ([AugmentInfo])+                   _lhsOdefinedInsts :: ([Identifier])+                   _lhsOorderDepsCollect :: (Set Dependency)+                   _lhsOpragmaNamesCollect :: ([Identifier])+                   _lhsOsigInfos :: ([SigInfo])+                   _lhsOuniqueInfos :: ([UniqueInfo])+                   _patternIcopy :: Pattern+                   _patternIdefinedAttrs :: ([AttrName])+                   _patternIdefinedInsts :: ([Identifier])+                   _patternIpatunder :: ([AttrName]->Pattern)+                   _patternIstpos :: Pos+                   -- "Transform.ag"(line 940, column 10)+                   _lhsOruleInfos =+                       {-# LINE 940 "Transform.ag" #-}+                       [ (_patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos) ]+                       {-# LINE 5300 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 885, column 40)+                   _lhsOaroundInfos =+                       {-# LINE 885 "Transform.ag" #-}+                       []+                       {-# LINE 5305 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 884, column 40)+                   _lhsOaugmentInfos =+                       {-# LINE 884 "Transform.ag" #-}+                       []+                       {-# LINE 5310 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 955, column 55)+                   _lhsOdefinedInsts =+                       {-# LINE 955 "Transform.ag" #-}+                       _patternIdefinedInsts+                       {-# LINE 5315 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 747, column 44)+                   _lhsOorderDepsCollect =+                       {-# LINE 747 "Transform.ag" #-}+                       Set.empty+                       {-# LINE 5320 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 716, column 46)+                   _lhsOpragmaNamesCollect =+                       {-# LINE 716 "Transform.ag" #-}+                       []+                       {-# LINE 5325 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 882, column 40)+                   _lhsOsigInfos =+                       {-# LINE 882 "Transform.ag" #-}+                       []+                       {-# LINE 5330 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 883, column 40)+                   _lhsOuniqueInfos =+                       {-# LINE 883 "Transform.ag" #-}+                       []+                       {-# LINE 5335 "Transform.hs" #-}+                   ( _patternIcopy,_patternIdefinedAttrs,_patternIdefinedInsts,_patternIpatunder,_patternIstpos) =+                       (pattern_ )+               in  ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_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])+                   _lhsOorderDepsCollect :: (Set Dependency)+                   _lhsOruleInfos :: ([RuleInfo])+                   _lhsOsigInfos :: ([SigInfo])+                   _lhsOuniqueInfos :: ([UniqueInfo])+                   -- "Transform.ag"(line 720, column 7)+                   _lhsOpragmaNamesCollect =+                       {-# LINE 720 "Transform.ag" #-}+                       names_+                       {-# LINE 5354 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 885, column 40)+                   _lhsOaroundInfos =+                       {-# LINE 885 "Transform.ag" #-}+                       []+                       {-# LINE 5359 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 884, column 40)+                   _lhsOaugmentInfos =+                       {-# LINE 884 "Transform.ag" #-}+                       []+                       {-# LINE 5364 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 955, column 55)+                   _lhsOdefinedInsts =+                       {-# LINE 955 "Transform.ag" #-}+                       []+                       {-# LINE 5369 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 747, column 44)+                   _lhsOorderDepsCollect =+                       {-# LINE 747 "Transform.ag" #-}+                       Set.empty+                       {-# LINE 5374 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 881, column 40)+                   _lhsOruleInfos =+                       {-# LINE 881 "Transform.ag" #-}+                       []+                       {-# LINE 5379 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 882, column 40)+                   _lhsOsigInfos =+                       {-# LINE 882 "Transform.ag" #-}+                       []+                       {-# LINE 5384 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 883, column 40)+                   _lhsOuniqueInfos =+                       {-# LINE 883 "Transform.ag" #-}+                       []+                       {-# LINE 5389 "Transform.hs" #-}+               in  ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_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])+                   _lhsOorderDepsCollect :: (Set Dependency)+                   _lhsOpragmaNamesCollect :: ([Identifier])+                   _lhsOruleInfos :: ([RuleInfo])+                   _lhsOuniqueInfos :: ([UniqueInfo])+                   -- "Transform.ag"(line 943, column 14)+                   _lhsOsigInfos =+                       {-# LINE 943 "Transform.ag" #-}+                       [ (ident_, tp_) ]+                       {-# LINE 5407 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 885, column 40)+                   _lhsOaroundInfos =+                       {-# LINE 885 "Transform.ag" #-}+                       []+                       {-# LINE 5412 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 884, column 40)+                   _lhsOaugmentInfos =+                       {-# LINE 884 "Transform.ag" #-}+                       []+                       {-# LINE 5417 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 955, column 55)+                   _lhsOdefinedInsts =+                       {-# LINE 955 "Transform.ag" #-}+                       []+                       {-# LINE 5422 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 747, column 44)+                   _lhsOorderDepsCollect =+                       {-# LINE 747 "Transform.ag" #-}+                       Set.empty+                       {-# LINE 5427 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 716, column 46)+                   _lhsOpragmaNamesCollect =+                       {-# LINE 716 "Transform.ag" #-}+                       []+                       {-# LINE 5432 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 881, column 40)+                   _lhsOruleInfos =+                       {-# LINE 881 "Transform.ag" #-}+                       []+                       {-# LINE 5437 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 883, column 40)+                   _lhsOuniqueInfos =+                       {-# LINE 883 "Transform.ag" #-}+                       []+                       {-# LINE 5442 "Transform.hs" #-}+               in  ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_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])+                   _lhsOorderDepsCollect :: (Set Dependency)+                   _lhsOpragmaNamesCollect :: ([Identifier])+                   _lhsOruleInfos :: ([RuleInfo])+                   _lhsOsigInfos :: ([SigInfo])+                   -- "Transform.ag"(line 946, column 16)+                   _lhsOuniqueInfos =+                       {-# LINE 946 "Transform.ag" #-}+                       [ (ident_, ref_) ]+                       {-# LINE 5460 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 885, column 40)+                   _lhsOaroundInfos =+                       {-# LINE 885 "Transform.ag" #-}+                       []+                       {-# LINE 5465 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 884, column 40)+                   _lhsOaugmentInfos =+                       {-# LINE 884 "Transform.ag" #-}+                       []+                       {-# LINE 5470 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 955, column 55)+                   _lhsOdefinedInsts =+                       {-# LINE 955 "Transform.ag" #-}+                       []+                       {-# LINE 5475 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 747, column 44)+                   _lhsOorderDepsCollect =+                       {-# LINE 747 "Transform.ag" #-}+                       Set.empty+                       {-# LINE 5480 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 716, column 46)+                   _lhsOpragmaNamesCollect =+                       {-# LINE 716 "Transform.ag" #-}+                       []+                       {-# LINE 5485 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 881, column 40)+                   _lhsOruleInfos =+                       {-# LINE 881 "Transform.ag" #-}+                       []+                       {-# LINE 5490 "Transform.hs" #-}+                   -- use rule "Transform.ag"(line 882, column 40)+                   _lhsOsigInfos =+                       {-# LINE 882 "Transform.ag" #-}+                       []+                       {-# LINE 5495 "Transform.hs" #-}+               in  ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+-- SemDefs -----------------------------------------------------+{-+   visit 0:+      synthesized attributes:+         aroundInfos          : [AroundInfo]+         augmentInfos         : [AugmentInfo]+         definedInsts         : [Identifier]+         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]),(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]),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,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos) =+             (sem )+     in  (Syn_SemDefs _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _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])+                    _lhsOorderDepsCollect :: (Set Dependency)+                    _lhsOpragmaNamesCollect :: ([Identifier])+                    _lhsOruleInfos :: ([RuleInfo])+                    _lhsOsigInfos :: ([SigInfo])+                    _lhsOuniqueInfos :: ([UniqueInfo])+                    _hdIaroundInfos :: ([AroundInfo])+                    _hdIaugmentInfos :: ([AugmentInfo])+                    _hdIdefinedInsts :: ([Identifier])+                    _hdIorderDepsCollect :: (Set Dependency)+                    _hdIpragmaNamesCollect :: ([Identifier])+                    _hdIruleInfos :: ([RuleInfo])+                    _hdIsigInfos :: ([SigInfo])+                    _hdIuniqueInfos :: ([UniqueInfo])+                    _tlIaroundInfos :: ([AroundInfo])+                    _tlIaugmentInfos :: ([AugmentInfo])+                    _tlIdefinedInsts :: ([Identifier])+                    _tlIorderDepsCollect :: (Set Dependency)+                    _tlIpragmaNamesCollect :: ([Identifier])+                    _tlIruleInfos :: ([RuleInfo])+                    _tlIsigInfos :: ([SigInfo])+                    _tlIuniqueInfos :: ([UniqueInfo])+                    -- use rule "Transform.ag"(line 885, column 40)+                    _lhsOaroundInfos =+                        {-# LINE 885 "Transform.ag" #-}+                        _hdIaroundInfos ++ _tlIaroundInfos+                        {-# LINE 5563 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 884, column 40)+                    _lhsOaugmentInfos =+                        {-# LINE 884 "Transform.ag" #-}+                        _hdIaugmentInfos ++ _tlIaugmentInfos+                        {-# LINE 5568 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 955, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 955 "Transform.ag" #-}+                        _hdIdefinedInsts ++ _tlIdefinedInsts+                        {-# LINE 5573 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 747, column 44)+                    _lhsOorderDepsCollect =+                        {-# LINE 747 "Transform.ag" #-}+                        _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect+                        {-# LINE 5578 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 716, column 46)+                    _lhsOpragmaNamesCollect =+                        {-# LINE 716 "Transform.ag" #-}+                        _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect+                        {-# LINE 5583 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 881, column 40)+                    _lhsOruleInfos =+                        {-# LINE 881 "Transform.ag" #-}+                        _hdIruleInfos ++ _tlIruleInfos+                        {-# LINE 5588 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 882, column 40)+                    _lhsOsigInfos =+                        {-# LINE 882 "Transform.ag" #-}+                        _hdIsigInfos ++ _tlIsigInfos+                        {-# LINE 5593 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 883, column 40)+                    _lhsOuniqueInfos =+                        {-# LINE 883 "Transform.ag" #-}+                        _hdIuniqueInfos ++ _tlIuniqueInfos+                        {-# LINE 5598 "Transform.hs" #-}+                    ( _hdIaroundInfos,_hdIaugmentInfos,_hdIdefinedInsts,_hdIorderDepsCollect,_hdIpragmaNamesCollect,_hdIruleInfos,_hdIsigInfos,_hdIuniqueInfos) =+                        (hd_ )+                    ( _tlIaroundInfos,_tlIaugmentInfos,_tlIdefinedInsts,_tlIorderDepsCollect,_tlIpragmaNamesCollect,_tlIruleInfos,_tlIsigInfos,_tlIuniqueInfos) =+                        (tl_ )+                in  ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDefs_Nil :: T_SemDefs +sem_SemDefs_Nil  =+    (T_SemDefs (let _lhsOaroundInfos :: ([AroundInfo])+                    _lhsOaugmentInfos :: ([AugmentInfo])+                    _lhsOdefinedInsts :: ([Identifier])+                    _lhsOorderDepsCollect :: (Set Dependency)+                    _lhsOpragmaNamesCollect :: ([Identifier])+                    _lhsOruleInfos :: ([RuleInfo])+                    _lhsOsigInfos :: ([SigInfo])+                    _lhsOuniqueInfos :: ([UniqueInfo])+                    -- use rule "Transform.ag"(line 885, column 40)+                    _lhsOaroundInfos =+                        {-# LINE 885 "Transform.ag" #-}+                        []+                        {-# LINE 5618 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 884, column 40)+                    _lhsOaugmentInfos =+                        {-# LINE 884 "Transform.ag" #-}+                        []+                        {-# LINE 5623 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 955, column 55)+                    _lhsOdefinedInsts =+                        {-# LINE 955 "Transform.ag" #-}+                        []+                        {-# LINE 5628 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 747, column 44)+                    _lhsOorderDepsCollect =+                        {-# LINE 747 "Transform.ag" #-}+                        Set.empty+                        {-# LINE 5633 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 716, column 46)+                    _lhsOpragmaNamesCollect =+                        {-# LINE 716 "Transform.ag" #-}+                        []+                        {-# LINE 5638 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 881, column 40)+                    _lhsOruleInfos =+                        {-# LINE 881 "Transform.ag" #-}+                        []+                        {-# LINE 5643 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 882, column 40)+                    _lhsOsigInfos =+                        {-# LINE 882 "Transform.ag" #-}+                        []+                        {-# LINE 5648 "Transform.hs" #-}+                    -- use rule "Transform.ag"(line 883, column 40)+                    _lhsOuniqueInfos =+                        {-# LINE 883 "Transform.ag" #-}+                        []+                        {-# LINE 5653 "Transform.hs" #-}+                in  ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )
src-derived/Visage.hs view
@@ -2,6 +2,7 @@  -- UUAGC 0.9.14 (Visage.ag) module Visage where+{-# LINE 6 "Visage.ag" #-}  import UU.Scanner.Position(Pos(..)) import CommonTypes@@ -13,21 +14,29 @@ import Data.Map(Map) import Data.List(intersperse) import TokenDef+{-# LINE 18 "../src-derived/Visage.hs" #-} +{-# LINE 2 "./VisageSyntax.ag" #-}  import CommonTypes import UU.Pretty import AbstractSyntax import VisagePatterns import Expression+{-# LINE 27 "../src-derived/Visage.hs" #-} +{-# LINE 2 "./VisagePatterns.ag" #-}  import UU.Scanner.Position(Pos) import CommonTypes+{-# LINE 33 "../src-derived/Visage.hs" #-} +{-# LINE 2 "./Expression.ag" #-}  import UU.Scanner.Position(Pos) import HsToken+{-# LINE 39 "../src-derived/Visage.hs" #-}+{-# LINE 19 "Visage.ag" #-}  convert :: String -> String convert [] = []@@ -52,6 +61,7 @@   where     braces s = "{" ++ s ++ "}"     assign a b = show a ++ ":=" ++ show b+{-# LINE 65 "../src-derived/Visage.hs" #-} -- Expression -------------------------------------------------- {-    visit 0:@@ -85,7 +95,9 @@     (T_Expression (let _lhsOaterm :: ATerm                        -- "Visage.ag"(line 103, column 17)                        _lhsOaterm =+                           {-# LINE 103 "Visage.ag" #-}                            AAppl "Expression" [AString (sQ (showAGPos pos_)), AString (sQ (unlines . showTokens . tokensToStrings $ tks_))]+                           {-# LINE 101 "Visage.hs" #-}                    in  ( _lhsOaterm)) ) -- VisageChild ------------------------------------------------- {-@@ -128,13 +140,17 @@                         _rulesIaterms :: ([ATerm])                         -- "Visage.ag"(line 85, column 18)                         _lhsOaterm =+                            {-# LINE 85 "Visage.ag" #-}                             AAppl "Child" [AString (sQ (getName name_)), AString (sQ (show tp_)),                                            AString (sQ (showMap inh_)),                                            AString (sQ (showMap syn_)),                                            AAppl "Rules" _rulesIaterms]+                            {-# LINE 149 "Visage.hs" #-}                         -- "Visage.ag"(line 89, column 18)                         _rulesOisLoc =+                            {-# LINE 89 "Visage.ag" #-}                             False+                            {-# LINE 154 "Visage.hs" #-}                         ( _rulesIaterms) =                             (rules_ _rulesOisLoc )                     in  ( _lhsOaterm)) )@@ -174,7 +190,9 @@                            _tlIaterms :: ([ATerm])                            -- "Visage.ag"(line 80, column 17)                            _lhsOaterms =+                               {-# LINE 80 "Visage.ag" #-}                                _hdIaterm : _tlIaterms+                               {-# LINE 196 "Visage.hs" #-}                            ( _hdIaterm) =                                (hd_ )                            ( _tlIaterms) =@@ -185,7 +203,9 @@     (T_VisageChildren (let _lhsOaterms :: ([ATerm])                            -- "Visage.ag"(line 81, column 17)                            _lhsOaterms =+                               {-# LINE 81 "Visage.ag" #-}                                []+                               {-# LINE 209 "Visage.hs" #-}                        in  ( _lhsOaterms)) ) -- VisageGrammar ----------------------------------------------- {-@@ -219,7 +239,9 @@                           _nontsIaterms :: ([ATerm])                           -- "Visage.ag"(line 54, column 18)                           _lhsOaterm =+                              {-# LINE 54 "Visage.ag" #-}                               AAppl "Productions" _nontsIaterms+                              {-# LINE 245 "Visage.hs" #-}                           ( _nontsIaterms) =                               (nonts_ )                       in  ( _lhsOaterm)) )@@ -261,8 +283,10 @@                               _altsIaterms :: ([ATerm])                               -- "Visage.ag"(line 63, column 19)                               _lhsOaterm =+                                  {-# 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" #-}                               ( _altsIaterms) =                                   (alts_ )                           in  ( _lhsOaterm)) )@@ -302,7 +326,9 @@                                _tlIaterms :: ([ATerm])                                -- "Visage.ag"(line 58, column 17)                                _lhsOaterms =+                                   {-# LINE 58 "Visage.ag" #-}                                    _hdIaterm : _tlIaterms+                                   {-# LINE 332 "Visage.hs" #-}                                ( _hdIaterm) =                                    (hd_ )                                ( _tlIaterms) =@@ -313,7 +339,9 @@     (T_VisageNonterminals (let _lhsOaterms :: ([ATerm])                                -- "Visage.ag"(line 59, column 17)                                _lhsOaterms =+                                   {-# LINE 59 "Visage.ag" #-}                                    []+                                   {-# LINE 345 "Visage.hs" #-}                            in  ( _lhsOaterms)) ) -- VisagePattern ----------------------------------------------- {-@@ -370,8 +398,10 @@                           _patIaterm :: ATerm                           -- "Visage.ag"(line 119, column 18)                           _lhsOaterm =+                              {-# LINE 119 "Visage.ag" #-}                               AAppl "Pattern" [AAppl "Alias" [AString (sQ (showAGPos (getPos field_))),                                                               AString (sQ (getName field_ ++ "." ++ getName attr_)), _patIaterm]]+                              {-# LINE 405 "Visage.hs" #-}                           ( _patIaterm) =                               (pat_ )                       in  ( _lhsOaterm)) )@@ -383,9 +413,11 @@                           _patsIaterms :: ([ATerm])                           -- "Visage.ag"(line 112, column 18)                           _lhsOaterm =+                              {-# LINE 112 "Visage.ag" #-}                               AAppl "Pattern" [AAppl "Constr" [AString (sQ (showAGPos (getPos name_))),                                                AString (sQ (getName name_)),                                                AAppl "Patterns" _patsIaterms]]+                              {-# LINE 421 "Visage.hs" #-}                           ( _patsIaterms) =                               (pats_ )                       in  ( _lhsOaterm)) )@@ -397,8 +429,10 @@                           _patsIaterms :: ([ATerm])                           -- "Visage.ag"(line 115, column 18)                           _lhsOaterm =+                              {-# LINE 115 "Visage.ag" #-}                               AAppl "Pattern" [AAppl "Product" [AString (sQ (showAGPos pos_)),                                                                 AAppl "Patterns" _patsIaterms]]+                              {-# LINE 436 "Visage.hs" #-}                           ( _patsIaterms) =                               (pats_ )                       in  ( _lhsOaterm)) )@@ -408,7 +442,9 @@     (T_VisagePattern (let _lhsOaterm :: ATerm                           -- "Visage.ag"(line 121, column 18)                           _lhsOaterm =+                              {-# LINE 121 "Visage.ag" #-}                               AAppl "Pattern" [AAppl "Underscore" [AString (sQ (showAGPos pos_))]]+                              {-# LINE 448 "Visage.hs" #-}                       in  ( _lhsOaterm)) ) sem_VisagePattern_VVar :: Identifier ->                           Identifier ->@@ -417,8 +453,10 @@     (T_VisagePattern (let _lhsOaterm :: ATerm                           -- "Visage.ag"(line 117, column 18)                           _lhsOaterm =+                              {-# LINE 117 "Visage.ag" #-}                               AAppl "Pattern" [AAppl "Var" [AString (sQ (showAGPos (getPos field_))),                                                             AString (sQ (getName field_ ++ "." ++ getName attr_))]]+                              {-# LINE 460 "Visage.hs" #-}                       in  ( _lhsOaterm)) ) -- VisagePatterns ---------------------------------------------- {-@@ -456,7 +494,9 @@                            _tlIaterms :: ([ATerm])                            -- "Visage.ag"(line 107, column 17)                            _lhsOaterms =+                               {-# LINE 107 "Visage.ag" #-}                                _hdIaterm : _tlIaterms+                               {-# LINE 500 "Visage.hs" #-}                            ( _hdIaterm) =                                (hd_ )                            ( _tlIaterms) =@@ -467,7 +507,9 @@     (T_VisagePatterns (let _lhsOaterms :: ([ATerm])                            -- "Visage.ag"(line 108, column 17)                            _lhsOaterms =+                               {-# LINE 108 "Visage.ag" #-}                                []+                               {-# LINE 513 "Visage.hs" #-}                        in  ( _lhsOaterms)) ) -- VisageProduction -------------------------------------------- {-@@ -511,15 +553,21 @@                              _locrulesIaterms :: ([ATerm])                              -- "Visage.ag"(line 73, column 17)                              _lhsOaterm =+                                 {-# LINE 73 "Visage.ag" #-}                                  AAppl "Alternative" [AString (sQ (getName con_)), AAppl "Children" _childrenIaterms,                                                        AAppl "Rules" _rulesIaterms,                                                        AAppl "LocRules" _locrulesIaterms]+                                 {-# LINE 561 "Visage.hs" #-}                              -- "Visage.ag"(line 76, column 18)                              _locrulesOisLoc =+                                 {-# LINE 76 "Visage.ag" #-}                                  True+                                 {-# LINE 566 "Visage.hs" #-}                              -- "Visage.ag"(line 77, column 18)                              _rulesOisLoc =+                                 {-# LINE 77 "Visage.ag" #-}                                  False+                                 {-# LINE 571 "Visage.hs" #-}                              ( _childrenIaterms) =                                  (children_ )                              ( _rulesIaterms) =@@ -563,7 +611,9 @@                               _tlIaterms :: ([ATerm])                               -- "Visage.ag"(line 68, column 17)                               _lhsOaterms =+                                  {-# LINE 68 "Visage.ag" #-}                                   _hdIaterm : _tlIaterms+                                  {-# LINE 617 "Visage.hs" #-}                               ( _hdIaterm) =                                   (hd_ )                               ( _tlIaterms) =@@ -574,7 +624,9 @@     (T_VisageProductions (let _lhsOaterms :: ([ATerm])                               -- "Visage.ag"(line 69, column 17)                               _lhsOaterms =+                                  {-# LINE 69 "Visage.ag" #-}                                   []+                                  {-# LINE 630 "Visage.hs" #-}                           in  ( _lhsOaterms)) ) -- VisageRule -------------------------------------------------- {-@@ -621,8 +673,10 @@                             _rhsIaterm :: ATerm                             -- "Visage.ag"(line 97, column 18)                             _lhsOaterm =+                                {-# 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" #-}                             ( _patIaterm) =                                 (pat_ )                             ( _rhsIaterm) =@@ -670,13 +724,19 @@                              _tlIaterms :: ([ATerm])                              -- "Visage.ag"(line 92, column 17)                              _lhsOaterms =+                                 {-# LINE 92 "Visage.ag" #-}                                  _hdIaterm : _tlIaterms+                                 {-# LINE 730 "Visage.hs" #-}                              -- copy rule (down)                              _hdOisLoc =+                                 {-# LINE 51 "Visage.ag" #-}                                  _lhsIisLoc+                                 {-# LINE 735 "Visage.hs" #-}                              -- copy rule (down)                              _tlOisLoc =+                                 {-# LINE 51 "Visage.ag" #-}                                  _lhsIisLoc+                                 {-# LINE 740 "Visage.hs" #-}                              ( _hdIaterm) =                                  (hd_ _hdOisLoc )                              ( _tlIaterms) =@@ -688,5 +748,7 @@                         (let _lhsOaterms :: ([ATerm])                              -- "Visage.ag"(line 93, column 17)                              _lhsOaterms =+                                 {-# LINE 93 "Visage.ag" #-}                                  []+                                 {-# LINE 754 "Visage.hs" #-}                          in  ( _lhsOaterms))) )
src-derived/VisagePatterns.hs view
@@ -2,9 +2,11 @@  -- UUAGC 0.9.14 (VisagePatterns.ag) module VisagePatterns where+{-# LINE 2 "VisagePatterns.ag" #-}  import UU.Scanner.Position(Pos) import CommonTypes+{-# LINE 10 "../src-derived/VisagePatterns.hs" #-} -- VisagePattern ----------------------------------------------- {-    alternatives:
src-derived/VisageSyntax.hs view
@@ -2,12 +2,14 @@  -- UUAGC 0.9.14 (VisageSyntax.ag) module VisageSyntax where+{-# LINE 2 "VisageSyntax.ag" #-}  import CommonTypes import UU.Pretty import AbstractSyntax import VisagePatterns import Expression+{-# LINE 13 "../src-derived/VisageSyntax.hs" #-} -- VisageChild ------------------------------------------------- {-    alternatives:
src/Parser.hs view
@@ -332,6 +332,7 @@       <|>                            pINST             *> pList1 (pInstDecl opts)       <|>  pSEMPRAGMA *> pList1 (SemPragma <$> pNames)       <|> (\n e -> [AugmentDef n e]) <$ pAugmentToken <*> pIdentifier <* pAssign <*> pExpr opts+      <|> (\n e -> [AroundDef n e]) <$ pAROUND <*> pIdentifier <* pAssign <*> pExpr opts       <|> (\a b -> [AttrOrderBefore a [b]]) <$> pList1 pAttr <* pSmaller <*> pAttr       <|> (\pat owrt exp -> [Def (pat ()) exp owrt]) <$> pPattern (const <$> pAttr) <*> pAssign <*> pExpr opts @@ -456,3 +457,4 @@ pMODULE      = pCostReserved 5  "MODULE"  <?> "MODULE" pUNIQUEREF   = pCostReserved 5  "UNIQUEREF" <?> "UNIQUEREF" pAUGMENT     = pCostReserved 5  "AUGMENT" <?> "AUGMENT"+pAROUND      = pCostReserved 5  "AROUND" <?> "AROUND"
src/Scanner.hs view
@@ -133,7 +133,7 @@            [ "DATA", "EXT", "ATTR", "SEM","TYPE", "USE", "INCLUDE"
            , "SET","DERIVING","FOR", "WRAPPER", "MAYBE", "EITHER", "MAP", "INTMAP"
            , "PRAGMA", "SEMPRAGMA", "MODULE", "ATTACH", "UNIQUEREF", "INH", "SYN"
-           , "AUGMENT"
+           , "AUGMENT", "AROUND"
            ]
 
 ncomment c p ('-':'}':xs) = advc' 2 p c  xs
src/Version.hs view
@@ -1,4 +1,4 @@ module Version where
 
 banner :: String
-banner = "Attribute Grammar compiler / HUT project. Version 0.9.18"
+banner = "Attribute Grammar compiler / HUT project. Version 0.9.19"
uuagc.cabal view
@@ -1,7 +1,7 @@ cabal-version: >=1.2 build-type: Simple name: uuagc-version: 0.9.18+version: 0.9.19 license: GPL license-file: LICENSE maintainer: Arie Middelkoop <ariem@cs.uu.nl>@@ -28,7 +28,7 @@   else     build-depends: base < 3 -  build-depends: haskell98, uulib+  build-depends: haskell98, uulib>=0.9.12   main-is: Ag.hs   other-modules: Ag     , CommonTypes@@ -76,7 +76,7 @@   hs-source-dirs: src, src-derived  Library-   build-depends:   base >= 4, base < 5, Cabal, directory, process, uulib, filepath+   build-depends:   base >= 4, base < 5, Cabal, directory, process, uulib>=0.9.12, filepath    hs-source-dirs:  cabal-plugin/src    exposed-modules: Distribution.Simple.UUAGC    other-modules:   Distribution.Simple.UUAGC.UUAGC,
uuagc.cabal-for-ghc-6.6 view
@@ -1,5 +1,5 @@ name: uuagc-version: 0.9.18+version: 0.9.19 license: GPL license-file: LICENSE maintainer: Arie Middelkoop <ariem@cs.uu.nl>