uuagc 0.9.24 → 0.9.26
raw patch · 31 files changed
+10300/−10360 lines, 31 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- src-derived/AbstractSyntax.hs +11/−11
- src-derived/AbstractSyntaxDump.hs +25/−25
- src-derived/Code.hs +48/−48
- src-derived/CodeSyntax.hs +12/−12
- src-derived/CodeSyntaxDump.hs +25/−25
- src-derived/ConcreteSyntax.hs +25/−25
- src-derived/DeclBlocks.hs +4/−4
- src-derived/DefaultRules.hs +411/−418
- src-derived/Desugar.hs +2537/−2558
- src-derived/ErrorMessages.hs +6/−6
- src-derived/Expression.hs +2/−2
- src-derived/GenerateCode.hs +53/−53
- src-derived/HsToken.hs +5/−5
- src-derived/Interfaces.hs +6/−6
- src-derived/InterfacesRules.hs +1245/−1281
- src-derived/Order.hs +48/−48
- src-derived/Patterns.hs +6/−6
- src-derived/PrintCode.hs +11/−11
- src-derived/PrintErrorMessages.hs +34/−34
- src-derived/PrintOcamlCode.hs +8/−8
- src-derived/PrintVisitCode.hs +5/−5
- src-derived/SemHsTokens.hs +7/−7
- src-derived/TfmToVisage.hs +43/−43
- src-derived/Transform.hs +5686/−5680
- src-derived/Visage.hs +6/−6
- src-derived/VisagePatterns.hs +5/−5
- src-derived/VisageSyntax.hs +10/−10
- src/Ag.hs +13/−15
- src/Version.hs +1/−1
- uuagc.cabal +1/−1
- uuagc.cabal-for-ghc-6.6 +1/−1
src-derived/AbstractSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (AbstractSyntax.ag)+-- UUAGC 0.9.24 (AbstractSyntax.ag) module AbstractSyntax where {-# LINE 2 "AbstractSyntax.ag" #-} @@ -21,7 +21,7 @@ child syn : {Attributes} child virtual : {Maybe (Maybe Type)} -}-data Child = Child (Identifier) (Type) (Attributes) (Attributes) (Maybe (Maybe Type)) +data Child = Child (Identifier) (Type) (Attributes) (Attributes) ((Maybe (Maybe Type))) -- Children ---------------------------------------------------- {- alternatives:@@ -30,7 +30,7 @@ child tl : Children alternative Nil: -}-type Children = [(Child)]+type Children = [Child ] -- Grammar ----------------------------------------------------- {- alternatives:@@ -48,7 +48,7 @@ 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]))) (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:@@ -59,7 +59,7 @@ child syn : {Attributes} child prods : Productions -}-data Nonterminal = Nonterminal (NontermIdent) ([Identifier]) (Attributes) (Attributes) (Productions) +data Nonterminal = Nonterminal (NontermIdent) (([Identifier])) (Attributes) (Attributes) (Productions ) -- Nonterminals ------------------------------------------------ {- alternatives:@@ -68,7 +68,7 @@ child tl : Nonterminals alternative Nil: -}-type Nonterminals = [(Nonterminal)]+type Nonterminals = [Nonterminal ] -- Production -------------------------------------------------- {- alternatives:@@ -78,7 +78,7 @@ child rules : Rules child typeSigs : TypeSigs -}-data Production = Production (ConstructorIdent) (Children) (Rules) (TypeSigs) +data Production = Production (ConstructorIdent) (Children ) (Rules ) (TypeSigs ) -- Productions ------------------------------------------------- {- alternatives:@@ -87,7 +87,7 @@ child tl : Productions alternative Nil: -}-type Productions = [(Production)]+type Productions = [Production ] -- Rule -------------------------------------------------------- {- alternatives:@@ -99,7 +99,7 @@ child origin : {String} child explicit : {Bool} -}-data Rule = Rule (Maybe Identifier) (Pattern) (Expression) (Bool) (String) (Bool) +data Rule = Rule ((Maybe Identifier)) (Pattern) (Expression) (Bool) (String) (Bool) -- Rules ------------------------------------------------------- {- alternatives:@@ -108,7 +108,7 @@ child tl : Rules alternative Nil: -}-type Rules = [(Rule)]+type Rules = [Rule ] -- TypeSig ----------------------------------------------------- {- alternatives:@@ -125,4 +125,4 @@ child tl : TypeSigs alternative Nil: -}-type TypeSigs = [(TypeSig)]+type TypeSigs = [TypeSig ]
src-derived/AbstractSyntaxDump.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (AbstractSyntaxDump.ag)+-- UUAGC 0.9.24 (AbstractSyntaxDump.ag) module AbstractSyntaxDump where {-# LINE 6 "AbstractSyntaxDump.ag" #-} @@ -99,7 +99,7 @@ -- semantic domain newtype T_Children = T_Children (( PP_Doc,([PP_Doc]))) data Inh_Children = Inh_Children {}-data Syn_Children = Syn_Children {pp_Syn_Children :: PP_Doc,ppL_Syn_Children :: [PP_Doc]}+data Syn_Children = Syn_Children {pp_Syn_Children :: PP_Doc,ppL_Syn_Children :: ([PP_Doc])} wrap_Children :: T_Children -> Inh_Children -> Syn_Children @@ -317,7 +317,7 @@ -- semantic domain newtype T_Nonterminals = T_Nonterminals (( PP_Doc,([PP_Doc]))) data Inh_Nonterminals = Inh_Nonterminals {}-data Syn_Nonterminals = Syn_Nonterminals {pp_Syn_Nonterminals :: PP_Doc,ppL_Syn_Nonterminals :: [PP_Doc]}+data Syn_Nonterminals = Syn_Nonterminals {pp_Syn_Nonterminals :: PP_Doc,ppL_Syn_Nonterminals :: ([PP_Doc])} wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> Syn_Nonterminals @@ -411,9 +411,9 @@ sem_Pattern (Underscore _pos ) = (sem_Pattern_Underscore _pos ) -- semantic domain-newtype T_Pattern = T_Pattern (( Pattern,PP_Doc))+newtype T_Pattern = T_Pattern (( Pattern ,PP_Doc)) data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern,pp_Syn_Pattern :: PP_Doc}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern ,pp_Syn_Pattern :: PP_Doc} wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern @@ -428,10 +428,10 @@ T_Pattern sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern- _patIcopy :: Pattern+ _lhsOcopy :: Pattern + _patIcopy :: Pattern _patIpp :: PP_Doc- _partsIcopy :: Patterns+ _partsIcopy :: Patterns _partsIpp :: PP_Doc _partsIppL :: ([PP_Doc]) -- "AbstractSyntaxDump.ag"(line 46, column 33)@@ -459,8 +459,8 @@ T_Pattern sem_Pattern_Constr name_ (T_Patterns pats_ ) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern- _patsIcopy :: Patterns+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns _patsIpp :: PP_Doc _patsIppL :: ([PP_Doc]) -- "AbstractSyntaxDump.ag"(line 44, column 33)@@ -485,8 +485,8 @@ T_Pattern sem_Pattern_Irrefutable (T_Pattern pat_ ) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern- _patIcopy :: Pattern+ _lhsOcopy :: Pattern + _patIcopy :: Pattern _patIpp :: PP_Doc -- use rule "AbstractSyntaxDump.ag"(line 17, column 58) _lhsOpp =@@ -511,8 +511,8 @@ T_Pattern sem_Pattern_Product pos_ (T_Patterns pats_ ) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern- _patsIcopy :: Patterns+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns _patsIpp :: PP_Doc _patsIppL :: ([PP_Doc]) -- "AbstractSyntaxDump.ag"(line 45, column 33)@@ -537,7 +537,7 @@ T_Pattern sem_Pattern_Underscore pos_ = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern+ _lhsOcopy :: Pattern -- "AbstractSyntaxDump.ag"(line 47, column 25) _lhsOpp = ({-# LINE 47 "AbstractSyntaxDump.ag" #-}@@ -577,9 +577,9 @@ sem_Patterns list = (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) ) -- semantic domain-newtype T_Patterns = T_Patterns (( Patterns,PP_Doc,([PP_Doc])))+newtype T_Patterns = T_Patterns (( Patterns ,PP_Doc,([PP_Doc]))) data Inh_Patterns = Inh_Patterns {}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns,pp_Syn_Patterns :: PP_Doc,ppL_Syn_Patterns :: [PP_Doc]}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns ,pp_Syn_Patterns :: PP_Doc,ppL_Syn_Patterns :: ([PP_Doc])} wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns @@ -593,10 +593,10 @@ sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) = (T_Patterns (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc- _lhsOcopy :: Patterns- _hdIcopy :: Pattern+ _lhsOcopy :: Patterns + _hdIcopy :: Pattern _hdIpp :: PP_Doc- _tlIcopy :: Patterns+ _tlIcopy :: Patterns _tlIpp :: PP_Doc _tlIppL :: ([PP_Doc]) -- "AbstractSyntaxDump.ag"(line 55, column 33)@@ -628,7 +628,7 @@ sem_Patterns_Nil = (T_Patterns (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc- _lhsOcopy :: Patterns+ _lhsOcopy :: Patterns -- "AbstractSyntaxDump.ag"(line 56, column 33) _lhsOppL = ({-# LINE 56 "AbstractSyntaxDump.ag" #-}@@ -723,7 +723,7 @@ -- semantic domain newtype T_Productions = T_Productions (( PP_Doc,([PP_Doc]))) data Inh_Productions = Inh_Productions {}-data Syn_Productions = Syn_Productions {pp_Syn_Productions :: PP_Doc,ppL_Syn_Productions :: [PP_Doc]}+data Syn_Productions = Syn_Productions {pp_Syn_Productions :: PP_Doc,ppL_Syn_Productions :: ([PP_Doc])} wrap_Productions :: T_Productions -> Inh_Productions -> Syn_Productions @@ -809,7 +809,7 @@ T_Rule sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ = (T_Rule (let _lhsOpp :: PP_Doc- _patternIcopy :: Pattern+ _patternIcopy :: Pattern _patternIpp :: PP_Doc _rhsIpp :: PP_Doc -- "AbstractSyntaxDump.ag"(line 38, column 33)@@ -842,7 +842,7 @@ -- semantic domain newtype T_Rules = T_Rules (( PP_Doc,([PP_Doc]))) data Inh_Rules = Inh_Rules {}-data Syn_Rules = Syn_Rules {pp_Syn_Rules :: PP_Doc,ppL_Syn_Rules :: [PP_Doc]}+data Syn_Rules = Syn_Rules {pp_Syn_Rules :: PP_Doc,ppL_Syn_Rules :: ([PP_Doc])} wrap_Rules :: T_Rules -> Inh_Rules -> Syn_Rules @@ -946,7 +946,7 @@ -- semantic domain newtype T_TypeSigs = T_TypeSigs (( PP_Doc,([PP_Doc]))) data Inh_TypeSigs = Inh_TypeSigs {}-data Syn_TypeSigs = Syn_TypeSigs {pp_Syn_TypeSigs :: PP_Doc,ppL_Syn_TypeSigs :: [PP_Doc]}+data Syn_TypeSigs = Syn_TypeSigs {pp_Syn_TypeSigs :: PP_Doc,ppL_Syn_TypeSigs :: ([PP_Doc])} wrap_TypeSigs :: T_TypeSigs -> Inh_TypeSigs -> Syn_TypeSigs
src-derived/Code.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (Code.ag)+-- UUAGC 0.9.24 (Code.ag) module Code where {-# LINE 2 "Code.ag" #-} @@ -37,7 +37,7 @@ child left : Lhs child expr : Expr -}-data CaseAlt = CaseAlt (Lhs) (Expr) +data CaseAlt = CaseAlt (Lhs ) (Expr ) -- CaseAlts ---------------------------------------------------- {- alternatives:@@ -46,7 +46,7 @@ child tl : CaseAlts alternative Nil: -}-type CaseAlts = [(CaseAlt)]+type CaseAlts = [CaseAlt ] -- Chunk ------------------------------------------------------- {- alternatives:@@ -61,7 +61,7 @@ child semFunctions : Decls child semNames : {[String]} -}-data Chunk = Chunk (String) (Decl) (Decls) (Decls) (Decls) (Decls) (Decls) (Decls) ([String]) +data Chunk = Chunk (String) (Decl ) (Decls ) (Decls ) (Decls ) (Decls ) (Decls ) (Decls ) (([String])) -- Chunks ------------------------------------------------------ {- alternatives:@@ -70,7 +70,7 @@ child tl : Chunks alternative Nil: -}-type Chunks = [(Chunk)]+type Chunks = [Chunk ] -- DataAlt ----------------------------------------------------- {- alternatives:@@ -81,8 +81,8 @@ child name : {String} child args : NamedTypes -}-data DataAlt = DataAlt (String) (Types) - | Record (String) (NamedTypes) +data DataAlt = DataAlt (String) (Types ) + | Record (String) (NamedTypes ) -- DataAlts ---------------------------------------------------- {- alternatives:@@ -91,7 +91,7 @@ child tl : DataAlts alternative Nil: -}-type DataAlts = [(DataAlt)]+type DataAlts = [DataAlt ] -- Decl -------------------------------------------------------- {- alternatives:@@ -129,15 +129,15 @@ child params : {[String]} child tp : Type -}-data Decl = Bind (Lhs) (Expr) - | BindLet (Lhs) (Expr) +data Decl = Bind (Lhs ) (Expr ) + | BindLet (Lhs ) (Expr ) | Comment (String) - | Data (String) ([String]) (DataAlts) (Bool) ([String]) - | Decl (Lhs) (Expr) (Set String) (Set String) - | NewType (String) ([String]) (String) (Type) + | Data (String) (([String])) (DataAlts ) (Bool) (([String])) + | Decl (Lhs ) (Expr ) ((Set String)) ((Set String)) + | NewType (String) (([String])) (String) (Type ) | PragmaDecl (String) - | TSig (String) (Type) - | Type (String) ([String]) (Type) + | TSig (String) (Type ) + | Type (String) (([String])) (Type ) -- Decls ------------------------------------------------------- {- alternatives:@@ -146,7 +146,7 @@ child tl : Decls alternative Nil: -}-type Decls = [(Decl)]+type Decls = [Decl ] -- Expr -------------------------------------------------------- {- alternatives:@@ -187,19 +187,19 @@ alternative UnboxedTupleExpr: child exprs : Exprs -}-data Expr = App (String) (Exprs) - | Case (Expr) (CaseAlts) - | Do (Decls) (Expr) - | Lambda (Exprs) (Expr) - | Let (Decls) (Expr) - | LineExpr (Expr) - | PragmaExpr (Bool) (Bool) (String) (Expr) +data Expr = App (String) (Exprs ) + | Case (Expr ) (CaseAlts ) + | Do (Decls ) (Expr ) + | Lambda (Exprs ) (Expr ) + | Let (Decls ) (Expr ) + | LineExpr (Expr ) + | PragmaExpr (Bool) (Bool) (String) (Expr ) | SimpleExpr (String) - | TextExpr ([String]) - | Trace (String) (Expr) - | TupleExpr (Exprs) - | TypedExpr (Expr) (Type) - | UnboxedTupleExpr (Exprs) + | TextExpr (([String])) + | Trace (String) (Expr ) + | TupleExpr (Exprs ) + | TypedExpr (Expr ) (Type ) + | UnboxedTupleExpr (Exprs ) -- Exprs ------------------------------------------------------- {- alternatives:@@ -208,7 +208,7 @@ child tl : Exprs alternative Nil: -}-type Exprs = [(Expr)]+type Exprs = [Expr ] -- Lhs --------------------------------------------------------- {- alternatives:@@ -227,12 +227,12 @@ child name : {String} child sub : Lhs -}-data Lhs = Fun (String) (Exprs) +data Lhs = Fun (String) (Exprs ) | Pattern3 (Pattern) | Pattern3SM (Pattern) - | TupleLhs ([String]) - | UnboxedTupleLhs ([String]) - | Unwrap (String) (Lhs) + | TupleLhs (([String])) + | UnboxedTupleLhs (([String])) + | Unwrap (String) (Lhs ) -- NamedType --------------------------------------------------- {- alternatives:@@ -241,7 +241,7 @@ child name : {String} child tp : Type -}-data NamedType = Named (Bool) (String) (Type) +data NamedType = Named (Bool) (String) (Type ) -- NamedTypes -------------------------------------------------- {- alternatives:@@ -250,14 +250,14 @@ child tl : NamedTypes alternative Nil: -}-type NamedTypes = [(NamedType)]+type NamedTypes = [NamedType ] -- Program ----------------------------------------------------- {- alternatives: alternative Program: child chunks : Chunks -}-data Program = Program (Chunks) +data Program = Program (Chunks ) -- Type -------------------------------------------------------- {- alternatives:@@ -292,18 +292,18 @@ alternative UnboxedTupleType: child tps : Types -}-data Type = Arr (Type) (Type) - | CtxApp ([(String, [String])]) (Type) - | List (Type) - | NontermType (String) ([String]) +data Type = Arr (Type ) (Type ) + | CtxApp (([(String, [String])])) (Type ) + | List (Type ) + | NontermType (String) (([String])) | SimpleType (String) - | TEither (Type) (Type) - | TIntMap (Type) - | TMap (Type) (Type) - | TMaybe (Type) - | TupleType (Types) - | TypeApp (Type) (Types) - | UnboxedTupleType (Types) + | TEither (Type ) (Type ) + | TIntMap (Type ) + | TMap (Type ) (Type ) + | TMaybe (Type ) + | TupleType (Types ) + | TypeApp (Type ) (Types ) + | UnboxedTupleType (Types ) deriving ( Show) -- Types ------------------------------------------------------- {-@@ -313,4 +313,4 @@ child tl : Types alternative Nil: -}-type Types = [(Type)]+type Types = [Type ]
src-derived/CodeSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (CodeSyntax.ag)+-- UUAGC 0.9.24 (CodeSyntax.ag) module CodeSyntax where {-# LINE 2 "CodeSyntax.ag" #-} @@ -22,14 +22,14 @@ child contextMap : {ContextMap} child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Set Identifier))} -}-data CGrammar = CGrammar (TypeSyns) (Derivings) (Set NontermIdent) (CNonterminals) (PragmaMap) (ParamMap) (ContextMap) (Map NontermIdent (Map ConstructorIdent (Set Identifier))) +data CGrammar = CGrammar (TypeSyns) (Derivings) ((Set NontermIdent)) (CNonterminals ) (PragmaMap) (ParamMap) (ContextMap) ((Map NontermIdent (Map ConstructorIdent (Set Identifier)))) -- CInterface -------------------------------------------------- {- alternatives: alternative CInterface: child seg : CSegments -}-data CInterface = CInterface (CSegments) +data CInterface = CInterface (CSegments ) -- CNonterminal ------------------------------------------------ {- alternatives:@@ -41,7 +41,7 @@ child prods : CProductions child inter : CInterface -}-data CNonterminal = CNonterminal (NontermIdent) ([Identifier]) (Attributes) (Attributes) (CProductions) (CInterface) +data CNonterminal = CNonterminal (NontermIdent) (([Identifier])) (Attributes) (Attributes) (CProductions ) (CInterface ) -- CNonterminals ----------------------------------------------- {- alternatives:@@ -50,7 +50,7 @@ child tl : CNonterminals alternative Nil: -}-type CNonterminals = [(CNonterminal)]+type CNonterminals = [CNonterminal ] -- CProduction ------------------------------------------------- {- alternatives:@@ -60,7 +60,7 @@ child children : {[(Identifier,Type,Maybe (Maybe Type))]} child terminals : {[Identifier]} -}-data CProduction = CProduction (ConstructorIdent) (CVisits) ([(Identifier,Type,Maybe (Maybe Type))]) ([Identifier]) +data CProduction = CProduction (ConstructorIdent) (CVisits ) (([(Identifier,Type,Maybe (Maybe Type))])) (([Identifier])) -- CProductions ------------------------------------------------ {- alternatives:@@ -69,7 +69,7 @@ child tl : CProductions alternative Nil: -}-type CProductions = [(CProduction)]+type CProductions = [CProduction ] -- CRule ------------------------------------------------------- {- alternatives:@@ -99,7 +99,7 @@ child mbNamed : {Maybe Identifier} -} data CRule = CChildVisit (Identifier) (NontermIdent) (Int) (Attributes) (Attributes) (Bool) - | CRule (Identifier) (Bool) (Bool) (NontermIdent) (ConstructorIdent) (Identifier) (Maybe NontermIdent) (Maybe Type) (Pattern) ([String]) (Map Int (Identifier,Identifier,Maybe Type)) (Bool) (String) (Set (Identifier, Identifier)) (Bool) (Maybe Identifier) + | CRule (Identifier) (Bool) (Bool) (NontermIdent) (ConstructorIdent) (Identifier) ((Maybe NontermIdent)) ((Maybe Type)) (Pattern) (([String])) ((Map Int (Identifier,Identifier,Maybe Type))) (Bool) (String) ((Set (Identifier, Identifier))) (Bool) ((Maybe Identifier)) -- CSegment ---------------------------------------------------- {- alternatives:@@ -116,7 +116,7 @@ child tl : CSegments alternative Nil: -}-type CSegments = [(CSegment)]+type CSegments = [CSegment ] -- CVisit ------------------------------------------------------ {- alternatives:@@ -127,7 +127,7 @@ child intra : Sequence child ordered : {Bool} -}-data CVisit = CVisit (Attributes) (Attributes) (Sequence) (Sequence) (Bool) +data CVisit = CVisit (Attributes) (Attributes) (Sequence ) (Sequence ) (Bool) -- CVisits ----------------------------------------------------- {- alternatives:@@ -136,7 +136,7 @@ child tl : CVisits alternative Nil: -}-type CVisits = [(CVisit)]+type CVisits = [CVisit ] -- Sequence ---------------------------------------------------- {- alternatives:@@ -145,4 +145,4 @@ child tl : Sequence alternative Nil: -}-type Sequence = [(CRule)]+type Sequence = [CRule ]
src-derived/CodeSyntaxDump.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (CodeSyntaxDump.ag)+-- UUAGC 0.9.24 (CodeSyntaxDump.ag) module CodeSyntaxDump where {-# LINE 5 "CodeSyntaxDump.ag" #-} @@ -223,7 +223,7 @@ -- semantic domain newtype T_CNonterminals = T_CNonterminals (( PP_Doc,([PP_Doc]))) data Inh_CNonterminals = Inh_CNonterminals {}-data Syn_CNonterminals = Syn_CNonterminals {pp_Syn_CNonterminals :: PP_Doc,ppL_Syn_CNonterminals :: [PP_Doc]}+data Syn_CNonterminals = Syn_CNonterminals {pp_Syn_CNonterminals :: PP_Doc,ppL_Syn_CNonterminals :: ([PP_Doc])} wrap_CNonterminals :: T_CNonterminals -> Inh_CNonterminals -> Syn_CNonterminals @@ -335,7 +335,7 @@ -- semantic domain newtype T_CProductions = T_CProductions (( PP_Doc,([PP_Doc]))) data Inh_CProductions = Inh_CProductions {}-data Syn_CProductions = Syn_CProductions {pp_Syn_CProductions :: PP_Doc,ppL_Syn_CProductions :: [PP_Doc]}+data Syn_CProductions = Syn_CProductions {pp_Syn_CProductions :: PP_Doc,ppL_Syn_CProductions :: ([PP_Doc])} wrap_CProductions :: T_CProductions -> Inh_CProductions -> Syn_CProductions @@ -465,7 +465,7 @@ T_CRule sem_CRule_CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ (T_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_ = (T_CRule (let _lhsOpp :: PP_Doc- _patternIcopy :: Pattern+ _patternIcopy :: Pattern _patternIpp :: PP_Doc -- "CodeSyntaxDump.ag"(line 69, column 33) _lhsOpp =@@ -532,7 +532,7 @@ -- semantic domain newtype T_CSegments = T_CSegments (( PP_Doc,([PP_Doc]))) data Inh_CSegments = Inh_CSegments {}-data Syn_CSegments = Syn_CSegments {pp_Syn_CSegments :: PP_Doc,ppL_Syn_CSegments :: [PP_Doc]}+data Syn_CSegments = Syn_CSegments {pp_Syn_CSegments :: PP_Doc,ppL_Syn_CSegments :: ([PP_Doc])} wrap_CSegments :: T_CSegments -> Inh_CSegments -> Syn_CSegments @@ -648,7 +648,7 @@ -- semantic domain newtype T_CVisits = T_CVisits (( PP_Doc,([PP_Doc]))) data Inh_CVisits = Inh_CVisits {}-data Syn_CVisits = Syn_CVisits {pp_Syn_CVisits :: PP_Doc,ppL_Syn_CVisits :: [PP_Doc]}+data Syn_CVisits = Syn_CVisits {pp_Syn_CVisits :: PP_Doc,ppL_Syn_CVisits :: ([PP_Doc])} wrap_CVisits :: T_CVisits -> Inh_CVisits -> Syn_CVisits @@ -742,9 +742,9 @@ sem_Pattern (Underscore _pos ) = (sem_Pattern_Underscore _pos ) -- semantic domain-newtype T_Pattern = T_Pattern (( Pattern,PP_Doc))+newtype T_Pattern = T_Pattern (( Pattern ,PP_Doc)) data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern,pp_Syn_Pattern :: PP_Doc}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern ,pp_Syn_Pattern :: PP_Doc} wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern @@ -759,10 +759,10 @@ T_Pattern sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern- _patIcopy :: Pattern+ _lhsOcopy :: Pattern + _patIcopy :: Pattern _patIpp :: PP_Doc- _partsIcopy :: Patterns+ _partsIcopy :: Patterns _partsIpp :: PP_Doc _partsIppL :: ([PP_Doc]) -- "CodeSyntaxDump.ag"(line 75, column 33)@@ -790,8 +790,8 @@ T_Pattern sem_Pattern_Constr name_ (T_Patterns pats_ ) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern- _patsIcopy :: Patterns+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns _patsIpp :: PP_Doc _patsIppL :: ([PP_Doc]) -- "CodeSyntaxDump.ag"(line 73, column 33)@@ -816,8 +816,8 @@ T_Pattern sem_Pattern_Irrefutable (T_Pattern pat_ ) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern- _patIcopy :: Pattern+ _lhsOcopy :: Pattern + _patIcopy :: Pattern _patIpp :: PP_Doc -- use rule "CodeSyntaxDump.ag"(line 44, column 40) _lhsOpp =@@ -842,8 +842,8 @@ T_Pattern sem_Pattern_Product pos_ (T_Patterns pats_ ) = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern- _patsIcopy :: Patterns+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns _patsIpp :: PP_Doc _patsIppL :: ([PP_Doc]) -- "CodeSyntaxDump.ag"(line 74, column 33)@@ -868,7 +868,7 @@ T_Pattern sem_Pattern_Underscore pos_ = (T_Pattern (let _lhsOpp :: PP_Doc- _lhsOcopy :: Pattern+ _lhsOcopy :: Pattern -- "CodeSyntaxDump.ag"(line 76, column 25) _lhsOpp = ({-# LINE 76 "CodeSyntaxDump.ag" #-}@@ -908,9 +908,9 @@ sem_Patterns list = (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) ) -- semantic domain-newtype T_Patterns = T_Patterns (( Patterns,PP_Doc,([PP_Doc])))+newtype T_Patterns = T_Patterns (( Patterns ,PP_Doc,([PP_Doc]))) data Inh_Patterns = Inh_Patterns {}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns,pp_Syn_Patterns :: PP_Doc,ppL_Syn_Patterns :: [PP_Doc]}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns ,pp_Syn_Patterns :: PP_Doc,ppL_Syn_Patterns :: ([PP_Doc])} wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns @@ -924,10 +924,10 @@ sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) = (T_Patterns (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc- _lhsOcopy :: Patterns- _hdIcopy :: Pattern+ _lhsOcopy :: Patterns + _hdIcopy :: Pattern _hdIpp :: PP_Doc- _tlIcopy :: Patterns+ _tlIcopy :: Patterns _tlIpp :: PP_Doc _tlIppL :: ([PP_Doc]) -- "CodeSyntaxDump.ag"(line 82, column 33)@@ -959,7 +959,7 @@ sem_Patterns_Nil = (T_Patterns (let _lhsOppL :: ([PP_Doc]) _lhsOpp :: PP_Doc- _lhsOcopy :: Patterns+ _lhsOcopy :: Patterns -- "CodeSyntaxDump.ag"(line 83, column 33) _lhsOppL = ({-# LINE 83 "CodeSyntaxDump.ag" #-}@@ -1000,7 +1000,7 @@ -- semantic domain newtype T_Sequence = T_Sequence (( ([PP_Doc]))) data Inh_Sequence = Inh_Sequence {}-data Syn_Sequence = Syn_Sequence {ppL_Syn_Sequence :: [PP_Doc]}+data Syn_Sequence = Syn_Sequence {ppL_Syn_Sequence :: ([PP_Doc])} wrap_Sequence :: T_Sequence -> Inh_Sequence -> Syn_Sequence
src-derived/ConcreteSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (ConcreteSyntax.ag)+-- UUAGC 0.9.24 (ConcreteSyntax.ag) module ConcreteSyntax where {-# LINE 2 "ConcreteSyntax.ag" #-} @@ -15,7 +15,7 @@ alternative AG: child elems : Elems -}-data AG = AG (Elems) +data AG = AG (Elems ) -- Alt --------------------------------------------------------- {- alternatives:@@ -24,7 +24,7 @@ child names : ConstructorSet child fields : {Fields} -}-data Alt = Alt (Pos) (ConstructorSet) (Fields) +data Alt = Alt (Pos) (ConstructorSet ) (Fields) -- Alts -------------------------------------------------------- {- alternatives:@@ -33,7 +33,7 @@ child tl : Alts alternative Nil: -}-type Alts = [(Alt)]+type Alts = [Alt ] -- Attrs ------------------------------------------------------- {- alternatives:@@ -58,9 +58,9 @@ child set2 : ConstructorSet -} data ConstructorSet = CAll - | CDifference (ConstructorSet) (ConstructorSet) + | CDifference (ConstructorSet ) (ConstructorSet ) | CName (ConstructorIdent) - | CUnion (ConstructorSet) (ConstructorSet) + | CUnion (ConstructorSet ) (ConstructorSet ) -- Elem -------------------------------------------------------- {- alternatives:@@ -114,16 +114,16 @@ child pos : {Pos} child set : NontSet -}-data Elem = Attr (Pos) (ClassContext) (NontSet) (Attrs) - | Data (Pos) (ClassContext) (NontSet) ([Identifier]) (Attrs) (Alts) (Bool) - | Deriving (Pos) (NontSet) ([NontermIdent]) +data Elem = Attr (Pos) (ClassContext) (NontSet ) (Attrs ) + | Data (Pos) (ClassContext) (NontSet ) (([Identifier])) (Attrs ) (Alts ) (Bool) + | Deriving (Pos) (NontSet ) (([NontermIdent])) | Module (Pos) (String) (String) (String) - | Pragma (Pos) ([NontermIdent]) - | Sem (Pos) (ClassContext) (NontSet) (Attrs) (SemAlts) - | Set (Pos) (NontermIdent) (NontSet) - | Txt (Pos) (Identifier) (Maybe NontermIdent) ([String]) - | Type (Pos) (ClassContext) (NontermIdent) ([Identifier]) (ComplexType) - | Wrapper (Pos) (NontSet) + | Pragma (Pos) (([NontermIdent])) + | Sem (Pos) (ClassContext) (NontSet ) (Attrs ) (SemAlts ) + | Set (Pos) (NontermIdent) (NontSet ) + | Txt (Pos) (Identifier) ((Maybe NontermIdent)) (([String])) + | Type (Pos) (ClassContext) (NontermIdent) (([Identifier])) (ComplexType) + | Wrapper (Pos) (NontSet ) -- Elems ------------------------------------------------------- {- alternatives:@@ -132,7 +132,7 @@ child tl : Elems alternative Nil: -}-type Elems = [(Elem)]+type Elems = [Elem ] -- NontSet ----------------------------------------------------- {- alternatives:@@ -153,11 +153,11 @@ child set2 : NontSet -} data NontSet = All - | Difference (NontSet) (NontSet) - | Intersect (NontSet) (NontSet) + | Difference (NontSet ) (NontSet ) + | Intersect (NontSet ) (NontSet ) | NamedSet (NontermIdent) | Path (NontermIdent) (NontermIdent) - | Union (NontSet) (NontSet) + | Union (NontSet ) (NontSet ) -- SemAlt ------------------------------------------------------ {- alternatives:@@ -166,7 +166,7 @@ child constructorSet : ConstructorSet child rules : SemDefs -}-data SemAlt = SemAlt (Pos) (ConstructorSet) (SemDefs) +data SemAlt = SemAlt (Pos) (ConstructorSet ) (SemDefs ) -- SemAlts ----------------------------------------------------- {- alternatives:@@ -175,7 +175,7 @@ child tl : SemAlts alternative Nil: -}-type SemAlts = [(SemAlt)]+type SemAlts = [SemAlt ] -- SemDef ------------------------------------------------------ {- alternatives:@@ -204,10 +204,10 @@ child ref : {Identifier} -} data SemDef = AroundDef (Identifier) (Expression) - | AttrOrderBefore ([Occurrence]) ([Occurrence]) + | AttrOrderBefore (([Occurrence])) (([Occurrence])) | AugmentDef (Identifier) (Expression) - | Def (Pos) (Maybe Identifier) (Pattern) (Expression) (Bool) - | SemPragma ([NontermIdent]) + | Def (Pos) ((Maybe Identifier)) (Pattern) (Expression) (Bool) + | SemPragma (([NontermIdent])) | TypeDef (Identifier) (Type) | UniqueDef (Identifier) (Identifier) -- SemDefs -----------------------------------------------------@@ -218,4 +218,4 @@ child tl : SemDefs alternative Nil: -}-type SemDefs = [(SemDef)]+type SemDefs = [SemDef ]
src-derived/DeclBlocks.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (DeclBlocks.ag)+-- UUAGC 0.9.24 (DeclBlocks.ag) module DeclBlocks where {-# LINE 2 "DeclBlocks.ag" #-} @@ -17,12 +17,12 @@ child defs : {[Decl]} child result : {Expr} -}-data DeclBlocks = DeclBlock ([Decl]) (Decl) (DeclBlocks) - | DeclTerminator ([Decl]) (Expr) +data DeclBlocks = DeclBlock (([Decl])) (Decl) (DeclBlocks ) + | DeclTerminator (([Decl])) (Expr) -- DeclBlocksRoot ---------------------------------------------- {- alternatives: alternative DeclBlocksRoot: child blocks : DeclBlocks -}-data DeclBlocksRoot = DeclBlocksRoot (DeclBlocks) +data DeclBlocksRoot = DeclBlocksRoot (DeclBlocks )
src-derived/DefaultRules.hs view
@@ -1,6 +1,6 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.21 (DefaultRules.ag)+-- UUAGC 0.9.24 (DefaultRules.ag) module DefaultRules where {-# LINE 10 "DefaultRules.ag" #-} @@ -382,9 +382,9 @@ newtype T_Child = T_Child (ConstructorIdent -> Bool -> NontermIdent ->- ( (Seq Error),( (Identifier,Type,Maybe (Maybe Type)) ),Attributes,Identifier,Child,Attributes))+ ( (Seq Error),( (Identifier,Type,Maybe (Maybe Type)) ),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,Maybe (Maybe Type)) ),inherited_Syn_Child :: !(Attributes),name_Syn_Child :: !(Identifier),output_Syn_Child :: !(Child),synthesized_Syn_Child :: !(Attributes)}+data Syn_Child = Syn_Child {errors_Syn_Child :: !((Seq Error)),field_Syn_Child :: !(( (Identifier,Type,Maybe (Maybe Type)) )),inherited_Syn_Child :: !(Attributes),name_Syn_Child :: !(Identifier),output_Syn_Child :: !(Child ),synthesized_Syn_Child :: !(Attributes)} wrap_Child :: T_Child -> Inh_Child -> Syn_Child @@ -463,9 +463,9 @@ newtype T_Children = T_Children (ConstructorIdent -> Bool -> NontermIdent ->- ( (Seq Error),([(Identifier,Type,Maybe (Maybe Type))]),([(Identifier, Attributes)]),Children,([(Identifier, Attributes)])))+ ( (Seq Error),([(Identifier,Type,Maybe (Maybe Type))]),([(Identifier, Attributes)]),Children ,([(Identifier, Attributes)]))) data Inh_Children = Inh_Children {con_Inh_Children :: !(ConstructorIdent),cr_Inh_Children :: !(Bool),nt_Inh_Children :: !(NontermIdent)}-data Syn_Children = Syn_Children {errors_Syn_Children :: !(Seq Error),fields_Syn_Children :: !([(Identifier,Type,Maybe (Maybe Type))]),inputs_Syn_Children :: !([(Identifier, Attributes)]),output_Syn_Children :: !(Children),outputs_Syn_Children :: !([(Identifier, Attributes)])}+data Syn_Children = Syn_Children {errors_Syn_Children :: !((Seq Error)),fields_Syn_Children :: !(([(Identifier,Type,Maybe (Maybe Type))])),inputs_Syn_Children :: !(([(Identifier, Attributes)])),output_Syn_Children :: !(Children ),outputs_Syn_Children :: !(([(Identifier, Attributes)]))} wrap_Children :: T_Children -> Inh_Children -> Syn_Children @@ -595,9 +595,9 @@ (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))+ ( (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)}+data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: !((Seq Error)),output_Syn_Grammar :: !(Grammar )} wrap_Grammar :: T_Grammar -> Inh_Grammar -> Syn_Grammar @@ -721,9 +721,9 @@ 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)}+ ( (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 @@ -744,100 +744,95 @@ Set.singleton nt_ {-# LINE 746 "DefaultRules.hs" #-})) of { !_lhsOcollect_nts ->- (case ((sem_Nonterminal_Nonterminal_1 nt_ syn_ inh_ (T_Productions prods_ ) params_ )) of+ (case ((let sem_Nonterminal_Nonterminal_1 :: T_Nonterminal_1 + sem_Nonterminal_Nonterminal_1 =+ (T_Nonterminal_1 (\ (!_lhsIaroundsIn)+ (!_lhsIaugmentsIn)+ (!_lhsIcr)+ (!_lhsImanualAttrOrderMap)+ (!_lhsInonterminals)+ (!_lhsIo_rename)+ (!_lhsItypeSyns)+ (!_lhsIuniq)+ (!_lhsIuseMap) ->+ (case (({-# LINE 55 "DefaultRules.ag" #-}+ _lhsItypeSyns+ {-# LINE 761 "DefaultRules.hs" #-})) of+ { !_prodsOtypeSyns ->+ (case (({-# LINE 43 "DefaultRules.ag" #-}+ _lhsIo_rename+ {-# LINE 765 "DefaultRules.hs" #-})) of+ { !_prodsOo_rename ->+ (case (({-# LINE 569 "DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 769 "DefaultRules.hs" #-})) of+ { !_prodsOmanualAttrOrderMap ->+ (case (({-# LINE 44 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 773 "DefaultRules.hs" #-})) of+ { !_prodsOcr ->+ (case (({-# LINE 152 "DefaultRules.ag" #-}+ nt_+ {-# LINE 777 "DefaultRules.hs" #-})) of+ { !_prodsOnt ->+ (case (({-# LINE 140 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIuseMap+ {-# LINE 781 "DefaultRules.hs" #-})) of+ { !_prodsOuseMap ->+ (case (({-# LINE 139 "DefaultRules.ag" #-}+ syn_+ {-# LINE 785 "DefaultRules.hs" #-})) of+ { !_prodsOsyn ->+ (case (({-# LINE 138 "DefaultRules.ag" #-}+ inh_+ {-# LINE 789 "DefaultRules.hs" #-})) of+ { !_prodsOinh ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 793 "DefaultRules.hs" #-})) of+ { !_prodsOuniq ->+ (case (({-# LINE 125 "DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 797 "DefaultRules.hs" #-})) of+ { !_prodsOnonterminals ->+ (case (({-# LINE 640 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn+ {-# LINE 801 "DefaultRules.hs" #-})) of+ { !_augmentsIn ->+ (case (({-# LINE 637 "DefaultRules.ag" #-}+ _augmentsIn+ {-# LINE 805 "DefaultRules.hs" #-})) of+ { !_prodsOaugmentsIn ->+ (case (({-# LINE 647 "DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundsIn+ {-# LINE 809 "DefaultRules.hs" #-})) of+ { !_aroundsIn ->+ (case (({-# LINE 644 "DefaultRules.ag" #-}+ _aroundsIn+ {-# LINE 813 "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 819 "DefaultRules.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 489 "DefaultRules.ag" #-}+ Nonterminal nt_ params_ inh_ syn_ _prodsIoutput+ {-# LINE 823 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 489 "DefaultRules.ag" #-}+ _output+ {-# LINE 827 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _prodsIuniq+ {-# LINE 831 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Nonterminal_Nonterminal_1)) 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 769 "DefaultRules.hs" #-})) of- { !_prodsOtypeSyns ->- (case (({-# LINE 43 "DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 773 "DefaultRules.hs" #-})) of- { !_prodsOo_rename ->- (case (({-# LINE 569 "DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 777 "DefaultRules.hs" #-})) of- { !_prodsOmanualAttrOrderMap ->- (case (({-# LINE 44 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 781 "DefaultRules.hs" #-})) of- { !_prodsOcr ->- (case (({-# LINE 152 "DefaultRules.ag" #-}- nt_- {-# LINE 785 "DefaultRules.hs" #-})) of- { !_prodsOnt ->- (case (({-# LINE 140 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIuseMap- {-# LINE 789 "DefaultRules.hs" #-})) of- { !_prodsOuseMap ->- (case (({-# LINE 139 "DefaultRules.ag" #-}- syn_- {-# LINE 793 "DefaultRules.hs" #-})) of- { !_prodsOsyn ->- (case (({-# LINE 138 "DefaultRules.ag" #-}- inh_- {-# LINE 797 "DefaultRules.hs" #-})) of- { !_prodsOinh ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 801 "DefaultRules.hs" #-})) of- { !_prodsOuniq ->- (case (({-# LINE 125 "DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 805 "DefaultRules.hs" #-})) of- { !_prodsOnonterminals ->- (case (({-# LINE 640 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn- {-# LINE 809 "DefaultRules.hs" #-})) of- { !_augmentsIn ->- (case (({-# LINE 637 "DefaultRules.ag" #-}- _augmentsIn- {-# LINE 813 "DefaultRules.hs" #-})) of- { !_prodsOaugmentsIn ->- (case (({-# LINE 647 "DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundsIn- {-# LINE 817 "DefaultRules.hs" #-})) of- { !_aroundsIn ->- (case (({-# LINE 644 "DefaultRules.ag" #-}- _aroundsIn- {-# LINE 821 "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 827 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 489 "DefaultRules.ag" #-}- Nonterminal nt_ params_ inh_ syn_ _prodsIoutput- {-# LINE 831 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 489 "DefaultRules.ag" #-}- _output- {-# LINE 835 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _prodsIuniq- {-# LINE 839 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) ) -- Nonterminals ------------------------------------------------ {- visit 0:@@ -884,9 +879,9 @@ 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)}+ ( (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 @@ -906,154 +901,152 @@ { ( !_hdIcollect_nts,!T_Nonterminal_1 hd_1) -> (case (({-# LINE 121 "DefaultRules.ag" #-} _hdIcollect_nts `Set.union` _tlIcollect_nts- {-# LINE 910 "DefaultRules.hs" #-})) of+ {-# LINE 905 "DefaultRules.hs" #-})) of { !_lhsOcollect_nts ->- (case ((sem_Nonterminals_Cons_1 (T_Nonterminal_1 hd_1 ) (T_Nonterminals_1 tl_1 ) )) of+ (case ((let sem_Nonterminals_Cons_1 :: T_Nonterminals_1 + sem_Nonterminals_Cons_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 569 "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 569 "DefaultRules.ag" #-}+ _lhsImanualAttrOrderMap+ {-# LINE 952 "DefaultRules.hs" #-})) of+ { !_hdOmanualAttrOrderMap ->+ (case (({-# LINE 44 "DefaultRules.ag" #-}+ _lhsIcr+ {-# LINE 956 "DefaultRules.hs" #-})) of+ { !_hdOcr ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 960 "DefaultRules.hs" #-})) of+ { !_hdOuniq ->+ (case (({-# LINE 125 "DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 964 "DefaultRules.hs" #-})) of+ { !_hdOnonterminals ->+ (case (({-# LINE 636 "DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 968 "DefaultRules.hs" #-})) of+ { !_hdOaugmentsIn ->+ (case (({-# LINE 643 "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 482 "DefaultRules.ag" #-}+ _hdIuniq+ {-# LINE 978 "DefaultRules.hs" #-})) of+ { !_tlOuniq ->+ (case (({-# LINE 125 "DefaultRules.ag" #-}+ _lhsInonterminals+ {-# LINE 982 "DefaultRules.hs" #-})) of+ { !_tlOnonterminals ->+ (case (({-# LINE 636 "DefaultRules.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 986 "DefaultRules.hs" #-})) of+ { !_tlOaugmentsIn ->+ (case (({-# LINE 643 "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 489 "DefaultRules.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1000 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 489 "DefaultRules.ag" #-}+ _output+ {-# LINE 1004 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _tlIuniq+ {-# LINE 1008 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Nonterminals_Cons_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 930 "DefaultRules.hs" #-})) of- { !_tlOuseMap ->- (case (({-# LINE 55 "DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 934 "DefaultRules.hs" #-})) of- { !_tlOtypeSyns ->- (case (({-# LINE 43 "DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 938 "DefaultRules.hs" #-})) of- { !_tlOo_rename ->- (case (({-# LINE 569 "DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 942 "DefaultRules.hs" #-})) of- { !_tlOmanualAttrOrderMap ->- (case (({-# LINE 44 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 946 "DefaultRules.hs" #-})) of- { !_tlOcr ->- (case (({-# LINE 134 "DefaultRules.ag" #-}- _lhsIuseMap- {-# LINE 950 "DefaultRules.hs" #-})) of- { !_hdOuseMap ->- (case (({-# LINE 55 "DefaultRules.ag" #-}- _lhsItypeSyns- {-# LINE 954 "DefaultRules.hs" #-})) of- { !_hdOtypeSyns ->- (case (({-# LINE 43 "DefaultRules.ag" #-}- _lhsIo_rename- {-# LINE 958 "DefaultRules.hs" #-})) of- { !_hdOo_rename ->- (case (({-# LINE 569 "DefaultRules.ag" #-}- _lhsImanualAttrOrderMap- {-# LINE 962 "DefaultRules.hs" #-})) of- { !_hdOmanualAttrOrderMap ->- (case (({-# LINE 44 "DefaultRules.ag" #-}- _lhsIcr- {-# LINE 966 "DefaultRules.hs" #-})) of- { !_hdOcr ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 970 "DefaultRules.hs" #-})) of- { !_hdOuniq ->- (case (({-# LINE 125 "DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 974 "DefaultRules.hs" #-})) of- { !_hdOnonterminals ->- (case (({-# LINE 636 "DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 978 "DefaultRules.hs" #-})) of- { !_hdOaugmentsIn ->- (case (({-# LINE 643 "DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 982 "DefaultRules.hs" #-})) of- { !_hdOaroundsIn ->- (case ((hd_1 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOmanualAttrOrderMap _hdOnonterminals _hdOo_rename _hdOtypeSyns _hdOuniq _hdOuseMap )) of- { ( !_hdIerrors,!_hdIoutput,!_hdIuniq) ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _hdIuniq- {-# LINE 988 "DefaultRules.hs" #-})) of- { !_tlOuniq ->- (case (({-# LINE 125 "DefaultRules.ag" #-}- _lhsInonterminals- {-# LINE 992 "DefaultRules.hs" #-})) of- { !_tlOnonterminals ->- (case (({-# LINE 636 "DefaultRules.ag" #-}- _lhsIaugmentsIn- {-# LINE 996 "DefaultRules.hs" #-})) of- { !_tlOaugmentsIn ->- (case (({-# LINE 643 "DefaultRules.ag" #-}- _lhsIaroundsIn- {-# LINE 1000 "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 1006 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 489 "DefaultRules.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 1010 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 489 "DefaultRules.ag" #-}- _output- {-# LINE 1014 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _tlIuniq- {-# LINE 1018 "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 1025 "DefaultRules.hs" #-})) of+ {-# LINE 1018 "DefaultRules.hs" #-})) of { !_lhsOcollect_nts ->- (case ((sem_Nonterminals_Nil_1 )) of+ (case ((let 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 489 "DefaultRules.ag" #-}+ []+ {-# LINE 1037 "DefaultRules.hs" #-})) of+ { !_output ->+ (case (({-# LINE 489 "DefaultRules.ag" #-}+ _output+ {-# LINE 1041 "DefaultRules.hs" #-})) of+ { !_lhsOoutput ->+ (case (({-# LINE 482 "DefaultRules.ag" #-}+ _lhsIuniq+ {-# LINE 1045 "DefaultRules.hs" #-})) of+ { !_lhsOuniq ->+ ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) )+ in 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 1043 "DefaultRules.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 489 "DefaultRules.ag" #-}- []- {-# LINE 1047 "DefaultRules.hs" #-})) of- { !_output ->- (case (({-# LINE 489 "DefaultRules.ag" #-}- _output- {-# LINE 1051 "DefaultRules.hs" #-})) of- { !_lhsOoutput ->- (case (({-# LINE 482 "DefaultRules.ag" #-}- _lhsIuniq- {-# LINE 1055 "DefaultRules.hs" #-})) of- { !_lhsOuniq ->- ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) ) -- Pattern ----------------------------------------------------- {- visit 0:@@ -1115,9 +1108,9 @@ -- semantic domain newtype T_Pattern = T_Pattern (ConstructorIdent -> NontermIdent ->- ( Bool,Pattern,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Pattern))+ ( 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)}+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 @@ -1135,57 +1128,57 @@ (!_lhsInt) -> (case (({-# LINE 476 "DefaultRules.ag" #-} True- {-# LINE 1139 "DefaultRules.hs" #-})) of+ {-# LINE 1132 "DefaultRules.hs" #-})) of { !_lhsOcontainsVars -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1143 "DefaultRules.hs" #-})) of+ {-# LINE 1136 "DefaultRules.hs" #-})) of { !_partsOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 1147 "DefaultRules.hs" #-})) of+ {-# LINE 1140 "DefaultRules.hs" #-})) of { !_partsOcon -> (case ((parts_ _partsOcon _partsOnt )) of { ( !_partsIcontainsVars,!_partsIcopy,!_partsIdefinedAttrs,!_partsIerrors,!_partsIlocals,!_partsIoutput) -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1153 "DefaultRules.hs" #-})) of+ {-# LINE 1146 "DefaultRules.hs" #-})) of { !_patOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 1157 "DefaultRules.hs" #-})) of+ {-# LINE 1150 "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 1163 "DefaultRules.hs" #-})) of+ {-# LINE 1156 "DefaultRules.hs" #-})) of { !_copy -> (case (({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 1167 "DefaultRules.hs" #-})) of+ {-# LINE 1160 "DefaultRules.hs" #-})) of { !_lhsOcopy -> (case (({-# LINE 458 "DefaultRules.ag" #-} Set.insert (field_,attr_) _patIdefinedAttrs- {-# LINE 1171 "DefaultRules.hs" #-})) of+ {-# LINE 1164 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} _patIerrors Seq.>< _partsIerrors- {-# LINE 1175 "DefaultRules.hs" #-})) of+ {-# LINE 1168 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 459 "DefaultRules.ag" #-} if field_ == _LOC then Set.insert attr_ _patIlocals else _patIlocals- {-# LINE 1181 "DefaultRules.hs" #-})) of+ {-# LINE 1174 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 489 "DefaultRules.ag" #-} Alias field_ attr_ _patIoutput _partsIoutput- {-# LINE 1185 "DefaultRules.hs" #-})) of+ {-# LINE 1178 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 1189 "DefaultRules.hs" #-})) of+ {-# LINE 1182 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) ) sem_Pattern_Constr :: ConstructorIdent ->@@ -1196,45 +1189,45 @@ (!_lhsInt) -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1200 "DefaultRules.hs" #-})) of+ {-# LINE 1193 "DefaultRules.hs" #-})) of { !_patsOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 1204 "DefaultRules.hs" #-})) of+ {-# LINE 1197 "DefaultRules.hs" #-})) of { !_patsOcon -> (case ((pats_ _patsOcon _patsOnt )) of { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) -> (case (({-# LINE 473 "DefaultRules.ag" #-} _patsIcontainsVars- {-# LINE 1210 "DefaultRules.hs" #-})) of+ {-# LINE 1203 "DefaultRules.hs" #-})) of { !_lhsOcontainsVars -> (case (({-# LINE 23 "./Patterns.ag" #-} Constr name_ _patsIcopy- {-# LINE 1214 "DefaultRules.hs" #-})) of+ {-# LINE 1207 "DefaultRules.hs" #-})) of { !_copy -> (case (({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 1218 "DefaultRules.hs" #-})) of+ {-# LINE 1211 "DefaultRules.hs" #-})) of { !_lhsOcopy -> (case (({-# LINE 453 "DefaultRules.ag" #-} _patsIdefinedAttrs- {-# LINE 1222 "DefaultRules.hs" #-})) of+ {-# LINE 1215 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} _patsIerrors- {-# LINE 1226 "DefaultRules.hs" #-})) of+ {-# LINE 1219 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 452 "DefaultRules.ag" #-} _patsIlocals- {-# LINE 1230 "DefaultRules.hs" #-})) of+ {-# LINE 1223 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 489 "DefaultRules.ag" #-} Constr name_ _patsIoutput- {-# LINE 1234 "DefaultRules.hs" #-})) of+ {-# LINE 1227 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 1238 "DefaultRules.hs" #-})) of+ {-# LINE 1231 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) ) sem_Pattern_Irrefutable :: T_Pattern ->@@ -1244,45 +1237,45 @@ (!_lhsInt) -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1248 "DefaultRules.hs" #-})) of+ {-# LINE 1241 "DefaultRules.hs" #-})) of { !_patOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 1252 "DefaultRules.hs" #-})) of+ {-# LINE 1245 "DefaultRules.hs" #-})) of { !_patOcon -> (case ((pat_ _patOcon _patOnt )) of { ( !_patIcontainsVars,!_patIcopy,!_patIdefinedAttrs,!_patIerrors,!_patIlocals,!_patIoutput) -> (case (({-# LINE 473 "DefaultRules.ag" #-} _patIcontainsVars- {-# LINE 1258 "DefaultRules.hs" #-})) of+ {-# LINE 1251 "DefaultRules.hs" #-})) of { !_lhsOcontainsVars -> (case (({-# LINE 23 "./Patterns.ag" #-} Irrefutable _patIcopy- {-# LINE 1262 "DefaultRules.hs" #-})) of+ {-# LINE 1255 "DefaultRules.hs" #-})) of { !_copy -> (case (({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 1266 "DefaultRules.hs" #-})) of+ {-# LINE 1259 "DefaultRules.hs" #-})) of { !_lhsOcopy -> (case (({-# LINE 453 "DefaultRules.ag" #-} _patIdefinedAttrs- {-# LINE 1270 "DefaultRules.hs" #-})) of+ {-# LINE 1263 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} _patIerrors- {-# LINE 1274 "DefaultRules.hs" #-})) of+ {-# LINE 1267 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 452 "DefaultRules.ag" #-} _patIlocals- {-# LINE 1278 "DefaultRules.hs" #-})) of+ {-# LINE 1271 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 489 "DefaultRules.ag" #-} Irrefutable _patIoutput- {-# LINE 1282 "DefaultRules.hs" #-})) of+ {-# LINE 1275 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 1286 "DefaultRules.hs" #-})) of+ {-# LINE 1279 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) ) sem_Pattern_Product :: Pos ->@@ -1293,45 +1286,45 @@ (!_lhsInt) -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1297 "DefaultRules.hs" #-})) of+ {-# LINE 1290 "DefaultRules.hs" #-})) of { !_patsOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 1301 "DefaultRules.hs" #-})) of+ {-# LINE 1294 "DefaultRules.hs" #-})) of { !_patsOcon -> (case ((pats_ _patsOcon _patsOnt )) of { ( !_patsIcontainsVars,!_patsIcopy,!_patsIdefinedAttrs,!_patsIerrors,!_patsIlocals,!_patsIoutput) -> (case (({-# LINE 473 "DefaultRules.ag" #-} _patsIcontainsVars- {-# LINE 1307 "DefaultRules.hs" #-})) of+ {-# LINE 1300 "DefaultRules.hs" #-})) of { !_lhsOcontainsVars -> (case (({-# LINE 23 "./Patterns.ag" #-} Product pos_ _patsIcopy- {-# LINE 1311 "DefaultRules.hs" #-})) of+ {-# LINE 1304 "DefaultRules.hs" #-})) of { !_copy -> (case (({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 1315 "DefaultRules.hs" #-})) of+ {-# LINE 1308 "DefaultRules.hs" #-})) of { !_lhsOcopy -> (case (({-# LINE 453 "DefaultRules.ag" #-} _patsIdefinedAttrs- {-# LINE 1319 "DefaultRules.hs" #-})) of+ {-# LINE 1312 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} _patsIerrors- {-# LINE 1323 "DefaultRules.hs" #-})) of+ {-# LINE 1316 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 452 "DefaultRules.ag" #-} _patsIlocals- {-# LINE 1327 "DefaultRules.hs" #-})) of+ {-# LINE 1320 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 489 "DefaultRules.ag" #-} Product pos_ _patsIoutput- {-# LINE 1331 "DefaultRules.hs" #-})) of+ {-# LINE 1324 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 1335 "DefaultRules.hs" #-})) of+ {-# LINE 1328 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) })) ) sem_Pattern_Underscore :: Pos ->@@ -1341,35 +1334,35 @@ (!_lhsInt) -> (case (({-# LINE 473 "DefaultRules.ag" #-} False- {-# LINE 1345 "DefaultRules.hs" #-})) of+ {-# LINE 1338 "DefaultRules.hs" #-})) of { !_lhsOcontainsVars -> (case (({-# LINE 23 "./Patterns.ag" #-} Underscore pos_- {-# LINE 1349 "DefaultRules.hs" #-})) of+ {-# LINE 1342 "DefaultRules.hs" #-})) of { !_copy -> (case (({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 1353 "DefaultRules.hs" #-})) of+ {-# LINE 1346 "DefaultRules.hs" #-})) of { !_lhsOcopy -> (case (({-# LINE 453 "DefaultRules.ag" #-} Set.empty- {-# LINE 1357 "DefaultRules.hs" #-})) of+ {-# LINE 1350 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} Seq.empty- {-# LINE 1361 "DefaultRules.hs" #-})) of+ {-# LINE 1354 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 452 "DefaultRules.ag" #-} Set.empty- {-# LINE 1365 "DefaultRules.hs" #-})) of+ {-# LINE 1358 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 489 "DefaultRules.ag" #-} Underscore pos_- {-# LINE 1369 "DefaultRules.hs" #-})) of+ {-# LINE 1362 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 1373 "DefaultRules.hs" #-})) of+ {-# LINE 1366 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })) ) -- Patterns ----------------------------------------------------@@ -1405,9 +1398,9 @@ -- semantic domain newtype T_Patterns = T_Patterns (ConstructorIdent -> NontermIdent ->- ( Bool,Patterns,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Patterns))+ ( 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)}+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 @@ -1423,55 +1416,55 @@ (!_lhsInt) -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1427 "DefaultRules.hs" #-})) of+ {-# LINE 1420 "DefaultRules.hs" #-})) of { !_tlOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 1431 "DefaultRules.hs" #-})) of+ {-# LINE 1424 "DefaultRules.hs" #-})) of { !_tlOcon -> (case ((tl_ _tlOcon _tlOnt )) of { ( !_tlIcontainsVars,!_tlIcopy,!_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput) -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1437 "DefaultRules.hs" #-})) of+ {-# LINE 1430 "DefaultRules.hs" #-})) of { !_hdOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 1441 "DefaultRules.hs" #-})) of+ {-# LINE 1434 "DefaultRules.hs" #-})) of { !_hdOcon -> (case ((hd_ _hdOcon _hdOnt )) of { ( !_hdIcontainsVars,!_hdIcopy,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput) -> (case (({-# LINE 473 "DefaultRules.ag" #-} _hdIcontainsVars || _tlIcontainsVars- {-# LINE 1447 "DefaultRules.hs" #-})) of+ {-# LINE 1440 "DefaultRules.hs" #-})) of { !_lhsOcontainsVars -> (case (({-# LINE 23 "./Patterns.ag" #-} (:) _hdIcopy _tlIcopy- {-# LINE 1451 "DefaultRules.hs" #-})) of+ {-# LINE 1444 "DefaultRules.hs" #-})) of { !_copy -> (case (({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 1455 "DefaultRules.hs" #-})) of+ {-# LINE 1448 "DefaultRules.hs" #-})) of { !_lhsOcopy -> (case (({-# LINE 453 "DefaultRules.ag" #-} _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs- {-# LINE 1459 "DefaultRules.hs" #-})) of+ {-# LINE 1452 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} _hdIerrors Seq.>< _tlIerrors- {-# LINE 1463 "DefaultRules.hs" #-})) of+ {-# LINE 1456 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 452 "DefaultRules.ag" #-} _hdIlocals `Set.union` _tlIlocals- {-# LINE 1467 "DefaultRules.hs" #-})) of+ {-# LINE 1460 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 489 "DefaultRules.ag" #-} (:) _hdIoutput _tlIoutput- {-# LINE 1471 "DefaultRules.hs" #-})) of+ {-# LINE 1464 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 1475 "DefaultRules.hs" #-})) of+ {-# LINE 1468 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) })) ) sem_Patterns_Nil :: T_Patterns @@ -1480,35 +1473,35 @@ (!_lhsInt) -> (case (({-# LINE 473 "DefaultRules.ag" #-} False- {-# LINE 1484 "DefaultRules.hs" #-})) of+ {-# LINE 1477 "DefaultRules.hs" #-})) of { !_lhsOcontainsVars -> (case (({-# LINE 23 "./Patterns.ag" #-} []- {-# LINE 1488 "DefaultRules.hs" #-})) of+ {-# LINE 1481 "DefaultRules.hs" #-})) of { !_copy -> (case (({-# LINE 23 "./Patterns.ag" #-} _copy- {-# LINE 1492 "DefaultRules.hs" #-})) of+ {-# LINE 1485 "DefaultRules.hs" #-})) of { !_lhsOcopy -> (case (({-# LINE 453 "DefaultRules.ag" #-} Set.empty- {-# LINE 1496 "DefaultRules.hs" #-})) of+ {-# LINE 1489 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} Seq.empty- {-# LINE 1500 "DefaultRules.hs" #-})) of+ {-# LINE 1493 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 452 "DefaultRules.ag" #-} Set.empty- {-# LINE 1504 "DefaultRules.hs" #-})) of+ {-# LINE 1497 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 489 "DefaultRules.ag" #-} []- {-# LINE 1508 "DefaultRules.hs" #-})) of+ {-# LINE 1501 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 1512 "DefaultRules.hs" #-})) of+ {-# LINE 1505 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOcontainsVars,_lhsOcopy,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput) }) }) }) }) }) }) }) })) ) -- Production --------------------------------------------------@@ -1566,9 +1559,9 @@ 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)}+ ( (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 @@ -1596,33 +1589,33 @@ (!_lhsIuseMap) -> (case (({-# LINE 583 "DefaultRules.ag" #-} Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrOrderMap- {-# LINE 1600 "DefaultRules.hs" #-})) of+ {-# LINE 1593 "DefaultRules.hs" #-})) of { !_orderDeps -> (case (({-# LINE 482 "DefaultRules.ag" #-} _lhsIuniq- {-# LINE 1604 "DefaultRules.hs" #-})) of+ {-# LINE 1597 "DefaultRules.hs" #-})) of { !_rulesOuniq -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1608 "DefaultRules.hs" #-})) of+ {-# LINE 1601 "DefaultRules.hs" #-})) of { !_rulesOnt -> (case (({-# LINE 143 "DefaultRules.ag" #-} con_- {-# LINE 1612 "DefaultRules.hs" #-})) of+ {-# LINE 1605 "DefaultRules.hs" #-})) of { !_rulesOcon -> (case ((rules_ _rulesOcon _rulesOnt _rulesOuniq )) of { ( !_rulesIdefinedAttrs,!_rulesIerrors,!_rulesIlocals,!_rulesIoutput,!_rulesIruleNames,!_rulesIuniq) -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1618 "DefaultRules.hs" #-})) of+ {-# LINE 1611 "DefaultRules.hs" #-})) of { !_childrenOnt -> (case (({-# LINE 47 "DefaultRules.ag" #-} _lhsIcr- {-# LINE 1622 "DefaultRules.hs" #-})) of+ {-# LINE 1615 "DefaultRules.hs" #-})) of { !_childrenOcr -> (case (({-# LINE 144 "DefaultRules.ag" #-} con_- {-# LINE 1626 "DefaultRules.hs" #-})) of+ {-# LINE 1619 "DefaultRules.hs" #-})) of { !_childrenOcon -> (case ((children_ _childrenOcon _childrenOcr _childrenOnt )) of { ( !_childrenIerrors,!_childrenIfields,!_childrenIinputs,!_childrenIoutput,!_childrenIoutputs) ->@@ -1662,7 +1655,7 @@ [ checkIn occA ++ checkOut occB | (Dependency occA occB) <- _orderDeps ]- {-# LINE 1666 "DefaultRules.hs" #-})) of+ {-# LINE 1659 "DefaultRules.hs" #-})) of { !_orderErrs -> (case (({-# LINE 330 "DefaultRules.ag" #-} let locals = _rulesIlocals@@ -1721,45 +1714,45 @@ locals (lhs_env, (_LHS, others)) in (uRules++selfLocRules++selfRules++rules5++rules1, errors1><errs5)- {-# LINE 1725 "DefaultRules.hs" #-})) of+ {-# LINE 1718 "DefaultRules.hs" #-})) of { !__tup1 -> (case (({-# LINE 330 "DefaultRules.ag" #-} __tup1- {-# LINE 1729 "DefaultRules.hs" #-})) of+ {-# LINE 1722 "DefaultRules.hs" #-})) of { !(_,!_errs) -> (case (({-# LINE 328 "DefaultRules.ag" #-} _childrenIerrors >< _errs >< _rulesIerrors >< _orderErrs- {-# LINE 1733 "DefaultRules.hs" #-})) of+ {-# LINE 1726 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 648 "DefaultRules.ag" #-} Map.findWithDefault Map.empty con_ _lhsIaroundsIn- {-# LINE 1737 "DefaultRules.hs" #-})) of+ {-# LINE 1730 "DefaultRules.hs" #-})) of { !_aroundsIn -> (case (({-# LINE 641 "DefaultRules.ag" #-} Map.findWithDefault Map.empty con_ _lhsIaugmentsIn- {-# LINE 1741 "DefaultRules.hs" #-})) of+ {-# LINE 1734 "DefaultRules.hs" #-})) of { !_augmentsIn -> (case (({-# LINE 330 "DefaultRules.ag" #-} __tup1- {-# LINE 1745 "DefaultRules.hs" #-})) of+ {-# LINE 1738 "DefaultRules.hs" #-})) of { !(!_newRls,_) -> (case (({-# LINE 496 "DefaultRules.ag" #-} foldr addAugments (_rulesIoutput ++ _newRls) (Map.assocs _augmentsIn )- {-# LINE 1749 "DefaultRules.hs" #-})) of+ {-# LINE 1742 "DefaultRules.hs" #-})) of { !_extra1 -> (case (({-# LINE 497 "DefaultRules.ag" #-} foldr addArounds _extra1 (Map.assocs _aroundsIn )- {-# LINE 1753 "DefaultRules.hs" #-})) of+ {-# LINE 1746 "DefaultRules.hs" #-})) of { !_extra2 -> (case ((typeSigs_ )) of { ( !_typeSigsIoutput) -> (case (({-# LINE 498 "DefaultRules.ag" #-} Production con_ _childrenIoutput _extra2 _typeSigsIoutput- {-# LINE 1759 "DefaultRules.hs" #-})) of+ {-# LINE 1752 "DefaultRules.hs" #-})) of { !_lhsOoutput -> (case (({-# LINE 482 "DefaultRules.ag" #-} _rulesIuniq- {-# LINE 1763 "DefaultRules.hs" #-})) of+ {-# LINE 1756 "DefaultRules.hs" #-})) of { !_lhsOuniq -> ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) ) -- Productions -------------------------------------------------@@ -1810,9 +1803,9 @@ 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)}+ ( (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 @@ -1838,119 +1831,119 @@ (!_lhsIuseMap) -> (case (({-# LINE 135 "DefaultRules.ag" #-} _lhsIuseMap- {-# LINE 1842 "DefaultRules.hs" #-})) of+ {-# LINE 1835 "DefaultRules.hs" #-})) of { !_tlOuseMap -> (case (({-# LINE 55 "DefaultRules.ag" #-} _lhsItypeSyns- {-# LINE 1846 "DefaultRules.hs" #-})) of+ {-# LINE 1839 "DefaultRules.hs" #-})) of { !_tlOtypeSyns -> (case (({-# LINE 135 "DefaultRules.ag" #-} _lhsIsyn- {-# LINE 1850 "DefaultRules.hs" #-})) of+ {-# LINE 1843 "DefaultRules.hs" #-})) of { !_tlOsyn -> (case (({-# LINE 43 "DefaultRules.ag" #-} _lhsIo_rename- {-# LINE 1854 "DefaultRules.hs" #-})) of+ {-# LINE 1847 "DefaultRules.hs" #-})) of { !_tlOo_rename -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1858 "DefaultRules.hs" #-})) of+ {-# LINE 1851 "DefaultRules.hs" #-})) of { !_tlOnt -> (case (({-# LINE 569 "DefaultRules.ag" #-} _lhsImanualAttrOrderMap- {-# LINE 1862 "DefaultRules.hs" #-})) of+ {-# LINE 1855 "DefaultRules.hs" #-})) of { !_tlOmanualAttrOrderMap -> (case (({-# LINE 135 "DefaultRules.ag" #-} _lhsIinh- {-# LINE 1866 "DefaultRules.hs" #-})) of+ {-# LINE 1859 "DefaultRules.hs" #-})) of { !_tlOinh -> (case (({-# LINE 44 "DefaultRules.ag" #-} _lhsIcr- {-# LINE 1870 "DefaultRules.hs" #-})) of+ {-# LINE 1863 "DefaultRules.hs" #-})) of { !_tlOcr -> (case (({-# LINE 135 "DefaultRules.ag" #-} _lhsIuseMap- {-# LINE 1874 "DefaultRules.hs" #-})) of+ {-# LINE 1867 "DefaultRules.hs" #-})) of { !_hdOuseMap -> (case (({-# LINE 55 "DefaultRules.ag" #-} _lhsItypeSyns- {-# LINE 1878 "DefaultRules.hs" #-})) of+ {-# LINE 1871 "DefaultRules.hs" #-})) of { !_hdOtypeSyns -> (case (({-# LINE 135 "DefaultRules.ag" #-} _lhsIsyn- {-# LINE 1882 "DefaultRules.hs" #-})) of+ {-# LINE 1875 "DefaultRules.hs" #-})) of { !_hdOsyn -> (case (({-# LINE 43 "DefaultRules.ag" #-} _lhsIo_rename- {-# LINE 1886 "DefaultRules.hs" #-})) of+ {-# LINE 1879 "DefaultRules.hs" #-})) of { !_hdOo_rename -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 1890 "DefaultRules.hs" #-})) of+ {-# LINE 1883 "DefaultRules.hs" #-})) of { !_hdOnt -> (case (({-# LINE 569 "DefaultRules.ag" #-} _lhsImanualAttrOrderMap- {-# LINE 1894 "DefaultRules.hs" #-})) of+ {-# LINE 1887 "DefaultRules.hs" #-})) of { !_hdOmanualAttrOrderMap -> (case (({-# LINE 135 "DefaultRules.ag" #-} _lhsIinh- {-# LINE 1898 "DefaultRules.hs" #-})) of+ {-# LINE 1891 "DefaultRules.hs" #-})) of { !_hdOinh -> (case (({-# LINE 44 "DefaultRules.ag" #-} _lhsIcr- {-# LINE 1902 "DefaultRules.hs" #-})) of+ {-# LINE 1895 "DefaultRules.hs" #-})) of { !_hdOcr -> (case (({-# LINE 482 "DefaultRules.ag" #-} _lhsIuniq- {-# LINE 1906 "DefaultRules.hs" #-})) of+ {-# LINE 1899 "DefaultRules.hs" #-})) of { !_hdOuniq -> (case (({-# LINE 125 "DefaultRules.ag" #-} _lhsInonterminals- {-# LINE 1910 "DefaultRules.hs" #-})) of+ {-# LINE 1903 "DefaultRules.hs" #-})) of { !_hdOnonterminals -> (case (({-# LINE 637 "DefaultRules.ag" #-} _lhsIaugmentsIn- {-# LINE 1914 "DefaultRules.hs" #-})) of+ {-# LINE 1907 "DefaultRules.hs" #-})) of { !_hdOaugmentsIn -> (case (({-# LINE 644 "DefaultRules.ag" #-} _lhsIaroundsIn- {-# LINE 1918 "DefaultRules.hs" #-})) of+ {-# LINE 1911 "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 482 "DefaultRules.ag" #-} _hdIuniq- {-# LINE 1924 "DefaultRules.hs" #-})) of+ {-# LINE 1917 "DefaultRules.hs" #-})) of { !_tlOuniq -> (case (({-# LINE 125 "DefaultRules.ag" #-} _lhsInonterminals- {-# LINE 1928 "DefaultRules.hs" #-})) of+ {-# LINE 1921 "DefaultRules.hs" #-})) of { !_tlOnonterminals -> (case (({-# LINE 637 "DefaultRules.ag" #-} _lhsIaugmentsIn- {-# LINE 1932 "DefaultRules.hs" #-})) of+ {-# LINE 1925 "DefaultRules.hs" #-})) of { !_tlOaugmentsIn -> (case (({-# LINE 644 "DefaultRules.ag" #-} _lhsIaroundsIn- {-# LINE 1936 "DefaultRules.hs" #-})) of+ {-# LINE 1929 "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 1942 "DefaultRules.hs" #-})) of+ {-# LINE 1935 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 489 "DefaultRules.ag" #-} (:) _hdIoutput _tlIoutput- {-# LINE 1946 "DefaultRules.hs" #-})) of+ {-# LINE 1939 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 1950 "DefaultRules.hs" #-})) of+ {-# LINE 1943 "DefaultRules.hs" #-})) of { !_lhsOoutput -> (case (({-# LINE 482 "DefaultRules.ag" #-} _tlIuniq- {-# LINE 1954 "DefaultRules.hs" #-})) of+ {-# LINE 1947 "DefaultRules.hs" #-})) of { !_lhsOuniq -> ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) ) sem_Productions_Nil :: T_Productions @@ -1969,19 +1962,19 @@ (!_lhsIuseMap) -> (case (({-# LINE 115 "DefaultRules.ag" #-} Seq.empty- {-# LINE 1973 "DefaultRules.hs" #-})) of+ {-# LINE 1966 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 489 "DefaultRules.ag" #-} []- {-# LINE 1977 "DefaultRules.hs" #-})) of+ {-# LINE 1970 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 1981 "DefaultRules.hs" #-})) of+ {-# LINE 1974 "DefaultRules.hs" #-})) of { !_lhsOoutput -> (case (({-# LINE 482 "DefaultRules.ag" #-} _lhsIuniq- {-# LINE 1985 "DefaultRules.hs" #-})) of+ {-# LINE 1978 "DefaultRules.hs" #-})) of { !_lhsOuniq -> ( _lhsOerrors,_lhsOoutput,_lhsOuniq) }) }) }) })) ) -- Rule --------------------------------------------------------@@ -2021,9 +2014,9 @@ newtype T_Rule = T_Rule (ConstructorIdent -> NontermIdent -> Int ->- ( Bool,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rule,Rules,(Set Identifier),Int))+ ( Bool,(Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rule ,Rules ,(Set Identifier),Int)) data Inh_Rule = Inh_Rule {con_Inh_Rule :: !(ConstructorIdent),nt_Inh_Rule :: !(NontermIdent),uniq_Inh_Rule :: !(Int)}-data Syn_Rule = Syn_Rule {containsVars_Syn_Rule :: !(Bool),definedAttrs_Syn_Rule :: !(Set (Identifier,Identifier)),errors_Syn_Rule :: !(Seq Error),locals_Syn_Rule :: !(Set Identifier),output_Syn_Rule :: !(Rule),outputs_Syn_Rule :: !(Rules),ruleNames_Syn_Rule :: !(Set Identifier),uniq_Syn_Rule :: !(Int)}+data Syn_Rule = Syn_Rule {containsVars_Syn_Rule :: !(Bool),definedAttrs_Syn_Rule :: !((Set (Identifier,Identifier))),errors_Syn_Rule :: !((Seq Error)),locals_Syn_Rule :: !((Set Identifier)),output_Syn_Rule :: !(Rule ),outputs_Syn_Rule :: !(Rules ),ruleNames_Syn_Rule :: !((Set Identifier)),uniq_Syn_Rule :: !(Int)} wrap_Rule :: T_Rule -> Inh_Rule -> Syn_Rule @@ -2044,55 +2037,55 @@ (!_lhsIuniq) -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 2048 "DefaultRules.hs" #-})) of+ {-# LINE 2041 "DefaultRules.hs" #-})) of { !_patternOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 2052 "DefaultRules.hs" #-})) of+ {-# LINE 2045 "DefaultRules.hs" #-})) of { !_patternOcon -> (case ((pattern_ _patternOcon _patternOnt )) of { ( !_patternIcontainsVars,!_patternIcopy,!_patternIdefinedAttrs,!_patternIerrors,!_patternIlocals,!_patternIoutput) -> (case (({-# LINE 473 "DefaultRules.ag" #-} _patternIcontainsVars- {-# LINE 2058 "DefaultRules.hs" #-})) of+ {-# LINE 2051 "DefaultRules.hs" #-})) of { !_lhsOcontainsVars -> (case (({-# LINE 453 "DefaultRules.ag" #-} _patternIdefinedAttrs- {-# LINE 2062 "DefaultRules.hs" #-})) of+ {-# LINE 2055 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} _patternIerrors- {-# LINE 2066 "DefaultRules.hs" #-})) of+ {-# LINE 2059 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 452 "DefaultRules.ag" #-} _patternIlocals- {-# LINE 2070 "DefaultRules.hs" #-})) of+ {-# LINE 2063 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 489 "DefaultRules.ag" #-} Rule mbName_ _patternIoutput rhs_ owrt_ origin_ explicit_- {-# LINE 2074 "DefaultRules.hs" #-})) of+ {-# LINE 2067 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 2078 "DefaultRules.hs" #-})) of+ {-# LINE 2071 "DefaultRules.hs" #-})) of { !_lhsOoutput -> (case (({-# LINE 505 "DefaultRules.ag" #-} multiRule _output _lhsIuniq- {-# LINE 2082 "DefaultRules.hs" #-})) of+ {-# LINE 2075 "DefaultRules.hs" #-})) of { !__tup2 -> (case (({-# LINE 505 "DefaultRules.ag" #-} __tup2- {-# LINE 2086 "DefaultRules.hs" #-})) of+ {-# LINE 2079 "DefaultRules.hs" #-})) of { !(!_lhsOoutputs,_) -> (case (({-# LINE 577 "DefaultRules.ag" #-} case mbName_ of Nothing -> Set.empty Just nm -> Set.singleton nm- {-# LINE 2092 "DefaultRules.hs" #-})) of+ {-# LINE 2085 "DefaultRules.hs" #-})) of { !_lhsOruleNames -> (case (({-# LINE 505 "DefaultRules.ag" #-} __tup2- {-# LINE 2096 "DefaultRules.hs" #-})) of+ {-# LINE 2089 "DefaultRules.hs" #-})) of { !(_,!_lhsOuniq) -> ( _lhsOcontainsVars,_lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOoutputs,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) })) ) -- Rules -------------------------------------------------------@@ -2126,9 +2119,9 @@ newtype T_Rules = T_Rules (ConstructorIdent -> NontermIdent -> Int ->- ( (Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rules,(Set Identifier),Int))+ ( (Set (Identifier,Identifier)),(Seq Error),(Set Identifier),Rules ,(Set Identifier),Int)) data Inh_Rules = Inh_Rules {con_Inh_Rules :: !(ConstructorIdent),nt_Inh_Rules :: !(NontermIdent),uniq_Inh_Rules :: !(Int)}-data Syn_Rules = Syn_Rules {definedAttrs_Syn_Rules :: !(Set (Identifier,Identifier)),errors_Syn_Rules :: !(Seq Error),locals_Syn_Rules :: !(Set Identifier),output_Syn_Rules :: !(Rules),ruleNames_Syn_Rules :: !(Set Identifier),uniq_Syn_Rules :: !(Int)}+data Syn_Rules = Syn_Rules {definedAttrs_Syn_Rules :: !((Set (Identifier,Identifier))),errors_Syn_Rules :: !((Seq Error)),locals_Syn_Rules :: !((Set Identifier)),output_Syn_Rules :: !(Rules ),ruleNames_Syn_Rules :: !((Set Identifier)),uniq_Syn_Rules :: !(Int)} wrap_Rules :: T_Rules -> Inh_Rules -> Syn_Rules @@ -2145,55 +2138,55 @@ (!_lhsIuniq) -> (case (({-# LINE 482 "DefaultRules.ag" #-} _lhsIuniq- {-# LINE 2149 "DefaultRules.hs" #-})) of+ {-# LINE 2142 "DefaultRules.hs" #-})) of { !_hdOuniq -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 2153 "DefaultRules.hs" #-})) of+ {-# LINE 2146 "DefaultRules.hs" #-})) of { !_hdOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 2157 "DefaultRules.hs" #-})) of+ {-# LINE 2150 "DefaultRules.hs" #-})) of { !_hdOcon -> (case ((hd_ _hdOcon _hdOnt _hdOuniq )) of { ( !_hdIcontainsVars,!_hdIdefinedAttrs,!_hdIerrors,!_hdIlocals,!_hdIoutput,!_hdIoutputs,!_hdIruleNames,!_hdIuniq) -> (case (({-# LINE 482 "DefaultRules.ag" #-} _hdIuniq- {-# LINE 2163 "DefaultRules.hs" #-})) of+ {-# LINE 2156 "DefaultRules.hs" #-})) of { !_tlOuniq -> (case (({-# LINE 34 "DefaultRules.ag" #-} _lhsInt- {-# LINE 2167 "DefaultRules.hs" #-})) of+ {-# LINE 2160 "DefaultRules.hs" #-})) of { !_tlOnt -> (case (({-# LINE 35 "DefaultRules.ag" #-} _lhsIcon- {-# LINE 2171 "DefaultRules.hs" #-})) of+ {-# LINE 2164 "DefaultRules.hs" #-})) of { !_tlOcon -> (case ((tl_ _tlOcon _tlOnt _tlOuniq )) of { ( !_tlIdefinedAttrs,!_tlIerrors,!_tlIlocals,!_tlIoutput,!_tlIruleNames,!_tlIuniq) -> (case (({-# LINE 453 "DefaultRules.ag" #-} _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs- {-# LINE 2177 "DefaultRules.hs" #-})) of+ {-# LINE 2170 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} _hdIerrors Seq.>< _tlIerrors- {-# LINE 2181 "DefaultRules.hs" #-})) of+ {-# LINE 2174 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 452 "DefaultRules.ag" #-} _hdIlocals `Set.union` _tlIlocals- {-# LINE 2185 "DefaultRules.hs" #-})) of+ {-# LINE 2178 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 501 "DefaultRules.ag" #-} if _hdIcontainsVars then _hdIoutputs ++ _tlIoutput else _tlIoutput- {-# LINE 2189 "DefaultRules.hs" #-})) of+ {-# LINE 2182 "DefaultRules.hs" #-})) of { !_lhsOoutput -> (case (({-# LINE 575 "DefaultRules.ag" #-} _hdIruleNames `Set.union` _tlIruleNames- {-# LINE 2193 "DefaultRules.hs" #-})) of+ {-# LINE 2186 "DefaultRules.hs" #-})) of { !_lhsOruleNames -> (case (({-# LINE 482 "DefaultRules.ag" #-} _tlIuniq- {-# LINE 2197 "DefaultRules.hs" #-})) of+ {-# LINE 2190 "DefaultRules.hs" #-})) of { !_lhsOuniq -> ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) }) }) }) }) }) }) }) })) ) sem_Rules_Nil :: T_Rules @@ -2203,31 +2196,31 @@ (!_lhsIuniq) -> (case (({-# LINE 453 "DefaultRules.ag" #-} Set.empty- {-# LINE 2207 "DefaultRules.hs" #-})) of+ {-# LINE 2200 "DefaultRules.hs" #-})) of { !_lhsOdefinedAttrs -> (case (({-# LINE 115 "DefaultRules.ag" #-} Seq.empty- {-# LINE 2211 "DefaultRules.hs" #-})) of+ {-# LINE 2204 "DefaultRules.hs" #-})) of { !_lhsOerrors -> (case (({-# LINE 452 "DefaultRules.ag" #-} Set.empty- {-# LINE 2215 "DefaultRules.hs" #-})) of+ {-# LINE 2208 "DefaultRules.hs" #-})) of { !_lhsOlocals -> (case (({-# LINE 489 "DefaultRules.ag" #-} []- {-# LINE 2219 "DefaultRules.hs" #-})) of+ {-# LINE 2212 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 2223 "DefaultRules.hs" #-})) of+ {-# LINE 2216 "DefaultRules.hs" #-})) of { !_lhsOoutput -> (case (({-# LINE 575 "DefaultRules.ag" #-} Set.empty- {-# LINE 2227 "DefaultRules.hs" #-})) of+ {-# LINE 2220 "DefaultRules.hs" #-})) of { !_lhsOruleNames -> (case (({-# LINE 482 "DefaultRules.ag" #-} _lhsIuniq- {-# LINE 2231 "DefaultRules.hs" #-})) of+ {-# LINE 2224 "DefaultRules.hs" #-})) of { !_lhsOuniq -> ( _lhsOdefinedAttrs,_lhsOerrors,_lhsOlocals,_lhsOoutput,_lhsOruleNames,_lhsOuniq) }) }) }) }) }) }) })) ) -- TypeSig -----------------------------------------------------@@ -2248,9 +2241,9 @@ sem_TypeSig !(TypeSig _name _tp ) = (sem_TypeSig_TypeSig _name _tp ) -- semantic domain-newtype T_TypeSig = T_TypeSig (( TypeSig))+newtype T_TypeSig = T_TypeSig (( TypeSig )) data Inh_TypeSig = Inh_TypeSig {}-data Syn_TypeSig = Syn_TypeSig {output_Syn_TypeSig :: !(TypeSig)}+data Syn_TypeSig = Syn_TypeSig {output_Syn_TypeSig :: !(TypeSig )} wrap_TypeSig :: T_TypeSig -> Inh_TypeSig -> Syn_TypeSig @@ -2264,11 +2257,11 @@ sem_TypeSig_TypeSig !name_ !tp_ = (T_TypeSig (case (({-# LINE 489 "DefaultRules.ag" #-} TypeSig name_ tp_- {-# LINE 2268 "DefaultRules.hs" #-})) of+ {-# LINE 2261 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 2272 "DefaultRules.hs" #-})) of+ {-# LINE 2265 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOoutput) }) }) ) -- TypeSigs ----------------------------------------------------@@ -2292,9 +2285,9 @@ sem_TypeSigs !list = (Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list) ) -- semantic domain-newtype T_TypeSigs = T_TypeSigs (( TypeSigs))+newtype T_TypeSigs = T_TypeSigs (( TypeSigs )) data Inh_TypeSigs = Inh_TypeSigs {}-data Syn_TypeSigs = Syn_TypeSigs {output_Syn_TypeSigs :: !(TypeSigs)}+data Syn_TypeSigs = Syn_TypeSigs {output_Syn_TypeSigs :: !(TypeSigs )} wrap_TypeSigs :: T_TypeSigs -> Inh_TypeSigs -> Syn_TypeSigs @@ -2312,21 +2305,21 @@ { ( !_hdIoutput) -> (case (({-# LINE 489 "DefaultRules.ag" #-} (:) _hdIoutput _tlIoutput- {-# LINE 2316 "DefaultRules.hs" #-})) of+ {-# LINE 2309 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 2320 "DefaultRules.hs" #-})) of+ {-# LINE 2313 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOoutput) }) }) }) }) ) sem_TypeSigs_Nil :: T_TypeSigs sem_TypeSigs_Nil = (T_TypeSigs (case (({-# LINE 489 "DefaultRules.ag" #-} []- {-# LINE 2327 "DefaultRules.hs" #-})) of+ {-# LINE 2320 "DefaultRules.hs" #-})) of { !_output -> (case (({-# LINE 489 "DefaultRules.ag" #-} _output- {-# LINE 2331 "DefaultRules.hs" #-})) of+ {-# LINE 2324 "DefaultRules.hs" #-})) of { !_lhsOoutput -> ( _lhsOoutput) }) }) )
src-derived/Desugar.hs view
@@ -1,2562 +1,2541 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.21 (Desugar.ag)-module Desugar where-{-# LINE 13 "Desugar.ag" #-}--import qualified Data.Set as Set-import qualified Data.Map as Map-import Data.Map(Map)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq,(><))-import UU.Scanner.Position(Pos(..))-import Maybe-import Data.List(intersperse)--import AbstractSyntax-import ErrorMessages-import Options-import HsToken-import HsTokenScanner-import TokenDef-import CommonTypes-{-# LINE 24 "../src-derived/Desugar.hs" #-}--{-# LINE 2 "./AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import CommonTypes-{-# LINE 34 "../src-derived/Desugar.hs" #-}--{-# LINE 2 "./Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 41 "../src-derived/Desugar.hs" #-}--{-# LINE 2 "./Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 47 "../src-derived/Desugar.hs" #-}--{-# LINE 2 "./HsToken.ag" #-}--import CommonTypes-import UU.Scanner.Position(Pos)-{-# LINE 53 "../src-derived/Desugar.hs" #-}-{-# LINE 97 "Desugar.ag" #-}--addl :: Int -> Pos -> Pos-addl n (Pos l c f) = Pos (l+n) c f-{-# LINE 58 "../src-derived/Desugar.hs" #-}--{-# LINE 132 "Desugar.ag" #-}--maybeError :: a -> Error -> Maybe a -> (a, Seq Error)-maybeError def err mb- = maybe (def, Seq.singleton err) (\r -> (r, Seq.empty)) mb--findField :: Identifier -> Identifier -> [(Identifier,Identifier)] -> Maybe Identifier-findField fld attr list- | fld == _FIRST = f list- | fld == _LAST = f (reverse list)- | otherwise = Just fld- where- f = lookup attr-{-# LINE 73 "../src-derived/Desugar.hs" #-}--{-# LINE 203 "Desugar.ag" #-}--mergeAttributes :: AttrMap -> AttrMap -> AttrMap-mergeAttributes = Map.unionWith $ Map.unionWith $ Set.union-{-# LINE 79 "../src-derived/Desugar.hs" #-}--{-# LINE 250 "Desugar.ag" #-}--desugarExprs :: Options -> NontermIdent -> ConstructorIdent ->- [(Identifier, Identifier)] -> [(Identifier, Identifier)] ->- Seq Error -> [Expression] -> (Seq Error, [Expression])-desugarExprs options nt con childInhs childSyns- = mapAccum (desugarExpr options nt con childInhs childSyns)- where mapAccum f e = foldr (\x (e0,xs) -> let (e1,x') = f e0 x in (e1, x:xs)) (e, [])--desugarExpr :: Options -> NontermIdent -> ConstructorIdent ->- [(Identifier, Identifier)] -> [(Identifier, Identifier)] ->- Seq Error -> Expression -> (Seq Error, Expression)-desugarExpr options nt con childInhs childSyns errs expr- = (errs Seq.>< errors_Syn_Expression syn, output_Syn_Expression syn)- where- inh = Inh_Expression { childInhs_Inh_Expression = childInhs- , childSyns_Inh_Expression = childSyns- , con_Inh_Expression = con- , nt_Inh_Expression = nt- , options_Inh_Expression = options- , ruleDescr_Inh_Expression = "augment-rule"- }- sem = sem_Expression expr- syn = wrap_Expression sem inh-{-# LINE 105 "../src-derived/Desugar.hs" #-}--- Child --------------------------------------------------------{-- visit 0:- synthesized attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- output : SELF - alternatives:- alternative Child:- child name : {Identifier}- child tp : {Type}- child inh : {Attributes}- child syn : {Attributes}- child virtual : {Maybe (Maybe Type)}- visit 0:- local output : _--}--- cata-sem_Child :: Child ->- T_Child -sem_Child !(Child _name _tp _inh _syn _virtual ) =- (sem_Child_Child _name _tp _inh _syn _virtual )--- semantic domain-newtype T_Child = T_Child (( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Child))-data Inh_Child = Inh_Child {}-data Syn_Child = Syn_Child {childInhs_Syn_Child :: !([(Identifier, Identifier)]),childSyns_Syn_Child :: !([(Identifier, Identifier)]),output_Syn_Child :: !(Child)}-wrap_Child :: T_Child ->- Inh_Child ->- Syn_Child -wrap_Child !(T_Child sem ) !(Inh_Child ) =- (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) =- (sem )- in (Syn_Child _lhsOchildInhs _lhsOchildSyns _lhsOoutput ))-sem_Child_Child :: Identifier ->- Type ->- Attributes ->- Attributes ->- (Maybe (Maybe Type)) ->- T_Child -sem_Child_Child !name_ !tp_ !inh_ !syn_ !virtual_ =- (T_Child (case (({-# LINE 129 "Desugar.ag" #-}- [(i, name_) | i <- Map.keys inh_ ]- {-# LINE 148 "Desugar.hs" #-})) of- { !_lhsOchildInhs ->- (case (({-# LINE 130 "Desugar.ag" #-}- [(s, name_) | s <- Map.keys syn_ ]- {-# LINE 152 "Desugar.hs" #-})) of- { !_lhsOchildSyns ->- (case (({-# LINE 39 "Desugar.ag" #-}- Child name_ tp_ inh_ syn_ virtual_- {-# LINE 156 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 160 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) )--- Children -----------------------------------------------------{-- visit 0:- synthesized attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- output : SELF - alternatives:- alternative Cons:- child hd : Child - child tl : Children - visit 0:- local output : _- alternative Nil:- visit 0:- local output : _--}--- cata-sem_Children :: Children ->- T_Children -sem_Children !list =- (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list) )--- semantic domain-newtype T_Children = T_Children (( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Children))-data Inh_Children = Inh_Children {}-data Syn_Children = Syn_Children {childInhs_Syn_Children :: !([(Identifier, Identifier)]),childSyns_Syn_Children :: !([(Identifier, Identifier)]),output_Syn_Children :: !(Children)}-wrap_Children :: T_Children ->- Inh_Children ->- Syn_Children -wrap_Children !(T_Children sem ) !(Inh_Children ) =- (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) =- (sem )- in (Syn_Children _lhsOchildInhs _lhsOchildSyns _lhsOoutput ))-sem_Children_Cons :: T_Child ->- T_Children ->- T_Children -sem_Children_Cons !(T_Child hd_ ) !(T_Children tl_ ) =- (T_Children (case ((tl_ )) of- { ( !_tlIchildInhs,!_tlIchildSyns,!_tlIoutput) ->- (case ((hd_ )) of- { ( !_hdIchildInhs,!_hdIchildSyns,!_hdIoutput) ->- (case (({-# LINE 124 "Desugar.ag" #-}- _hdIchildInhs ++ _tlIchildInhs- {-# LINE 206 "Desugar.hs" #-})) of- { !_lhsOchildInhs ->- (case (({-# LINE 124 "Desugar.ag" #-}- _hdIchildSyns ++ _tlIchildSyns- {-# LINE 210 "Desugar.hs" #-})) of- { !_lhsOchildSyns ->- (case (({-# LINE 39 "Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 214 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 218 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) }) }) )-sem_Children_Nil :: T_Children -sem_Children_Nil =- (T_Children (case (({-# LINE 124 "Desugar.ag" #-}- []- {-# LINE 225 "Desugar.hs" #-})) of- { !_lhsOchildInhs ->- (case (({-# LINE 124 "Desugar.ag" #-}- []- {-# LINE 229 "Desugar.hs" #-})) of- { !_lhsOchildSyns ->- (case (({-# LINE 39 "Desugar.ag" #-}- []- {-# LINE 233 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 237 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) )--- Expression ---------------------------------------------------{-- visit 0:- inherited attributes:- childInhs : [(Identifier, Identifier)]- childSyns : [(Identifier, Identifier)]- con : ConstructorIdent- nt : NontermIdent- options : Options- ruleDescr : String- synthesized attributes:- errors : Seq Error- output : SELF - alternatives:- alternative Expression:- child pos : {Pos}- child tks : {[HsToken]}- visit 0:- local _tup1 : _- local tks' : _--}--- cata-sem_Expression :: Expression ->- T_Expression -sem_Expression !(Expression _pos _tks ) =- (sem_Expression_Expression _pos _tks )--- semantic domain-newtype T_Expression = T_Expression (([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- NontermIdent ->- Options ->- String ->- ( (Seq Error),Expression))-data Inh_Expression = Inh_Expression {childInhs_Inh_Expression :: !([(Identifier, Identifier)]),childSyns_Inh_Expression :: !([(Identifier, Identifier)]),con_Inh_Expression :: !(ConstructorIdent),nt_Inh_Expression :: !(NontermIdent),options_Inh_Expression :: !(Options),ruleDescr_Inh_Expression :: !(String)}-data Syn_Expression = Syn_Expression {errors_Syn_Expression :: !(Seq Error),output_Syn_Expression :: !(Expression)}-wrap_Expression :: T_Expression ->- Inh_Expression ->- Syn_Expression -wrap_Expression !(T_Expression sem ) !(Inh_Expression _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIoptions _lhsIruleDescr ) =- (let ( !_lhsOerrors,!_lhsOoutput) =- (sem _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIoptions _lhsIruleDescr )- in (Syn_Expression _lhsOerrors _lhsOoutput ))-sem_Expression_Expression :: Pos ->- ([HsToken]) ->- T_Expression -sem_Expression_Expression !pos_ !tks_ =- (T_Expression (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsInt)- (!_lhsIoptions)- (!_lhsIruleDescr) ->- (case (({-# LINE 48 "Desugar.ag" #-}- let inh = Inh_HsTokensRoot { childInhs_Inh_HsTokensRoot = _lhsIchildInhs- , childSyns_Inh_HsTokensRoot = _lhsIchildSyns- , nt_Inh_HsTokensRoot = _lhsInt- , con_Inh_HsTokensRoot = _lhsIcon- , ruleDescr_Inh_HsTokensRoot = _lhsIruleDescr- , useFieldIdent_Inh_HsTokensRoot = genUseTraces _lhsIoptions- }- sem = sem_HsTokensRoot (HsTokensRoot tks_)- syn = wrap_HsTokensRoot sem inh- in (tks_Syn_HsTokensRoot syn, errors_Syn_HsTokensRoot syn)- {-# LINE 304 "Desugar.hs" #-})) of- { !__tup1 ->- (case (({-# LINE 48 "Desugar.ag" #-}- __tup1- {-# LINE 308 "Desugar.hs" #-})) of- { !(_,!_lhsOerrors) ->- (case (({-# LINE 48 "Desugar.ag" #-}- __tup1- {-# LINE 312 "Desugar.hs" #-})) of- { !(!_tks',_) ->- (case (({-# LINE 58 "Desugar.ag" #-}- Expression pos_ _tks'- {-# LINE 316 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOerrors,_lhsOoutput) }) }) }) })) )--- Grammar ------------------------------------------------------{-- visit 0:- inherited attributes:- forcedIrrefutables : AttrMap- options : Options- synthesized attributes:- allAttributes : AttrMap- errors : Seq Error- output : SELF - alternatives:- alternative Grammar:- child typeSyns : {TypeSyns}- child useMap : {UseMap}- child derivings : {Derivings}- child wrappers : {Set NontermIdent}- child nonts : Nonterminals - child pragmas : {PragmaMap}- child manualAttrOrderMap : {AttrOrderMap}- child paramMap : {ParamMap}- child contextMap : {ContextMap}- child uniqueMap : {UniqueMap}- child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}- child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}--}--- 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 mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : Expression - child owrt : {Bool}- child origin : {String}- child explicit : {Bool}- visit 1:- local ruleDescr : _- local output : _--}--- cata-sem_Rule :: Rule ->- T_Rule -sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit ) =- (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit )--- semantic domain-newtype T_Rule = T_Rule (( (Set (Identifier, Identifier)),T_Rule_1 ))-newtype T_Rule_1 = T_Rule_1 (([(Identifier, Identifier)]) ->- ([(Identifier, Identifier)]) ->- ConstructorIdent ->- (Set (Identifier, Identifier)) ->- AttrMap ->- NontermIdent ->- Options ->- ( AttrMap,(Seq Error),Rule))-data Inh_Rule = Inh_Rule {childInhs_Inh_Rule :: !([(Identifier, Identifier)]),childSyns_Inh_Rule :: !([(Identifier, Identifier)]),con_Inh_Rule :: !(ConstructorIdent),defs_Inh_Rule :: !(Set (Identifier, Identifier)),forcedIrrefutables_Inh_Rule :: !(AttrMap),nt_Inh_Rule :: !(NontermIdent),options_Inh_Rule :: !(Options)}-data Syn_Rule = Syn_Rule {allAttributes_Syn_Rule :: !(AttrMap),defsCollect_Syn_Rule :: !(Set (Identifier, Identifier)),errors_Syn_Rule :: !(Seq Error),output_Syn_Rule :: !(Rule)}-wrap_Rule :: T_Rule ->- Inh_Rule ->- Syn_Rule -wrap_Rule !(T_Rule sem ) !(Inh_Rule _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =- (let ( !_lhsOdefsCollect,!T_Rule_1 sem_1) =- (sem )- ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) =- (sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions )- in (Syn_Rule _lhsOallAttributes _lhsOdefsCollect _lhsOerrors _lhsOoutput ))-sem_Rule_Rule :: (Maybe Identifier) ->- T_Pattern ->- T_Expression ->- Bool ->- String ->- Bool ->- T_Rule -sem_Rule_Rule !mbName_ !(T_Pattern pattern_ ) !(T_Expression rhs_ ) !owrt_ !origin_ !explicit_ =- (T_Rule (case ((pattern_ )) of- { ( !_patternIdefsCollect,!T_Pattern_1 pattern_1) ->- (case (({-# LINE 178 "Desugar.ag" #-}- _patternIdefsCollect- {-# LINE 2178 "Desugar.hs" #-})) of- { !_lhsOdefsCollect ->- (case ((sem_Rule_Rule_1 (T_Pattern_1 pattern_1 ) _patternIdefsCollect (T_Expression rhs_ ) explicit_ origin_ owrt_ mbName_ )) of- { ( !sem_Rule_1) ->- ( _lhsOdefsCollect,sem_Rule_1) }) }) }) )-sem_Rule_Rule_1 :: T_Pattern_1 ->- (Set (Identifier, Identifier)) ->- T_Expression ->- Bool ->- String ->- Bool ->- (Maybe Identifier) ->- T_Rule_1 -sem_Rule_Rule_1 !(T_Pattern_1 pattern_1 ) !_patternIdefsCollect !(T_Expression rhs_ ) !explicit_ !origin_ !owrt_ !mbName_ =- (T_Rule_1 (\ (!_lhsIchildInhs)- (!_lhsIchildSyns)- (!_lhsIcon)- (!_lhsIdefs)- (!_lhsIforcedIrrefutables)- (!_lhsInt)- (!_lhsIoptions) ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 2201 "Desugar.hs" #-})) of- { !_patternOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 2205 "Desugar.hs" #-})) of- { !_patternOcon ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2209 "Desugar.hs" #-})) of- { !_patternOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 2213 "Desugar.hs" #-})) of- { !_patternOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2217 "Desugar.hs" #-})) of- { !_patternOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2221 "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 2227 "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 2231 "Desugar.hs" #-})) of- { !_ruleDescr ->- (case (({-# LINE 167 "Desugar.ag" #-}- _ruleDescr- {-# LINE 2235 "Desugar.hs" #-})) of- { !_rhsOruleDescr ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 2239 "Desugar.hs" #-})) of- { !_rhsOoptions ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 2243 "Desugar.hs" #-})) of- { !_rhsOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 2247 "Desugar.hs" #-})) of- { !_rhsOcon ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2251 "Desugar.hs" #-})) of- { !_rhsOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2255 "Desugar.hs" #-})) of- { !_rhsOchildInhs ->- (case ((rhs_ _rhsOchildInhs _rhsOchildSyns _rhsOcon _rhsOnt _rhsOoptions _rhsOruleDescr )) of- { ( !_rhsIerrors,!_rhsIoutput) ->- (case (({-# LINE 37 "Desugar.ag" #-}- _patternIerrors Seq.>< _rhsIerrors- {-# LINE 2261 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- Rule mbName_ _patternIoutput _rhsIoutput owrt_ origin_ explicit_- {-# LINE 2265 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2269 "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 2336 "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 2354 "Desugar.hs" #-})) of- { !_tlOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 2358 "Desugar.hs" #-})) of- { !_tlOcon ->- (case (({-# LINE 151 "Desugar.ag" #-}- _lhsInt- {-# LINE 2362 "Desugar.hs" #-})) of- { !_hdOnt ->- (case (({-# LINE 152 "Desugar.ag" #-}- _lhsIcon- {-# LINE 2366 "Desugar.hs" #-})) of- { !_hdOcon ->- (case (({-# LINE 35 "Desugar.ag" #-}- _lhsIoptions- {-# LINE 2370 "Desugar.hs" #-})) of- { !_tlOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2374 "Desugar.hs" #-})) of- { !_tlOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 2378 "Desugar.hs" #-})) of- { !_tlOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2382 "Desugar.hs" #-})) of- { !_tlOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2386 "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 2392 "Desugar.hs" #-})) of- { !_hdOoptions ->- (case (({-# LINE 214 "Desugar.ag" #-}- _lhsIforcedIrrefutables- {-# LINE 2396 "Desugar.hs" #-})) of- { !_hdOforcedIrrefutables ->- (case (({-# LINE 184 "Desugar.ag" #-}- _lhsIdefs- {-# LINE 2400 "Desugar.hs" #-})) of- { !_hdOdefs ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildSyns- {-# LINE 2404 "Desugar.hs" #-})) of- { !_hdOchildSyns ->- (case (({-# LINE 125 "Desugar.ag" #-}- _lhsIchildInhs- {-# LINE 2408 "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 2414 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 37 "Desugar.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 2418 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- (:) _hdIoutput _tlIoutput- {-# LINE 2422 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2426 "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 2433 "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 2449 "Desugar.hs" #-})) of- { !_lhsOallAttributes ->- (case (({-# LINE 37 "Desugar.ag" #-}- Seq.empty- {-# LINE 2453 "Desugar.hs" #-})) of- { !_lhsOerrors ->- (case (({-# LINE 39 "Desugar.ag" #-}- []- {-# LINE 2457 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2461 "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 2498 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2502 "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 2546 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2550 "Desugar.hs" #-})) of- { !_lhsOoutput ->- ( _lhsOoutput) }) }) }) }) )-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil =- (T_TypeSigs (case (({-# LINE 39 "Desugar.ag" #-}- []- {-# LINE 2557 "Desugar.hs" #-})) of- { !_output ->- (case (({-# LINE 39 "Desugar.ag" #-}- _output- {-# LINE 2561 "Desugar.hs" #-})) of+-- UUAGC 0.9.24 (Desugar.ag)+module Desugar where+{-# LINE 13 "Desugar.ag" #-}++import qualified Data.Set as Set+import qualified Data.Map as Map+import Data.Map(Map)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq,(><))+import UU.Scanner.Position(Pos(..))+import Maybe+import Data.List(intersperse)++import AbstractSyntax+import ErrorMessages+import Options+import HsToken+import HsTokenScanner+import TokenDef+import CommonTypes+{-# LINE 24 "../src-derived/Desugar.hs" #-}++{-# LINE 2 "./AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import CommonTypes+{-# LINE 34 "../src-derived/Desugar.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 41 "../src-derived/Desugar.hs" #-}++{-# LINE 2 "./Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 47 "../src-derived/Desugar.hs" #-}++{-# LINE 2 "./HsToken.ag" #-}++import CommonTypes+import UU.Scanner.Position(Pos)+{-# LINE 53 "../src-derived/Desugar.hs" #-}+{-# LINE 97 "Desugar.ag" #-}++addl :: Int -> Pos -> Pos+addl n (Pos l c f) = Pos (l+n) c f+{-# LINE 58 "../src-derived/Desugar.hs" #-}++{-# LINE 132 "Desugar.ag" #-}++maybeError :: a -> Error -> Maybe a -> (a, Seq Error)+maybeError def err mb+ = maybe (def, Seq.singleton err) (\r -> (r, Seq.empty)) mb++findField :: Identifier -> Identifier -> [(Identifier,Identifier)] -> Maybe Identifier+findField fld attr list+ | fld == _FIRST = f list+ | fld == _LAST = f (reverse list)+ | otherwise = Just fld+ where+ f = lookup attr+{-# LINE 73 "../src-derived/Desugar.hs" #-}++{-# LINE 203 "Desugar.ag" #-}++mergeAttributes :: AttrMap -> AttrMap -> AttrMap+mergeAttributes = Map.unionWith $ Map.unionWith $ Set.union+{-# LINE 79 "../src-derived/Desugar.hs" #-}++{-# LINE 250 "Desugar.ag" #-}++desugarExprs :: Options -> NontermIdent -> ConstructorIdent ->+ [(Identifier, Identifier)] -> [(Identifier, Identifier)] ->+ Seq Error -> [Expression] -> (Seq Error, [Expression])+desugarExprs options nt con childInhs childSyns+ = mapAccum (desugarExpr options nt con childInhs childSyns)+ where mapAccum f e = foldr (\x (e0,xs) -> let (e1,x') = f e0 x in (e1, x:xs)) (e, [])++desugarExpr :: Options -> NontermIdent -> ConstructorIdent ->+ [(Identifier, Identifier)] -> [(Identifier, Identifier)] ->+ Seq Error -> Expression -> (Seq Error, Expression)+desugarExpr options nt con childInhs childSyns errs expr+ = (errs Seq.>< errors_Syn_Expression syn, output_Syn_Expression syn)+ where+ inh = Inh_Expression { childInhs_Inh_Expression = childInhs+ , childSyns_Inh_Expression = childSyns+ , con_Inh_Expression = con+ , nt_Inh_Expression = nt+ , options_Inh_Expression = options+ , ruleDescr_Inh_Expression = "augment-rule"+ }+ sem = sem_Expression expr+ syn = wrap_Expression sem inh+{-# LINE 105 "../src-derived/Desugar.hs" #-}+-- Child -------------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ output : SELF + alternatives:+ alternative Child:+ child name : {Identifier}+ child tp : {Type}+ child inh : {Attributes}+ child syn : {Attributes}+ child virtual : {Maybe (Maybe Type)}+ visit 0:+ local output : _+-}+-- cata+sem_Child :: Child ->+ T_Child +sem_Child !(Child _name _tp _inh _syn _virtual ) =+ (sem_Child_Child _name _tp _inh _syn _virtual )+-- semantic domain+newtype T_Child = T_Child (( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Child ))+data Inh_Child = Inh_Child {}+data Syn_Child = Syn_Child {childInhs_Syn_Child :: !(([(Identifier, Identifier)])),childSyns_Syn_Child :: !(([(Identifier, Identifier)])),output_Syn_Child :: !(Child )}+wrap_Child :: T_Child ->+ Inh_Child ->+ Syn_Child +wrap_Child !(T_Child sem ) !(Inh_Child ) =+ (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) =+ (sem )+ in (Syn_Child _lhsOchildInhs _lhsOchildSyns _lhsOoutput ))+sem_Child_Child :: Identifier ->+ Type ->+ Attributes ->+ Attributes ->+ (Maybe (Maybe Type)) ->+ T_Child +sem_Child_Child !name_ !tp_ !inh_ !syn_ !virtual_ =+ (T_Child (case (({-# LINE 129 "Desugar.ag" #-}+ [(i, name_) | i <- Map.keys inh_ ]+ {-# LINE 148 "Desugar.hs" #-})) of+ { !_lhsOchildInhs ->+ (case (({-# LINE 130 "Desugar.ag" #-}+ [(s, name_) | s <- Map.keys syn_ ]+ {-# LINE 152 "Desugar.hs" #-})) of+ { !_lhsOchildSyns ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Child name_ tp_ inh_ syn_ virtual_+ {-# LINE 156 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 160 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) )+-- Children ----------------------------------------------------+{-+ visit 0:+ synthesized attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ output : SELF + alternatives:+ alternative Cons:+ child hd : Child + child tl : Children + visit 0:+ local output : _+ alternative Nil:+ visit 0:+ local output : _+-}+-- cata+sem_Children :: Children ->+ T_Children +sem_Children !list =+ (Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list) )+-- semantic domain+newtype T_Children = T_Children (( ([(Identifier, Identifier)]),([(Identifier, Identifier)]),Children ))+data Inh_Children = Inh_Children {}+data Syn_Children = Syn_Children {childInhs_Syn_Children :: !(([(Identifier, Identifier)])),childSyns_Syn_Children :: !(([(Identifier, Identifier)])),output_Syn_Children :: !(Children )}+wrap_Children :: T_Children ->+ Inh_Children ->+ Syn_Children +wrap_Children !(T_Children sem ) !(Inh_Children ) =+ (let ( !_lhsOchildInhs,!_lhsOchildSyns,!_lhsOoutput) =+ (sem )+ in (Syn_Children _lhsOchildInhs _lhsOchildSyns _lhsOoutput ))+sem_Children_Cons :: T_Child ->+ T_Children ->+ T_Children +sem_Children_Cons !(T_Child hd_ ) !(T_Children tl_ ) =+ (T_Children (case ((tl_ )) of+ { ( !_tlIchildInhs,!_tlIchildSyns,!_tlIoutput) ->+ (case ((hd_ )) of+ { ( !_hdIchildInhs,!_hdIchildSyns,!_hdIoutput) ->+ (case (({-# LINE 124 "Desugar.ag" #-}+ _hdIchildInhs ++ _tlIchildInhs+ {-# LINE 206 "Desugar.hs" #-})) of+ { !_lhsOchildInhs ->+ (case (({-# LINE 124 "Desugar.ag" #-}+ _hdIchildSyns ++ _tlIchildSyns+ {-# LINE 210 "Desugar.hs" #-})) of+ { !_lhsOchildSyns ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 214 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 218 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) }) }) )+sem_Children_Nil :: T_Children +sem_Children_Nil =+ (T_Children (case (({-# LINE 124 "Desugar.ag" #-}+ []+ {-# LINE 225 "Desugar.hs" #-})) of+ { !_lhsOchildInhs ->+ (case (({-# LINE 124 "Desugar.ag" #-}+ []+ {-# LINE 229 "Desugar.hs" #-})) of+ { !_lhsOchildSyns ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 233 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 237 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOchildInhs,_lhsOchildSyns,_lhsOoutput) }) }) }) }) )+-- Expression --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ nt : NontermIdent+ options : Options+ ruleDescr : String+ synthesized attributes:+ errors : Seq Error+ output : SELF + alternatives:+ alternative Expression:+ child pos : {Pos}+ child tks : {[HsToken]}+ visit 0:+ local _tup1 : _+ local tks' : _+-}+-- cata+sem_Expression :: Expression ->+ T_Expression +sem_Expression !(Expression _pos _tks ) =+ (sem_Expression_Expression _pos _tks )+-- semantic domain+newtype T_Expression = T_Expression (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ NontermIdent ->+ Options ->+ String ->+ ( (Seq Error),Expression ))+data Inh_Expression = Inh_Expression {childInhs_Inh_Expression :: !(([(Identifier, Identifier)])),childSyns_Inh_Expression :: !(([(Identifier, Identifier)])),con_Inh_Expression :: !(ConstructorIdent),nt_Inh_Expression :: !(NontermIdent),options_Inh_Expression :: !(Options),ruleDescr_Inh_Expression :: !(String)}+data Syn_Expression = Syn_Expression {errors_Syn_Expression :: !((Seq Error)),output_Syn_Expression :: !(Expression )}+wrap_Expression :: T_Expression ->+ Inh_Expression ->+ Syn_Expression +wrap_Expression !(T_Expression sem ) !(Inh_Expression _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIoptions _lhsIruleDescr ) =+ (let ( !_lhsOerrors,!_lhsOoutput) =+ (sem _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsInt _lhsIoptions _lhsIruleDescr )+ in (Syn_Expression _lhsOerrors _lhsOoutput ))+sem_Expression_Expression :: Pos ->+ ([HsToken]) ->+ T_Expression +sem_Expression_Expression !pos_ !tks_ =+ (T_Expression (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsInt)+ (!_lhsIoptions)+ (!_lhsIruleDescr) ->+ (case (({-# LINE 48 "Desugar.ag" #-}+ let inh = Inh_HsTokensRoot { childInhs_Inh_HsTokensRoot = _lhsIchildInhs+ , childSyns_Inh_HsTokensRoot = _lhsIchildSyns+ , nt_Inh_HsTokensRoot = _lhsInt+ , con_Inh_HsTokensRoot = _lhsIcon+ , ruleDescr_Inh_HsTokensRoot = _lhsIruleDescr+ , useFieldIdent_Inh_HsTokensRoot = genUseTraces _lhsIoptions+ }+ sem = sem_HsTokensRoot (HsTokensRoot tks_)+ syn = wrap_HsTokensRoot sem inh+ in (tks_Syn_HsTokensRoot syn, errors_Syn_HsTokensRoot syn)+ {-# LINE 304 "Desugar.hs" #-})) of+ { !__tup1 ->+ (case (({-# LINE 48 "Desugar.ag" #-}+ __tup1+ {-# LINE 308 "Desugar.hs" #-})) of+ { !(_,!_lhsOerrors) ->+ (case (({-# LINE 48 "Desugar.ag" #-}+ __tup1+ {-# LINE 312 "Desugar.hs" #-})) of+ { !(!_tks',_) ->+ (case (({-# LINE 58 "Desugar.ag" #-}+ Expression pos_ _tks'+ {-# LINE 316 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOerrors,_lhsOoutput) }) }) }) })) )+-- Grammar -----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ forcedIrrefutables : AttrMap+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ errors : Seq Error+ output : SELF + alternatives:+ alternative Grammar:+ child typeSyns : {TypeSyns}+ child useMap : {UseMap}+ child derivings : {Derivings}+ child wrappers : {Set NontermIdent}+ child nonts : Nonterminals + child pragmas : {PragmaMap}+ child manualAttrOrderMap : {AttrOrderMap}+ child paramMap : {ParamMap}+ child contextMap : {ContextMap}+ child uniqueMap : {UniqueMap}+ child augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+ child aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))}+-}+-- 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 ((let sem_Pattern_Alias_1 :: T_Pattern_1 + sem_Pattern_Alias_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1273 "Desugar.hs" #-})) of+ { !_patOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1277 "Desugar.hs" #-})) of+ { !_patOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1281 "Desugar.hs" #-})) of+ { !_patOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1285 "Desugar.hs" #-})) of+ { !_patOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1289 "Desugar.hs" #-})) of+ { !_patOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1293 "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 1299 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1303 "Desugar.hs" #-})) of+ { !_partsOnt ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1307 "Desugar.hs" #-})) of+ { !_partsOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1311 "Desugar.hs" #-})) of+ { !_partsOdefs ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1315 "Desugar.hs" #-})) of+ { !_partsOcon ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1319 "Desugar.hs" #-})) of+ { !_partsOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1323 "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 1329 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1333 "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 1338 "Desugar.hs" #-})) of+ { !__tup2 ->+ (case (({-# LINE 109 "Desugar.ag" #-}+ __tup2+ {-# LINE 1342 "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 1350 "Desugar.hs" #-})) of+ { !_err2 ->+ (case (({-# LINE 109 "Desugar.ag" #-}+ __tup2+ {-# LINE 1354 "Desugar.hs" #-})) of+ { !(_,!_err1) ->+ (case (({-# LINE 116 "Desugar.ag" #-}+ _err1 Seq.>< _err2 Seq.>< _patIerrors Seq.>< _partsIerrors+ {-# LINE 1358 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 117 "Desugar.ag" #-}+ Alias _field' attr_ _patIoutput _partsIoutput+ {-# LINE 1362 "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 1368 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Pattern_Alias_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) }) }) )+sem_Pattern_Constr :: ConstructorIdent ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Constr !name_ !(T_Patterns pats_ ) =+ (T_Pattern (case ((pats_ )) of+ { ( !_patsIdefsCollect,!T_Patterns_1 pats_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _patsIdefsCollect+ {-# LINE 1382 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Pattern_Constr_1 :: T_Pattern_1 + sem_Pattern_Constr_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1394 "Desugar.hs" #-})) of+ { !_patsOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1398 "Desugar.hs" #-})) of+ { !_patsOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1402 "Desugar.hs" #-})) of+ { !_patsOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1406 "Desugar.hs" #-})) of+ { !_patsOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1410 "Desugar.hs" #-})) of+ { !_patsOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1414 "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 1420 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 1424 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1428 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _patsIerrors+ {-# LINE 1432 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Constr name_ _patsIoutput+ {-# LINE 1436 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1440 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Pattern_Constr_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )+sem_Pattern_Irrefutable :: T_Pattern ->+ T_Pattern +sem_Pattern_Irrefutable !(T_Pattern pat_ ) =+ (T_Pattern (case ((pat_ )) of+ { ( !_patIdefsCollect,!T_Pattern_1 pat_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _patIdefsCollect+ {-# LINE 1453 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Pattern_Irrefutable_1 :: T_Pattern_1 + sem_Pattern_Irrefutable_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 201 "Desugar.ag" #-}+ Map.empty+ {-# LINE 1465 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1469 "Desugar.hs" #-})) of+ { !_patOnt ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1473 "Desugar.hs" #-})) of+ { !_patOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1477 "Desugar.hs" #-})) of+ { !_patOdefs ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1481 "Desugar.hs" #-})) of+ { !_patOcon ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1485 "Desugar.hs" #-})) of+ { !_patOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1489 "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 1495 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1499 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _patIerrors+ {-# LINE 1503 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Irrefutable _patIoutput+ {-# LINE 1507 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1511 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Pattern_Irrefutable_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )+sem_Pattern_Product :: Pos ->+ T_Patterns ->+ T_Pattern +sem_Pattern_Product !pos_ !(T_Patterns pats_ ) =+ (T_Pattern (case ((pats_ )) of+ { ( !_patsIdefsCollect,!T_Patterns_1 pats_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _patsIdefsCollect+ {-# LINE 1525 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Pattern_Product_1 :: T_Pattern_1 + sem_Pattern_Product_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1537 "Desugar.hs" #-})) of+ { !_patsOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1541 "Desugar.hs" #-})) of+ { !_patsOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1545 "Desugar.hs" #-})) of+ { !_patsOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1549 "Desugar.hs" #-})) of+ { !_patsOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1553 "Desugar.hs" #-})) of+ { !_patsOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1557 "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 1563 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 1567 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1571 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _patsIerrors+ {-# LINE 1575 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Product pos_ _patsIoutput+ {-# LINE 1579 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1583 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Pattern_Product_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) }) )+sem_Pattern_Underscore :: Pos ->+ T_Pattern +sem_Pattern_Underscore !pos_ =+ (T_Pattern (case (({-# LINE 178 "Desugar.ag" #-}+ Set.empty+ {-# LINE 1594 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Pattern_Underscore_1 :: T_Pattern_1 + sem_Pattern_Underscore_1 =+ (T_Pattern_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ Map.empty+ {-# LINE 1606 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ Underscore pos_+ {-# LINE 1610 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1614 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 1618 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Underscore pos_+ {-# LINE 1622 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1626 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )+ in sem_Pattern_Underscore_1)) of+ { ( !sem_Pattern_1) ->+ ( _lhsOdefsCollect,sem_Pattern_1) }) }) )+-- Patterns ----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ defsCollect : Set (Identifier, Identifier)+ visit 1:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ defs : Set (Identifier, Identifier)+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ synthesized attributes:+ allAttributes : AttrMap+ copy : SELF + errors : Seq Error+ output : SELF + alternatives:+ alternative Cons:+ child hd : Pattern + child tl : Patterns + visit 1:+ local copy : _+ local output : _+ alternative Nil:+ visit 1:+ local copy : _+ local output : _+-}+-- cata+sem_Patterns :: Patterns ->+ T_Patterns +sem_Patterns !list =+ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) )+-- semantic domain+newtype T_Patterns = T_Patterns (( (Set (Identifier, Identifier)),T_Patterns_1 ))+newtype T_Patterns_1 = T_Patterns_1 (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ (Set (Identifier, Identifier)) ->+ AttrMap ->+ NontermIdent ->+ ( AttrMap,Patterns ,(Seq Error),Patterns ))+data Inh_Patterns = Inh_Patterns {childInhs_Inh_Patterns :: !(([(Identifier, Identifier)])),childSyns_Inh_Patterns :: !(([(Identifier, Identifier)])),con_Inh_Patterns :: !(ConstructorIdent),defs_Inh_Patterns :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Patterns :: !(AttrMap),nt_Inh_Patterns :: !(NontermIdent)}+data Syn_Patterns = Syn_Patterns {allAttributes_Syn_Patterns :: !(AttrMap),copy_Syn_Patterns :: !(Patterns ),defsCollect_Syn_Patterns :: !((Set (Identifier, Identifier))),errors_Syn_Patterns :: !((Seq Error)),output_Syn_Patterns :: !(Patterns )}+wrap_Patterns :: T_Patterns ->+ Inh_Patterns ->+ Syn_Patterns +wrap_Patterns !(T_Patterns sem ) !(Inh_Patterns _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt ) =+ (let ( !_lhsOdefsCollect,!T_Patterns_1 sem_1) =+ (sem )+ ( !_lhsOallAttributes,!_lhsOcopy,!_lhsOerrors,!_lhsOoutput) =+ (sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt )+ in (Syn_Patterns _lhsOallAttributes _lhsOcopy _lhsOdefsCollect _lhsOerrors _lhsOoutput ))+sem_Patterns_Cons :: T_Pattern ->+ T_Patterns ->+ T_Patterns +sem_Patterns_Cons !(T_Pattern hd_ ) !(T_Patterns tl_ ) =+ (T_Patterns (case ((tl_ )) of+ { ( !_tlIdefsCollect,!T_Patterns_1 tl_1) ->+ (case ((hd_ )) of+ { ( !_hdIdefsCollect,!T_Pattern_1 hd_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _hdIdefsCollect `Set.union` _tlIdefsCollect+ {-# LINE 1697 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Patterns_Cons_1 :: T_Patterns_1 + sem_Patterns_Cons_1 =+ (T_Patterns_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1709 "Desugar.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1713 "Desugar.hs" #-})) of+ { !_tlOcon ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1717 "Desugar.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 1721 "Desugar.hs" #-})) of+ { !_hdOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1725 "Desugar.hs" #-})) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1729 "Desugar.hs" #-})) of+ { !_tlOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1733 "Desugar.hs" #-})) of+ { !_tlOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1737 "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 1743 "Desugar.hs" #-})) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 1747 "Desugar.hs" #-})) of+ { !_hdOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 1751 "Desugar.hs" #-})) of+ { !_hdOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 1755 "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 1761 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 1765 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1769 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 1773 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 1777 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1781 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Patterns_Cons_1)) of+ { ( !sem_Patterns_1) ->+ ( _lhsOdefsCollect,sem_Patterns_1) }) }) }) }) )+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil =+ (T_Patterns (case (({-# LINE 178 "Desugar.ag" #-}+ Set.empty+ {-# LINE 1791 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Patterns_Nil_1 :: T_Patterns_1 + sem_Patterns_Nil_1 =+ (T_Patterns_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ Map.empty+ {-# LINE 1803 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ []+ {-# LINE 1807 "Desugar.hs" #-})) of+ { !_copy ->+ (case (({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 1811 "Desugar.hs" #-})) of+ { !_lhsOcopy ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 1815 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 1819 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1823 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOcopy,_lhsOerrors,_lhsOoutput) }) }) }) }) }) })) )+ in sem_Patterns_Nil_1)) of+ { ( !sem_Patterns_1) ->+ ( _lhsOdefsCollect,sem_Patterns_1) }) }) )+-- Production --------------------------------------------------+{-+ visit 0:+ inherited attributes:+ augmentsIn : Map ConstructorIdent (Map Identifier [Expression])+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ augmentsOut : Map ConstructorIdent (Map Identifier [Expression])+ errors : Seq Error+ output : SELF + alternatives:+ alternative Production:+ child con : {ConstructorIdent}+ child children : Children + child rules : Rules + child typeSigs : TypeSigs + visit 0:+ local augmentsIn : _+ local _tup3 : _+ local augmentsOut1 : _+ local augmentsOut : _+ local augmentErrs : _+ local output : _+-}+-- cata+sem_Production :: Production ->+ T_Production +sem_Production !(Production _con _children _rules _typeSigs ) =+ (sem_Production_Production _con (sem_Children _children ) (sem_Rules _rules ) (sem_TypeSigs _typeSigs ) )+-- semantic domain+newtype T_Production = T_Production ((Map ConstructorIdent (Map Identifier [Expression])) ->+ AttrMap ->+ NontermIdent ->+ Options ->+ ( AttrMap,(Map ConstructorIdent (Map Identifier [Expression])),(Seq Error),Production ))+data Inh_Production = Inh_Production {augmentsIn_Inh_Production :: !((Map ConstructorIdent (Map Identifier [Expression]))),forcedIrrefutables_Inh_Production :: !(AttrMap),nt_Inh_Production :: !(NontermIdent),options_Inh_Production :: !(Options)}+data Syn_Production = Syn_Production {allAttributes_Syn_Production :: !(AttrMap),augmentsOut_Syn_Production :: !((Map ConstructorIdent (Map Identifier [Expression]))),errors_Syn_Production :: !((Seq Error)),output_Syn_Production :: !(Production )}+wrap_Production :: T_Production ->+ Inh_Production ->+ Syn_Production +wrap_Production !(T_Production sem ) !(Inh_Production _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =+ (let ( !_lhsOallAttributes,!_lhsOaugmentsOut,!_lhsOerrors,!_lhsOoutput) =+ (sem _lhsIaugmentsIn _lhsIforcedIrrefutables _lhsInt _lhsIoptions )+ in (Syn_Production _lhsOallAttributes _lhsOaugmentsOut _lhsOerrors _lhsOoutput ))+sem_Production_Production :: ConstructorIdent ->+ T_Children ->+ T_Rules ->+ T_TypeSigs ->+ T_Production +sem_Production_Production !con_ !(T_Children children_ ) !(T_Rules rules_ ) !(T_TypeSigs typeSigs_ ) =+ (T_Production (\ (!_lhsIaugmentsIn)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 1888 "Desugar.hs" #-})) of+ { !_rulesOnt ->+ (case (({-# LINE 160 "Desugar.ag" #-}+ con_+ {-# LINE 1892 "Desugar.hs" #-})) of+ { !_rulesOcon ->+ (case ((rules_ )) of+ { ( !_rulesIdefsCollect,!T_Rules_1 rules_1) ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 1898 "Desugar.hs" #-})) of+ { !_rulesOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 1902 "Desugar.hs" #-})) of+ { !_rulesOforcedIrrefutables ->+ (case ((children_ )) of+ { ( !_childrenIchildInhs,!_childrenIchildSyns,!_childrenIoutput) ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _childrenIchildSyns+ {-# LINE 1908 "Desugar.hs" #-})) of+ { !_rulesOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _childrenIchildInhs+ {-# LINE 1912 "Desugar.hs" #-})) of+ { !_rulesOchildInhs ->+ (case (({-# LINE 187 "Desugar.ag" #-}+ _rulesIdefsCollect+ {-# LINE 1916 "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 1922 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 243 "Desugar.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaugmentsIn+ {-# LINE 1926 "Desugar.hs" #-})) of+ { !_augmentsIn ->+ (case (({-# LINE 246 "Desugar.ag" #-}+ Map.mapAccum (desugarExprs _lhsIoptions _lhsInt con_ _childrenIchildInhs _childrenIchildSyns) Seq.empty _augmentsIn+ {-# LINE 1930 "Desugar.hs" #-})) of+ { !__tup3 ->+ (case (({-# LINE 246 "Desugar.ag" #-}+ __tup3+ {-# LINE 1934 "Desugar.hs" #-})) of+ { !(_,!_augmentsOut1) ->+ (case (({-# LINE 244 "Desugar.ag" #-}+ Map.singleton con_ _augmentsOut1+ {-# LINE 1938 "Desugar.hs" #-})) of+ { !_augmentsOut ->+ (case (({-# LINE 230 "Desugar.ag" #-}+ _augmentsOut+ {-# LINE 1942 "Desugar.hs" #-})) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 246 "Desugar.ag" #-}+ __tup3+ {-# LINE 1946 "Desugar.hs" #-})) of+ { !(!_augmentErrs,_) ->+ (case (({-# LINE 282 "Desugar.ag" #-}+ _rulesIerrors Seq.>< _augmentErrs+ {-# LINE 1950 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case ((typeSigs_ )) of+ { ( !_typeSigsIoutput) ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Production con_ _childrenIoutput _rulesIoutput _typeSigsIoutput+ {-# LINE 1956 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 1960 "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 2016 "Desugar.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2020 "Desugar.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2024 "Desugar.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2028 "Desugar.hs" #-})) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 229 "Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 2032 "Desugar.hs" #-})) of+ { !_tlOaugmentsIn ->+ (case ((tl_ _tlOaugmentsIn _tlOforcedIrrefutables _tlOnt _tlOoptions )) of+ { ( !_tlIallAttributes,!_tlIaugmentsOut,!_tlIerrors,!_tlIoutput) ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2038 "Desugar.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2042 "Desugar.hs" #-})) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 229 "Desugar.ag" #-}+ _lhsIaugmentsIn+ {-# LINE 2046 "Desugar.hs" #-})) of+ { !_hdOaugmentsIn ->+ (case ((hd_ _hdOaugmentsIn _hdOforcedIrrefutables _hdOnt _hdOoptions )) of+ { ( !_hdIallAttributes,!_hdIaugmentsOut,!_hdIerrors,!_hdIoutput) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ _hdIallAttributes `mergeAttributes` _tlIallAttributes+ {-# LINE 2052 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 230 "Desugar.ag" #-}+ _hdIaugmentsOut `Map.union` _tlIaugmentsOut+ {-# LINE 2056 "Desugar.hs" #-})) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2060 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2064 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2068 "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 2079 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 230 "Desugar.ag" #-}+ Map.empty+ {-# LINE 2083 "Desugar.hs" #-})) of+ { !_lhsOaugmentsOut ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 2087 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 2091 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2095 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOaugmentsOut,_lhsOerrors,_lhsOoutput) }) }) }) }) })) )+-- Rule --------------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ defsCollect : Set (Identifier, Identifier)+ visit 1:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ defs : Set (Identifier, Identifier)+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ errors : Seq Error+ output : SELF + alternatives:+ alternative Rule:+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : Expression + child owrt : {Bool}+ child origin : {String}+ child explicit : {Bool}+ visit 1:+ local ruleDescr : _+ local output : _+-}+-- cata+sem_Rule :: Rule ->+ T_Rule +sem_Rule !(Rule _mbName _pattern _rhs _owrt _origin _explicit ) =+ (sem_Rule_Rule _mbName (sem_Pattern _pattern ) (sem_Expression _rhs ) _owrt _origin _explicit )+-- semantic domain+newtype T_Rule = T_Rule (( (Set (Identifier, Identifier)),T_Rule_1 ))+newtype T_Rule_1 = T_Rule_1 (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ (Set (Identifier, Identifier)) ->+ AttrMap ->+ NontermIdent ->+ Options ->+ ( AttrMap,(Seq Error),Rule ))+data Inh_Rule = Inh_Rule {childInhs_Inh_Rule :: !(([(Identifier, Identifier)])),childSyns_Inh_Rule :: !(([(Identifier, Identifier)])),con_Inh_Rule :: !(ConstructorIdent),defs_Inh_Rule :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Rule :: !(AttrMap),nt_Inh_Rule :: !(NontermIdent),options_Inh_Rule :: !(Options)}+data Syn_Rule = Syn_Rule {allAttributes_Syn_Rule :: !(AttrMap),defsCollect_Syn_Rule :: !((Set (Identifier, Identifier))),errors_Syn_Rule :: !((Seq Error)),output_Syn_Rule :: !(Rule )}+wrap_Rule :: T_Rule ->+ Inh_Rule ->+ Syn_Rule +wrap_Rule !(T_Rule sem ) !(Inh_Rule _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =+ (let ( !_lhsOdefsCollect,!T_Rule_1 sem_1) =+ (sem )+ ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) =+ (sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions )+ in (Syn_Rule _lhsOallAttributes _lhsOdefsCollect _lhsOerrors _lhsOoutput ))+sem_Rule_Rule :: (Maybe Identifier) ->+ T_Pattern ->+ T_Expression ->+ Bool ->+ String ->+ Bool ->+ T_Rule +sem_Rule_Rule !mbName_ !(T_Pattern pattern_ ) !(T_Expression rhs_ ) !owrt_ !origin_ !explicit_ =+ (T_Rule (case ((pattern_ )) of+ { ( !_patternIdefsCollect,!T_Pattern_1 pattern_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _patternIdefsCollect+ {-# LINE 2166 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Rule_Rule_1 :: T_Rule_1 + sem_Rule_Rule_1 =+ (T_Rule_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2179 "Desugar.hs" #-})) of+ { !_patternOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2183 "Desugar.hs" #-})) of+ { !_patternOcon ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2187 "Desugar.hs" #-})) of+ { !_patternOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2191 "Desugar.hs" #-})) of+ { !_patternOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2195 "Desugar.hs" #-})) of+ { !_patternOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2199 "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 2205 "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 2209 "Desugar.hs" #-})) of+ { !_ruleDescr ->+ (case (({-# LINE 167 "Desugar.ag" #-}+ _ruleDescr+ {-# LINE 2213 "Desugar.hs" #-})) of+ { !_rhsOruleDescr ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2217 "Desugar.hs" #-})) of+ { !_rhsOoptions ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2221 "Desugar.hs" #-})) of+ { !_rhsOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2225 "Desugar.hs" #-})) of+ { !_rhsOcon ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2229 "Desugar.hs" #-})) of+ { !_rhsOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2233 "Desugar.hs" #-})) of+ { !_rhsOchildInhs ->+ (case ((rhs_ _rhsOchildInhs _rhsOchildSyns _rhsOcon _rhsOnt _rhsOoptions _rhsOruleDescr )) of+ { ( !_rhsIerrors,!_rhsIoutput) ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _patternIerrors Seq.>< _rhsIerrors+ {-# LINE 2239 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ Rule mbName_ _patternIoutput _rhsIoutput owrt_ origin_ explicit_+ {-# LINE 2243 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2247 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Rule_Rule_1)) of+ { ( !sem_Rule_1) ->+ ( _lhsOdefsCollect,sem_Rule_1) }) }) }) )+-- Rules -------------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ defsCollect : Set (Identifier, Identifier)+ visit 1:+ inherited attributes:+ childInhs : [(Identifier, Identifier)]+ childSyns : [(Identifier, Identifier)]+ con : ConstructorIdent+ defs : Set (Identifier, Identifier)+ forcedIrrefutables : AttrMap+ nt : NontermIdent+ options : Options+ synthesized attributes:+ allAttributes : AttrMap+ errors : Seq Error+ output : SELF + alternatives:+ alternative Cons:+ child hd : Rule + child tl : Rules + visit 1:+ local output : _+ alternative Nil:+ visit 1:+ local output : _+-}+-- cata+sem_Rules :: Rules ->+ T_Rules +sem_Rules !list =+ (Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list) )+-- semantic domain+newtype T_Rules = T_Rules (( (Set (Identifier, Identifier)),T_Rules_1 ))+newtype T_Rules_1 = T_Rules_1 (([(Identifier, Identifier)]) ->+ ([(Identifier, Identifier)]) ->+ ConstructorIdent ->+ (Set (Identifier, Identifier)) ->+ AttrMap ->+ NontermIdent ->+ Options ->+ ( AttrMap,(Seq Error),Rules ))+data Inh_Rules = Inh_Rules {childInhs_Inh_Rules :: !(([(Identifier, Identifier)])),childSyns_Inh_Rules :: !(([(Identifier, Identifier)])),con_Inh_Rules :: !(ConstructorIdent),defs_Inh_Rules :: !((Set (Identifier, Identifier))),forcedIrrefutables_Inh_Rules :: !(AttrMap),nt_Inh_Rules :: !(NontermIdent),options_Inh_Rules :: !(Options)}+data Syn_Rules = Syn_Rules {allAttributes_Syn_Rules :: !(AttrMap),defsCollect_Syn_Rules :: !((Set (Identifier, Identifier))),errors_Syn_Rules :: !((Seq Error)),output_Syn_Rules :: !(Rules )}+wrap_Rules :: T_Rules ->+ Inh_Rules ->+ Syn_Rules +wrap_Rules !(T_Rules sem ) !(Inh_Rules _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions ) =+ (let ( !_lhsOdefsCollect,!T_Rules_1 sem_1) =+ (sem )+ ( !_lhsOallAttributes,!_lhsOerrors,!_lhsOoutput) =+ (sem_1 _lhsIchildInhs _lhsIchildSyns _lhsIcon _lhsIdefs _lhsIforcedIrrefutables _lhsInt _lhsIoptions )+ in (Syn_Rules _lhsOallAttributes _lhsOdefsCollect _lhsOerrors _lhsOoutput ))+sem_Rules_Cons :: T_Rule ->+ T_Rules ->+ T_Rules +sem_Rules_Cons !(T_Rule hd_ ) !(T_Rules tl_ ) =+ (T_Rules (case ((tl_ )) of+ { ( !_tlIdefsCollect,!T_Rules_1 tl_1) ->+ (case ((hd_ )) of+ { ( !_hdIdefsCollect,!T_Rule_1 hd_1) ->+ (case (({-# LINE 178 "Desugar.ag" #-}+ _hdIdefsCollect `Set.union` _tlIdefsCollect+ {-# LINE 2317 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Rules_Cons_1 :: T_Rules_1 + sem_Rules_Cons_1 =+ (T_Rules_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2330 "Desugar.hs" #-})) of+ { !_tlOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2334 "Desugar.hs" #-})) of+ { !_tlOcon ->+ (case (({-# LINE 151 "Desugar.ag" #-}+ _lhsInt+ {-# LINE 2338 "Desugar.hs" #-})) of+ { !_hdOnt ->+ (case (({-# LINE 152 "Desugar.ag" #-}+ _lhsIcon+ {-# LINE 2342 "Desugar.hs" #-})) of+ { !_hdOcon ->+ (case (({-# LINE 35 "Desugar.ag" #-}+ _lhsIoptions+ {-# LINE 2346 "Desugar.hs" #-})) of+ { !_tlOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2350 "Desugar.hs" #-})) of+ { !_tlOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2354 "Desugar.hs" #-})) of+ { !_tlOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2358 "Desugar.hs" #-})) of+ { !_tlOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2362 "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 2368 "Desugar.hs" #-})) of+ { !_hdOoptions ->+ (case (({-# LINE 214 "Desugar.ag" #-}+ _lhsIforcedIrrefutables+ {-# LINE 2372 "Desugar.hs" #-})) of+ { !_hdOforcedIrrefutables ->+ (case (({-# LINE 184 "Desugar.ag" #-}+ _lhsIdefs+ {-# LINE 2376 "Desugar.hs" #-})) of+ { !_hdOdefs ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildSyns+ {-# LINE 2380 "Desugar.hs" #-})) of+ { !_hdOchildSyns ->+ (case (({-# LINE 125 "Desugar.ag" #-}+ _lhsIchildInhs+ {-# LINE 2384 "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 2390 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 2394 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ (:) _hdIoutput _tlIoutput+ {-# LINE 2398 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2402 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Rules_Cons_1)) of+ { ( !sem_Rules_1) ->+ ( _lhsOdefsCollect,sem_Rules_1) }) }) }) }) )+sem_Rules_Nil :: T_Rules +sem_Rules_Nil =+ (T_Rules (case (({-# LINE 178 "Desugar.ag" #-}+ Set.empty+ {-# LINE 2412 "Desugar.hs" #-})) of+ { !_lhsOdefsCollect ->+ (case ((let sem_Rules_Nil_1 :: T_Rules_1 + sem_Rules_Nil_1 =+ (T_Rules_1 (\ (!_lhsIchildInhs)+ (!_lhsIchildSyns)+ (!_lhsIcon)+ (!_lhsIdefs)+ (!_lhsIforcedIrrefutables)+ (!_lhsInt)+ (!_lhsIoptions) ->+ (case (({-# LINE 195 "Desugar.ag" #-}+ Map.empty+ {-# LINE 2425 "Desugar.hs" #-})) of+ { !_lhsOallAttributes ->+ (case (({-# LINE 37 "Desugar.ag" #-}+ Seq.empty+ {-# LINE 2429 "Desugar.hs" #-})) of+ { !_lhsOerrors ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 2433 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2437 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOallAttributes,_lhsOerrors,_lhsOoutput) }) }) }) })) )+ in sem_Rules_Nil_1)) of+ { ( !sem_Rules_1) ->+ ( _lhsOdefsCollect,sem_Rules_1) }) }) )+-- TypeSig -----------------------------------------------------+{-+ visit 0:+ synthesized attribute:+ output : SELF + alternatives:+ alternative TypeSig:+ child name : {Identifier}+ child tp : {Type}+ visit 0:+ local output : _+-}+-- cata+sem_TypeSig :: TypeSig ->+ T_TypeSig +sem_TypeSig !(TypeSig _name _tp ) =+ (sem_TypeSig_TypeSig _name _tp )+-- semantic domain+newtype T_TypeSig = T_TypeSig (( TypeSig ))+data Inh_TypeSig = Inh_TypeSig {}+data Syn_TypeSig = Syn_TypeSig {output_Syn_TypeSig :: !(TypeSig )}+wrap_TypeSig :: T_TypeSig ->+ Inh_TypeSig ->+ Syn_TypeSig +wrap_TypeSig !(T_TypeSig sem ) !(Inh_TypeSig ) =+ (let ( !_lhsOoutput) =+ (sem )+ in (Syn_TypeSig _lhsOoutput ))+sem_TypeSig_TypeSig :: Identifier ->+ Type ->+ T_TypeSig +sem_TypeSig_TypeSig !name_ !tp_ =+ (T_TypeSig (case (({-# LINE 39 "Desugar.ag" #-}+ TypeSig name_ tp_+ {-# LINE 2477 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2481 "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 2525 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2529 "Desugar.hs" #-})) of+ { !_lhsOoutput ->+ ( _lhsOoutput) }) }) }) }) )+sem_TypeSigs_Nil :: T_TypeSigs +sem_TypeSigs_Nil =+ (T_TypeSigs (case (({-# LINE 39 "Desugar.ag" #-}+ []+ {-# LINE 2536 "Desugar.hs" #-})) of+ { !_output ->+ (case (({-# LINE 39 "Desugar.ag" #-}+ _output+ {-# LINE 2540 "Desugar.hs" #-})) of { !_lhsOoutput -> ( _lhsOoutput) }) }) )
src-derived/ErrorMessages.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (ErrorMessages.ag)+-- UUAGC 0.9.24 (ErrorMessages.ag) module ErrorMessages where {-# LINE 2 "ErrorMessages.ag" #-} @@ -139,7 +139,7 @@ data Error = ChildAsLocal (NontermIdent) (ConstructorIdent) (Identifier) | CustomError (Bool) (Pos) (PP_Doc) | CyclicSet (Identifier) - | DirectCirc (NontermIdent) (Bool) ([((Identifier,Identifier),[String],[String])]) + | DirectCirc (NontermIdent) (Bool) (([((Identifier,Identifier),[String],[String])])) | DupAlt (NontermIdent) (ConstructorIdent) (ConstructorIdent) | DupChild (NontermIdent) (ConstructorIdent) (Identifier) (Identifier) | DupInhAttr (NontermIdent) (Identifier) (Identifier) @@ -150,9 +150,9 @@ | DupSynAttr (NontermIdent) (Identifier) (Identifier) | DupSynonym (NontermIdent) (NontermIdent) | DupUnique (NontermIdent) (ConstructorIdent) (Identifier) - | InducedCirc (NontermIdent) (CInterface) ([((Identifier,Identifier),[String],[String])]) - | InstCirc (NontermIdent) (ConstructorIdent) (Identifier) (Bool) ([String]) - | LocalCirc (NontermIdent) (ConstructorIdent) (Identifier) (Bool) ([String]) + | InducedCirc (NontermIdent) (CInterface) (([((Identifier,Identifier),[String],[String])])) + | InstCirc (NontermIdent) (ConstructorIdent) (Identifier) (Bool) (([String])) + | LocalCirc (NontermIdent) (ConstructorIdent) (Identifier) (Bool) (([String])) | MissingInstSig (NontermIdent) (ConstructorIdent) (Identifier) | MissingNamedRule (NontermIdent) (Identifier) (Identifier) | MissingRule (NontermIdent) (ConstructorIdent) (Identifier) (Identifier) @@ -174,4 +174,4 @@ child tl : Errors alternative Nil: -}-type Errors = [(Error)]+type Errors = [Error ]
src-derived/Expression.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (Expression.ag)+-- UUAGC 0.9.24 (Expression.ag) module Expression where {-# LINE 2 "Expression.ag" #-} @@ -14,4 +14,4 @@ child pos : {Pos} child tks : {[HsToken]} -}-data Expression = Expression (Pos) ([HsToken]) +data Expression = Expression (Pos) (([HsToken]))
src-derived/GenerateCode.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (GenerateCode.ag)+-- UUAGC 0.9.24 (GenerateCode.ag) module GenerateCode where {-# LINE 9 "GenerateCode.ag" #-} @@ -273,7 +273,7 @@ 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)}+data Syn_CGrammar = Syn_CGrammar {errors_Syn_CGrammar :: !((Seq Error)),output_Syn_CGrammar :: !(Program)} wrap_CGrammar :: T_CGrammar -> Inh_CGrammar -> Syn_CGrammar @@ -540,8 +540,8 @@ String -> Attributes -> ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))-data Inh_CInterface = Inh_CInterface {inh_Inh_CInterface :: !(Attributes),nt_Inh_CInterface :: !(NontermIdent),o_case_Inh_CInterface :: !(Bool),o_cata_Inh_CInterface :: !(Bool),o_costcentre_Inh_CInterface :: !(Bool),o_data_Inh_CInterface :: !(Maybe Bool),o_linePragmas_Inh_CInterface :: !(Bool),o_monadic_Inh_CInterface :: !(Bool),o_newtypes_Inh_CInterface :: !(Bool),o_pretty_Inh_CInterface :: !(Bool),o_rename_Inh_CInterface :: !(Bool),o_sem_Inh_CInterface :: !(Bool),o_sig_Inh_CInterface :: !(Bool),o_splitsems_Inh_CInterface :: !(Bool),o_strictwrap_Inh_CInterface :: !(Bool),o_traces_Inh_CInterface :: !(Bool),o_unbox_Inh_CInterface :: !(Bool),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)}+data Inh_CInterface = Inh_CInterface {inh_Inh_CInterface :: !(Attributes),nt_Inh_CInterface :: !(NontermIdent),o_case_Inh_CInterface :: !(Bool),o_cata_Inh_CInterface :: !(Bool),o_costcentre_Inh_CInterface :: !(Bool),o_data_Inh_CInterface :: !((Maybe Bool)),o_linePragmas_Inh_CInterface :: !(Bool),o_monadic_Inh_CInterface :: !(Bool),o_newtypes_Inh_CInterface :: !(Bool),o_pretty_Inh_CInterface :: !(Bool),o_rename_Inh_CInterface :: !(Bool),o_sem_Inh_CInterface :: !(Bool),o_sig_Inh_CInterface :: !(Bool),o_splitsems_Inh_CInterface :: !(Bool),o_strictwrap_Inh_CInterface :: !(Bool),o_traces_Inh_CInterface :: !(Bool),o_unbox_Inh_CInterface :: !(Bool),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 @@ -814,8 +814,8 @@ Bool -> (Set NontermIdent) -> ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))-data Inh_CNonterminal = Inh_CNonterminal {allNts_Inh_CNonterminal :: !(Set NontermIdent),allPragmas_Inh_CNonterminal :: !(PragmaMap),aroundMap_Inh_CNonterminal :: !(Map NontermIdent (Map ConstructorIdent (Set Identifier))),contextMap_Inh_CNonterminal :: !(ContextMap),derivings_Inh_CNonterminal :: !(Derivings),o_case_Inh_CNonterminal :: !(Bool),o_cata_Inh_CNonterminal :: !(Bool),o_costcentre_Inh_CNonterminal :: !(Bool),o_data_Inh_CNonterminal :: !(Maybe Bool),o_linePragmas_Inh_CNonterminal :: !(Bool),o_monadic_Inh_CNonterminal :: !(Bool),o_newtypes_Inh_CNonterminal :: !(Bool),o_pretty_Inh_CNonterminal :: !(Bool),o_rename_Inh_CNonterminal :: !(Bool),o_sem_Inh_CNonterminal :: !(Bool),o_sig_Inh_CNonterminal :: !(Bool),o_splitsems_Inh_CNonterminal :: !(Bool),o_strictwrap_Inh_CNonterminal :: !(Bool),o_traces_Inh_CNonterminal :: !(Bool),o_unbox_Inh_CNonterminal :: !(Bool),paramMap_Inh_CNonterminal :: !(ParamMap),prefix_Inh_CNonterminal :: !(String),typeSyns_Inh_CNonterminal :: !(TypeSyns),unfoldSemDom_Inh_CNonterminal :: !(NontermIdent -> Int -> [String] -> Code.Type),with_sig_Inh_CNonterminal :: !(Bool),wrappers_Inh_CNonterminal :: !(Set NontermIdent)}-data Syn_CNonterminal = Syn_CNonterminal {chunks_Syn_CNonterminal :: !(Chunks),gathNts_Syn_CNonterminal :: !(Set NontermIdent),semDomUnfoldGath_Syn_CNonterminal :: !(Map (NontermIdent, Int) ([String], Code.Type))}+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),o_case_Inh_CNonterminal :: !(Bool),o_cata_Inh_CNonterminal :: !(Bool),o_costcentre_Inh_CNonterminal :: !(Bool),o_data_Inh_CNonterminal :: !((Maybe Bool)),o_linePragmas_Inh_CNonterminal :: !(Bool),o_monadic_Inh_CNonterminal :: !(Bool),o_newtypes_Inh_CNonterminal :: !(Bool),o_pretty_Inh_CNonterminal :: !(Bool),o_rename_Inh_CNonterminal :: !(Bool),o_sem_Inh_CNonterminal :: !(Bool),o_sig_Inh_CNonterminal :: !(Bool),o_splitsems_Inh_CNonterminal :: !(Bool),o_strictwrap_Inh_CNonterminal :: !(Bool),o_traces_Inh_CNonterminal :: !(Bool),o_unbox_Inh_CNonterminal :: !(Bool),paramMap_Inh_CNonterminal :: !(ParamMap),prefix_Inh_CNonterminal :: !(String),typeSyns_Inh_CNonterminal :: !(TypeSyns),unfoldSemDom_Inh_CNonterminal :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CNonterminal :: !(Bool),wrappers_Inh_CNonterminal :: !((Set NontermIdent))}+data Syn_CNonterminal = Syn_CNonterminal {chunks_Syn_CNonterminal :: !(Chunks),gathNts_Syn_CNonterminal :: !((Set NontermIdent)),semDomUnfoldGath_Syn_CNonterminal :: !((Map (NontermIdent, Int) ([String], Code.Type)))} wrap_CNonterminal :: T_CNonterminal -> Inh_CNonterminal -> Syn_CNonterminal @@ -1401,8 +1401,8 @@ Bool -> (Set NontermIdent) -> ( Chunks,(Set NontermIdent),(Map (NontermIdent, Int) ([String], Code.Type))))-data Inh_CNonterminals = Inh_CNonterminals {allNts_Inh_CNonterminals :: !(Set NontermIdent),allPragmas_Inh_CNonterminals :: !(PragmaMap),aroundMap_Inh_CNonterminals :: !(Map NontermIdent (Map ConstructorIdent (Set Identifier))),contextMap_Inh_CNonterminals :: !(ContextMap),derivings_Inh_CNonterminals :: !(Derivings),o_case_Inh_CNonterminals :: !(Bool),o_cata_Inh_CNonterminals :: !(Bool),o_costcentre_Inh_CNonterminals :: !(Bool),o_data_Inh_CNonterminals :: !(Maybe Bool),o_linePragmas_Inh_CNonterminals :: !(Bool),o_monadic_Inh_CNonterminals :: !(Bool),o_newtypes_Inh_CNonterminals :: !(Bool),o_pretty_Inh_CNonterminals :: !(Bool),o_rename_Inh_CNonterminals :: !(Bool),o_sem_Inh_CNonterminals :: !(Bool),o_sig_Inh_CNonterminals :: !(Bool),o_splitsems_Inh_CNonterminals :: !(Bool),o_strictwrap_Inh_CNonterminals :: !(Bool),o_traces_Inh_CNonterminals :: !(Bool),o_unbox_Inh_CNonterminals :: !(Bool),paramMap_Inh_CNonterminals :: !(ParamMap),prefix_Inh_CNonterminals :: !(String),typeSyns_Inh_CNonterminals :: !(TypeSyns),unfoldSemDom_Inh_CNonterminals :: !(NontermIdent -> Int -> [String] -> Code.Type),with_sig_Inh_CNonterminals :: !(Bool),wrappers_Inh_CNonterminals :: !(Set NontermIdent)}-data Syn_CNonterminals = Syn_CNonterminals {chunks_Syn_CNonterminals :: !(Chunks),gathNts_Syn_CNonterminals :: !(Set NontermIdent),semDomUnfoldGath_Syn_CNonterminals :: !(Map (NontermIdent, Int) ([String], Code.Type))}+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),o_case_Inh_CNonterminals :: !(Bool),o_cata_Inh_CNonterminals :: !(Bool),o_costcentre_Inh_CNonterminals :: !(Bool),o_data_Inh_CNonterminals :: !((Maybe Bool)),o_linePragmas_Inh_CNonterminals :: !(Bool),o_monadic_Inh_CNonterminals :: !(Bool),o_newtypes_Inh_CNonterminals :: !(Bool),o_pretty_Inh_CNonterminals :: !(Bool),o_rename_Inh_CNonterminals :: !(Bool),o_sem_Inh_CNonterminals :: !(Bool),o_sig_Inh_CNonterminals :: !(Bool),o_splitsems_Inh_CNonterminals :: !(Bool),o_strictwrap_Inh_CNonterminals :: !(Bool),o_traces_Inh_CNonterminals :: !(Bool),o_unbox_Inh_CNonterminals :: !(Bool),paramMap_Inh_CNonterminals :: !(ParamMap),prefix_Inh_CNonterminals :: !(String),typeSyns_Inh_CNonterminals :: !(TypeSyns),unfoldSemDom_Inh_CNonterminals :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CNonterminals :: !(Bool),wrappers_Inh_CNonterminals :: !((Set NontermIdent))}+data Syn_CNonterminals = Syn_CNonterminals {chunks_Syn_CNonterminals :: !(Chunks),gathNts_Syn_CNonterminals :: !((Set NontermIdent)),semDomUnfoldGath_Syn_CNonterminals :: !((Map (NontermIdent, Int) ([String], Code.Type)))} wrap_CNonterminals :: T_CNonterminals -> Inh_CNonterminals -> Syn_CNonterminals @@ -1909,8 +1909,8 @@ (NontermIdent -> Int -> [String] -> Code.Type) -> Bool -> ( Decl,([String]),DataAlt,Decls,([String])))-data Inh_CProduction = Inh_CProduction {allNts_Inh_CProduction :: !(Set NontermIdent),allPragmas_Inh_CProduction :: !(PragmaMap),aroundMap_Inh_CProduction :: !(Map ConstructorIdent (Set Identifier)),contextMap_Inh_CProduction :: !(ContextMap),inh_Inh_CProduction :: !(Attributes),nt_Inh_CProduction :: !(NontermIdent),o_case_Inh_CProduction :: !(Bool),o_cata_Inh_CProduction :: !(Bool),o_costcentre_Inh_CProduction :: !(Bool),o_data_Inh_CProduction :: !(Maybe Bool),o_linePragmas_Inh_CProduction :: !(Bool),o_monadic_Inh_CProduction :: !(Bool),o_newtypes_Inh_CProduction :: !(Bool),o_pretty_Inh_CProduction :: !(Bool),o_rename_Inh_CProduction :: !(Bool),o_sem_Inh_CProduction :: !(Bool),o_sig_Inh_CProduction :: !(Bool),o_splitsems_Inh_CProduction :: !(Bool),o_strictwrap_Inh_CProduction :: !(Bool),o_traces_Inh_CProduction :: !(Bool),o_unbox_Inh_CProduction :: !(Bool),paramMap_Inh_CProduction :: !(ParamMap),prefix_Inh_CProduction :: !(String),syn_Inh_CProduction :: !(Attributes),unfoldSemDom_Inh_CProduction :: !(NontermIdent -> Int -> [String] -> Code.Type),with_sig_Inh_CProduction :: !(Bool)}-data Syn_CProduction = Syn_CProduction {cataAlt_Syn_CProduction :: !(Decl),comments_Syn_CProduction :: !([String]),dataAlt_Syn_CProduction :: !(DataAlt),decls_Syn_CProduction :: !(Decls),semNames_Syn_CProduction :: !([String])}+data Inh_CProduction = Inh_CProduction {allNts_Inh_CProduction :: !((Set NontermIdent)),allPragmas_Inh_CProduction :: !(PragmaMap),aroundMap_Inh_CProduction :: !((Map ConstructorIdent (Set Identifier))),contextMap_Inh_CProduction :: !(ContextMap),inh_Inh_CProduction :: !(Attributes),nt_Inh_CProduction :: !(NontermIdent),o_case_Inh_CProduction :: !(Bool),o_cata_Inh_CProduction :: !(Bool),o_costcentre_Inh_CProduction :: !(Bool),o_data_Inh_CProduction :: !((Maybe Bool)),o_linePragmas_Inh_CProduction :: !(Bool),o_monadic_Inh_CProduction :: !(Bool),o_newtypes_Inh_CProduction :: !(Bool),o_pretty_Inh_CProduction :: !(Bool),o_rename_Inh_CProduction :: !(Bool),o_sem_Inh_CProduction :: !(Bool),o_sig_Inh_CProduction :: !(Bool),o_splitsems_Inh_CProduction :: !(Bool),o_strictwrap_Inh_CProduction :: !(Bool),o_traces_Inh_CProduction :: !(Bool),o_unbox_Inh_CProduction :: !(Bool),paramMap_Inh_CProduction :: !(ParamMap),prefix_Inh_CProduction :: !(String),syn_Inh_CProduction :: !(Attributes),unfoldSemDom_Inh_CProduction :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProduction :: !(Bool)}+data Syn_CProduction = Syn_CProduction {cataAlt_Syn_CProduction :: !(Decl),comments_Syn_CProduction :: !(([String])),dataAlt_Syn_CProduction :: !(DataAlt),decls_Syn_CProduction :: !(Decls),semNames_Syn_CProduction :: !(([String]))} wrap_CProduction :: T_CProduction -> Inh_CProduction -> Syn_CProduction @@ -2289,8 +2289,8 @@ (NontermIdent -> Int -> [String] -> Code.Type) -> Bool -> ( Decls,([String]),DataAlts,Decls,([String])))-data Inh_CProductions = Inh_CProductions {allNts_Inh_CProductions :: !(Set NontermIdent),allPragmas_Inh_CProductions :: !(PragmaMap),aroundMap_Inh_CProductions :: !(Map ConstructorIdent (Set Identifier)),contextMap_Inh_CProductions :: !(ContextMap),inh_Inh_CProductions :: !(Attributes),nt_Inh_CProductions :: !(NontermIdent),o_case_Inh_CProductions :: !(Bool),o_cata_Inh_CProductions :: !(Bool),o_costcentre_Inh_CProductions :: !(Bool),o_data_Inh_CProductions :: !(Maybe Bool),o_linePragmas_Inh_CProductions :: !(Bool),o_monadic_Inh_CProductions :: !(Bool),o_newtypes_Inh_CProductions :: !(Bool),o_pretty_Inh_CProductions :: !(Bool),o_rename_Inh_CProductions :: !(Bool),o_sem_Inh_CProductions :: !(Bool),o_sig_Inh_CProductions :: !(Bool),o_splitsems_Inh_CProductions :: !(Bool),o_strictwrap_Inh_CProductions :: !(Bool),o_traces_Inh_CProductions :: !(Bool),o_unbox_Inh_CProductions :: !(Bool),paramMap_Inh_CProductions :: !(ParamMap),prefix_Inh_CProductions :: !(String),syn_Inh_CProductions :: !(Attributes),unfoldSemDom_Inh_CProductions :: !(NontermIdent -> Int -> [String] -> Code.Type),with_sig_Inh_CProductions :: !(Bool)}-data Syn_CProductions = Syn_CProductions {cataAlts_Syn_CProductions :: !(Decls),comments_Syn_CProductions :: !([String]),dataAlts_Syn_CProductions :: !(DataAlts),decls_Syn_CProductions :: !(Decls),semNames_Syn_CProductions :: !([String])}+data Inh_CProductions = Inh_CProductions {allNts_Inh_CProductions :: !((Set NontermIdent)),allPragmas_Inh_CProductions :: !(PragmaMap),aroundMap_Inh_CProductions :: !((Map ConstructorIdent (Set Identifier))),contextMap_Inh_CProductions :: !(ContextMap),inh_Inh_CProductions :: !(Attributes),nt_Inh_CProductions :: !(NontermIdent),o_case_Inh_CProductions :: !(Bool),o_cata_Inh_CProductions :: !(Bool),o_costcentre_Inh_CProductions :: !(Bool),o_data_Inh_CProductions :: !((Maybe Bool)),o_linePragmas_Inh_CProductions :: !(Bool),o_monadic_Inh_CProductions :: !(Bool),o_newtypes_Inh_CProductions :: !(Bool),o_pretty_Inh_CProductions :: !(Bool),o_rename_Inh_CProductions :: !(Bool),o_sem_Inh_CProductions :: !(Bool),o_sig_Inh_CProductions :: !(Bool),o_splitsems_Inh_CProductions :: !(Bool),o_strictwrap_Inh_CProductions :: !(Bool),o_traces_Inh_CProductions :: !(Bool),o_unbox_Inh_CProductions :: !(Bool),paramMap_Inh_CProductions :: !(ParamMap),prefix_Inh_CProductions :: !(String),syn_Inh_CProductions :: !(Attributes),unfoldSemDom_Inh_CProductions :: !((NontermIdent -> Int -> [String] -> Code.Type)),with_sig_Inh_CProductions :: !(Bool)}+data Syn_CProductions = Syn_CProductions {cataAlts_Syn_CProductions :: !(Decls),comments_Syn_CProductions :: !(([String])),dataAlts_Syn_CProductions :: !(DataAlts),decls_Syn_CProductions :: !(Decls),semNames_Syn_CProductions :: !(([String]))} wrap_CProductions :: T_CProductions -> Inh_CProductions -> Syn_CProductions @@ -2887,8 +2887,8 @@ (NontermIdent -> Int -> [String] -> Code.Type) -> String -> ( Bool,(DeclBlocks -> DeclBlocks),([String]),Decls,([Decl]),([Identifier]),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,Maybe (Maybe Type))]),con_Inh_CRule :: !(ConstructorIdent),declsAbove_Inh_CRule :: !([Decl]),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_monadic_Inh_CRule :: !(Bool),o_newtypes_Inh_CRule :: !(Bool),o_pretty_Inh_CRule :: !(Bool),o_rename_Inh_CRule :: !(Bool),o_sem_Inh_CRule :: !(Bool),o_sig_Inh_CRule :: !(Bool),o_splitsems_Inh_CRule :: !(Bool),o_strictwrap_Inh_CRule :: !(Bool),o_traces_Inh_CRule :: !(Bool),o_unbox_Inh_CRule :: !(Bool),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]),exprs_Syn_CRule :: !(Exprs),tSigs_Syn_CRule :: !([Decl]),tps_Syn_CRule :: !([Type]),usedVars_Syn_CRule :: !(Set String)}+data Inh_CRule = Inh_CRule {allNts_Inh_CRule :: !((Set NontermIdent)),aroundMap_Inh_CRule :: !((Set Identifier)),children_Inh_CRule :: !(([(Identifier,Type,Maybe (Maybe Type))])),con_Inh_CRule :: !(ConstructorIdent),declsAbove_Inh_CRule :: !(([Decl])),inh_Inh_CRule :: !(Attributes),instVisitNrs_Inh_CRule :: !((Map Identifier Int)),nr_Inh_CRule :: !(Int),nt_Inh_CRule :: !(NontermIdent),o_case_Inh_CRule :: !(Bool),o_cata_Inh_CRule :: !(Bool),o_costcentre_Inh_CRule :: !(Bool),o_data_Inh_CRule :: !((Maybe Bool)),o_linePragmas_Inh_CRule :: !(Bool),o_monadic_Inh_CRule :: !(Bool),o_newtypes_Inh_CRule :: !(Bool),o_pretty_Inh_CRule :: !(Bool),o_rename_Inh_CRule :: !(Bool),o_sem_Inh_CRule :: !(Bool),o_sig_Inh_CRule :: !(Bool),o_splitsems_Inh_CRule :: !(Bool),o_strictwrap_Inh_CRule :: !(Bool),o_traces_Inh_CRule :: !(Bool),o_unbox_Inh_CRule :: !(Bool),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])),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 @@ -3146,7 +3146,7 @@ _lhsOcomments :: ([String]) _lhsOdecls :: Decls _lhsOdefinedInsts :: ([Identifier])- _patternIcopy :: Pattern+ _patternIcopy :: Pattern _patternIdefinedInsts :: ([Identifier]) _patternIpatternAttributes :: ([(Identifier, Identifier)]) -- "GenerateCode.ag"(line 141, column 12)@@ -3415,8 +3415,8 @@ String -> Attributes -> ( ([String]),([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))-data Inh_CSegment = Inh_CSegment {inh_Inh_CSegment :: !(Attributes),isLast_Inh_CSegment :: !(Bool),nr_Inh_CSegment :: !(Int),nt_Inh_CSegment :: !(NontermIdent),o_case_Inh_CSegment :: !(Bool),o_cata_Inh_CSegment :: !(Bool),o_costcentre_Inh_CSegment :: !(Bool),o_data_Inh_CSegment :: !(Maybe Bool),o_linePragmas_Inh_CSegment :: !(Bool),o_monadic_Inh_CSegment :: !(Bool),o_newtypes_Inh_CSegment :: !(Bool),o_pretty_Inh_CSegment :: !(Bool),o_rename_Inh_CSegment :: !(Bool),o_sem_Inh_CSegment :: !(Bool),o_sig_Inh_CSegment :: !(Bool),o_splitsems_Inh_CSegment :: !(Bool),o_strictwrap_Inh_CSegment :: !(Bool),o_traces_Inh_CSegment :: !(Bool),o_unbox_Inh_CSegment :: !(Bool),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)}+data Inh_CSegment = Inh_CSegment {inh_Inh_CSegment :: !(Attributes),isLast_Inh_CSegment :: !(Bool),nr_Inh_CSegment :: !(Int),nt_Inh_CSegment :: !(NontermIdent),o_case_Inh_CSegment :: !(Bool),o_cata_Inh_CSegment :: !(Bool),o_costcentre_Inh_CSegment :: !(Bool),o_data_Inh_CSegment :: !((Maybe Bool)),o_linePragmas_Inh_CSegment :: !(Bool),o_monadic_Inh_CSegment :: !(Bool),o_newtypes_Inh_CSegment :: !(Bool),o_pretty_Inh_CSegment :: !(Bool),o_rename_Inh_CSegment :: !(Bool),o_sem_Inh_CSegment :: !(Bool),o_sig_Inh_CSegment :: !(Bool),o_splitsems_Inh_CSegment :: !(Bool),o_strictwrap_Inh_CSegment :: !(Bool),o_traces_Inh_CSegment :: !(Bool),o_unbox_Inh_CSegment :: !(Bool),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 @@ -3583,8 +3583,8 @@ String -> Attributes -> ( ([String]),Bool,([Decl]),(Map (NontermIdent, Int) ([String], Code.Type)),Decls))-data Inh_CSegments = Inh_CSegments {inh_Inh_CSegments :: !(Attributes),nr_Inh_CSegments :: !(Int),nt_Inh_CSegments :: !(NontermIdent),o_case_Inh_CSegments :: !(Bool),o_cata_Inh_CSegments :: !(Bool),o_costcentre_Inh_CSegments :: !(Bool),o_data_Inh_CSegments :: !(Maybe Bool),o_linePragmas_Inh_CSegments :: !(Bool),o_monadic_Inh_CSegments :: !(Bool),o_newtypes_Inh_CSegments :: !(Bool),o_pretty_Inh_CSegments :: !(Bool),o_rename_Inh_CSegments :: !(Bool),o_sem_Inh_CSegments :: !(Bool),o_sig_Inh_CSegments :: !(Bool),o_splitsems_Inh_CSegments :: !(Bool),o_strictwrap_Inh_CSegments :: !(Bool),o_traces_Inh_CSegments :: !(Bool),o_unbox_Inh_CSegments :: !(Bool),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)}+data Inh_CSegments = Inh_CSegments {inh_Inh_CSegments :: !(Attributes),nr_Inh_CSegments :: !(Int),nt_Inh_CSegments :: !(NontermIdent),o_case_Inh_CSegments :: !(Bool),o_cata_Inh_CSegments :: !(Bool),o_costcentre_Inh_CSegments :: !(Bool),o_data_Inh_CSegments :: !((Maybe Bool)),o_linePragmas_Inh_CSegments :: !(Bool),o_monadic_Inh_CSegments :: !(Bool),o_newtypes_Inh_CSegments :: !(Bool),o_pretty_Inh_CSegments :: !(Bool),o_rename_Inh_CSegments :: !(Bool),o_sem_Inh_CSegments :: !(Bool),o_sig_Inh_CSegments :: !(Bool),o_splitsems_Inh_CSegments :: !(Bool),o_strictwrap_Inh_CSegments :: !(Bool),o_traces_Inh_CSegments :: !(Bool),o_unbox_Inh_CSegments :: !(Bool),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 @@ -4095,8 +4095,8 @@ (NontermIdent -> Int -> [String] -> Code.Type) -> Bool -> ( ([String]),Decls,(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, Maybe (Maybe Type))]),con_Inh_CVisit :: !(ConstructorIdent),contextMap_Inh_CVisit :: !(ContextMap),decls_Inh_CVisit :: !(Decls),inh_Inh_CVisit :: !(Attributes),instVisitNrs_Inh_CVisit :: !(Map Identifier Int),isLast_Inh_CVisit :: !(Bool),nextIntra_Inh_CVisit :: !(Exprs),nextIntraVars_Inh_CVisit :: !(Set String),nr_Inh_CVisit :: !(Int),nt_Inh_CVisit :: !(NontermIdent),o_case_Inh_CVisit :: !(Bool),o_cata_Inh_CVisit :: !(Bool),o_costcentre_Inh_CVisit :: !(Bool),o_data_Inh_CVisit :: !(Maybe Bool),o_linePragmas_Inh_CVisit :: !(Bool),o_monadic_Inh_CVisit :: !(Bool),o_newtypes_Inh_CVisit :: !(Bool),o_pretty_Inh_CVisit :: !(Bool),o_rename_Inh_CVisit :: !(Bool),o_sem_Inh_CVisit :: !(Bool),o_sig_Inh_CVisit :: !(Bool),o_splitsems_Inh_CVisit :: !(Bool),o_strictwrap_Inh_CVisit :: !(Bool),o_traces_Inh_CVisit :: !(Bool),o_unbox_Inh_CVisit :: !(Bool),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 {comments_Syn_CVisit :: !([String]),decls_Syn_CVisit :: !(Decls),gatherInstVisitNrs_Syn_CVisit :: !(Map Identifier Int),intra_Syn_CVisit :: !(Exprs),intraVars_Syn_CVisit :: !(Set String),semNames_Syn_CVisit :: !([String])}+data Inh_CVisit = Inh_CVisit {allNts_Inh_CVisit :: !((Set NontermIdent)),allPragmas_Inh_CVisit :: !(PragmaMap),aroundMap_Inh_CVisit :: !((Set Identifier)),children_Inh_CVisit :: !(([(Identifier,Type, Maybe (Maybe Type))])),con_Inh_CVisit :: !(ConstructorIdent),contextMap_Inh_CVisit :: !(ContextMap),decls_Inh_CVisit :: !(Decls),inh_Inh_CVisit :: !(Attributes),instVisitNrs_Inh_CVisit :: !((Map Identifier Int)),isLast_Inh_CVisit :: !(Bool),nextIntra_Inh_CVisit :: !(Exprs),nextIntraVars_Inh_CVisit :: !((Set String)),nr_Inh_CVisit :: !(Int),nt_Inh_CVisit :: !(NontermIdent),o_case_Inh_CVisit :: !(Bool),o_cata_Inh_CVisit :: !(Bool),o_costcentre_Inh_CVisit :: !(Bool),o_data_Inh_CVisit :: !((Maybe Bool)),o_linePragmas_Inh_CVisit :: !(Bool),o_monadic_Inh_CVisit :: !(Bool),o_newtypes_Inh_CVisit :: !(Bool),o_pretty_Inh_CVisit :: !(Bool),o_rename_Inh_CVisit :: !(Bool),o_sem_Inh_CVisit :: !(Bool),o_sig_Inh_CVisit :: !(Bool),o_splitsems_Inh_CVisit :: !(Bool),o_strictwrap_Inh_CVisit :: !(Bool),o_traces_Inh_CVisit :: !(Bool),o_unbox_Inh_CVisit :: !(Bool),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 {comments_Syn_CVisit :: !(([String])),decls_Syn_CVisit :: !(Decls),gatherInstVisitNrs_Syn_CVisit :: !((Map Identifier Int)),intra_Syn_CVisit :: !(Exprs),intraVars_Syn_CVisit :: !((Set String)),semNames_Syn_CVisit :: !(([String]))} wrap_CVisit :: T_CVisit -> Inh_CVisit -> Syn_CVisit @@ -4218,7 +4218,7 @@ _intraOterminals :: ([Identifier]) _intraOunfoldSemDom :: (NontermIdent -> Int -> [String] -> Code.Type) _vssIallTpsFound :: Bool- _vssIblockDecls :: DeclBlocks+ _vssIblockDecls :: DeclBlocks _vssIcomments :: ([String]) _vssIdecls :: Decls _vssIdeclsAbove :: ([Decl])@@ -4228,7 +4228,7 @@ _vssItps :: ([Type]) _vssIusedVars :: (Set String) _intraIallTpsFound :: Bool- _intraIblockDecls :: DeclBlocks+ _intraIblockDecls :: DeclBlocks _intraIcomments :: ([String]) _intraIdecls :: Decls _intraIdeclsAbove :: ([Decl])@@ -4851,8 +4851,8 @@ (NontermIdent -> Int -> [String] -> Code.Type) -> Bool -> ( ([String]),Decls,(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, Maybe (Maybe Type))]),con_Inh_CVisits :: !(ConstructorIdent),contextMap_Inh_CVisits :: !(ContextMap),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_monadic_Inh_CVisits :: !(Bool),o_newtypes_Inh_CVisits :: !(Bool),o_pretty_Inh_CVisits :: !(Bool),o_rename_Inh_CVisits :: !(Bool),o_sem_Inh_CVisits :: !(Bool),o_sig_Inh_CVisits :: !(Bool),o_splitsems_Inh_CVisits :: !(Bool),o_strictwrap_Inh_CVisits :: !(Bool),o_traces_Inh_CVisits :: !(Bool),o_unbox_Inh_CVisits :: !(Bool),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 {comments_Syn_CVisits :: !([String]),decls_Syn_CVisits :: !(Decls),gatherInstVisitNrs_Syn_CVisits :: !(Map Identifier Int),intra_Syn_CVisits :: !(Exprs),intraVars_Syn_CVisits :: !(Set String),isNil_Syn_CVisits :: !(Bool),semNames_Syn_CVisits :: !([String])}+data Inh_CVisits = Inh_CVisits {allNts_Inh_CVisits :: !((Set NontermIdent)),allPragmas_Inh_CVisits :: !(PragmaMap),aroundMap_Inh_CVisits :: !((Set Identifier)),children_Inh_CVisits :: !(([(Identifier,Type, Maybe (Maybe Type))])),con_Inh_CVisits :: !(ConstructorIdent),contextMap_Inh_CVisits :: !(ContextMap),inh_Inh_CVisits :: !(Attributes),instVisitNrs_Inh_CVisits :: !((Map Identifier Int)),nr_Inh_CVisits :: !(Int),nt_Inh_CVisits :: !(NontermIdent),o_case_Inh_CVisits :: !(Bool),o_cata_Inh_CVisits :: !(Bool),o_costcentre_Inh_CVisits :: !(Bool),o_data_Inh_CVisits :: !((Maybe Bool)),o_linePragmas_Inh_CVisits :: !(Bool),o_monadic_Inh_CVisits :: !(Bool),o_newtypes_Inh_CVisits :: !(Bool),o_pretty_Inh_CVisits :: !(Bool),o_rename_Inh_CVisits :: !(Bool),o_sem_Inh_CVisits :: !(Bool),o_sig_Inh_CVisits :: !(Bool),o_splitsems_Inh_CVisits :: !(Bool),o_strictwrap_Inh_CVisits :: !(Bool),o_traces_Inh_CVisits :: !(Bool),o_unbox_Inh_CVisits :: !(Bool),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 {comments_Syn_CVisits :: !(([String])),decls_Syn_CVisits :: !(Decls),gatherInstVisitNrs_Syn_CVisits :: !((Map Identifier Int)),intra_Syn_CVisits :: !(Exprs),intraVars_Syn_CVisits :: !((Set String)),isNil_Syn_CVisits :: !(Bool),semNames_Syn_CVisits :: !(([String]))} wrap_CVisits :: T_CVisits -> Inh_CVisits -> Syn_CVisits @@ -5486,8 +5486,8 @@ 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])}+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 @@ -5648,8 +5648,8 @@ 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])}+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 @@ -5760,9 +5760,9 @@ sem_Pattern (Underscore _pos ) = (sem_Pattern_Underscore _pos ) -- semantic domain-newtype T_Pattern = T_Pattern (( Pattern,([Identifier]),([(Identifier, Identifier)])))+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)])}+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 @@ -5778,11 +5778,11 @@ sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) = (T_Pattern (let _lhsOdefinedInsts :: ([Identifier]) _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern- _patIcopy :: Pattern+ _lhsOcopy :: Pattern + _patIcopy :: Pattern _patIdefinedInsts :: ([Identifier]) _patIpatternAttributes :: ([(Identifier, Identifier)])- _partsIcopy :: Patterns+ _partsIcopy :: Patterns _partsIdefinedInsts :: ([Identifier]) _partsIpatternAttributes :: ([(Identifier, Identifier)]) -- "GenerateCode.ag"(line 225, column 11)@@ -5816,8 +5816,8 @@ sem_Pattern_Constr name_ (T_Patterns pats_ ) = (T_Pattern (let _lhsOdefinedInsts :: ([Identifier]) _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern- _patsIcopy :: Patterns+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns _patsIdefinedInsts :: ([Identifier]) _patsIpatternAttributes :: ([(Identifier, Identifier)]) -- use rule "GenerateCode.ag"(line 223, column 55)@@ -5848,8 +5848,8 @@ sem_Pattern_Irrefutable (T_Pattern pat_ ) = (T_Pattern (let _lhsOdefinedInsts :: ([Identifier]) _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern- _patIcopy :: Pattern+ _lhsOcopy :: Pattern + _patIcopy :: Pattern _patIdefinedInsts :: ([Identifier]) _patIpatternAttributes :: ([(Identifier, Identifier)]) -- use rule "GenerateCode.ag"(line 223, column 55)@@ -5881,8 +5881,8 @@ sem_Pattern_Product pos_ (T_Patterns pats_ ) = (T_Pattern (let _lhsOdefinedInsts :: ([Identifier]) _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern- _patsIcopy :: Patterns+ _lhsOcopy :: Pattern + _patsIcopy :: Patterns _patsIdefinedInsts :: ([Identifier]) _patsIpatternAttributes :: ([(Identifier, Identifier)]) -- use rule "GenerateCode.ag"(line 223, column 55)@@ -5913,7 +5913,7 @@ sem_Pattern_Underscore pos_ = (T_Pattern (let _lhsOdefinedInsts :: ([Identifier]) _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Pattern+ _lhsOcopy :: Pattern -- use rule "GenerateCode.ag"(line 223, column 55) _lhsOdefinedInsts = ({-# LINE 223 "GenerateCode.ag" #-}@@ -5958,9 +5958,9 @@ 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)])))+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)])}+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 @@ -5974,11 +5974,11 @@ sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) = (T_Patterns (let _lhsOdefinedInsts :: ([Identifier]) _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Patterns- _hdIcopy :: Pattern+ _lhsOcopy :: Patterns + _hdIcopy :: Pattern _hdIdefinedInsts :: ([Identifier]) _hdIpatternAttributes :: ([(Identifier, Identifier)])- _tlIcopy :: Patterns+ _tlIcopy :: Patterns _tlIdefinedInsts :: ([Identifier]) _tlIpatternAttributes :: ([(Identifier, Identifier)]) -- use rule "GenerateCode.ag"(line 223, column 55)@@ -6010,7 +6010,7 @@ sem_Patterns_Nil = (T_Patterns (let _lhsOdefinedInsts :: ([Identifier]) _lhsOpatternAttributes :: ([(Identifier, Identifier)])- _lhsOcopy :: Patterns+ _lhsOcopy :: Patterns -- use rule "GenerateCode.ag"(line 223, column 55) _lhsOdefinedInsts = ({-# LINE 223 "GenerateCode.ag" #-}@@ -6123,9 +6123,9 @@ ([Identifier]) -> (NontermIdent -> Int -> [String] -> Code.Type) -> String ->- ( Bool,DeclBlocks,([String]),Decls,([Decl]),([Identifier]),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,Maybe (Maybe Type))]),con_Inh_Sequence :: !(ConstructorIdent),declsAbove_Inh_Sequence :: !([Decl]),inh_Inh_Sequence :: !(Attributes),instVisitNrs_Inh_Sequence :: !(Map Identifier Int),lastExpr_Inh_Sequence :: !(Expr),nr_Inh_Sequence :: !(Int),nt_Inh_Sequence :: !(NontermIdent),o_case_Inh_Sequence :: !(Bool),o_cata_Inh_Sequence :: !(Bool),o_costcentre_Inh_Sequence :: !(Bool),o_data_Inh_Sequence :: !(Maybe Bool),o_linePragmas_Inh_Sequence :: !(Bool),o_monadic_Inh_Sequence :: !(Bool),o_newtypes_Inh_Sequence :: !(Bool),o_pretty_Inh_Sequence :: !(Bool),o_rename_Inh_Sequence :: !(Bool),o_sem_Inh_Sequence :: !(Bool),o_sig_Inh_Sequence :: !(Bool),o_splitsems_Inh_Sequence :: !(Bool),o_strictwrap_Inh_Sequence :: !(Bool),o_traces_Inh_Sequence :: !(Bool),o_unbox_Inh_Sequence :: !(Bool),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]),exprs_Syn_Sequence :: !(Exprs),tSigs_Syn_Sequence :: !([Decl]),tps_Syn_Sequence :: !([Type]),usedVars_Syn_Sequence :: !(Set String)}+ ( Bool,DeclBlocks ,([String]),Decls,([Decl]),([Identifier]),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,Maybe (Maybe Type))])),con_Inh_Sequence :: !(ConstructorIdent),declsAbove_Inh_Sequence :: !(([Decl])),inh_Inh_Sequence :: !(Attributes),instVisitNrs_Inh_Sequence :: !((Map Identifier Int)),lastExpr_Inh_Sequence :: !(Expr),nr_Inh_Sequence :: !(Int),nt_Inh_Sequence :: !(NontermIdent),o_case_Inh_Sequence :: !(Bool),o_cata_Inh_Sequence :: !(Bool),o_costcentre_Inh_Sequence :: !(Bool),o_data_Inh_Sequence :: !((Maybe Bool)),o_linePragmas_Inh_Sequence :: !(Bool),o_monadic_Inh_Sequence :: !(Bool),o_newtypes_Inh_Sequence :: !(Bool),o_pretty_Inh_Sequence :: !(Bool),o_rename_Inh_Sequence :: !(Bool),o_sem_Inh_Sequence :: !(Bool),o_sig_Inh_Sequence :: !(Bool),o_splitsems_Inh_Sequence :: !(Bool),o_strictwrap_Inh_Sequence :: !(Bool),o_traces_Inh_Sequence :: !(Bool),o_unbox_Inh_Sequence :: !(Bool),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])),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 @@ -6169,7 +6169,7 @@ _lhsIterminals _lhsIunfoldSemDom _lhsIwhat ->- (let _lhsOblockDecls :: DeclBlocks+ (let _lhsOblockDecls :: DeclBlocks _lhsOallTpsFound :: Bool _lhsOcomments :: ([String]) _lhsOdecls :: Decls@@ -6253,7 +6253,7 @@ _hdItps :: ([Type]) _hdIusedVars :: (Set String) _tlIallTpsFound :: Bool- _tlIblockDecls :: DeclBlocks+ _tlIblockDecls :: DeclBlocks _tlIcomments :: ([String]) _tlIdecls :: Decls _tlIdeclsAbove :: ([Decl])@@ -6666,7 +6666,7 @@ _lhsIterminals _lhsIunfoldSemDom _lhsIwhat ->- (let _lhsOblockDecls :: DeclBlocks+ (let _lhsOblockDecls :: DeclBlocks _lhsOallTpsFound :: Bool _lhsOcomments :: ([String]) _lhsOdecls :: Decls
src-derived/HsToken.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (HsToken.ag)+-- UUAGC 0.9.24 (HsToken.ag) module HsToken where {-# LINE 2 "HsToken.ag" #-} @@ -32,8 +32,8 @@ child value : {String} child pos : {Pos} -}-data HsToken = AGField (Identifier) (Identifier) (Pos) (Maybe String) - | AGLocal (Identifier) (Pos) (Maybe String) +data HsToken = AGField (Identifier) (Identifier) (Pos) ((Maybe String)) + | AGLocal (Identifier) (Pos) ((Maybe String)) | CharToken (String) (Pos) | Err (String) (Pos) | HsToken (String) (Pos) @@ -46,11 +46,11 @@ child tl : HsTokens alternative Nil: -}-type HsTokens = [(HsToken)]+type HsTokens = [HsToken ] -- HsTokensRoot ------------------------------------------------ {- alternatives: alternative HsTokensRoot: child tokens : HsTokens -}-data HsTokensRoot = HsTokensRoot (HsTokens) +data HsTokensRoot = HsTokensRoot (HsTokens )
src-derived/Interfaces.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (Interfaces.ag)+-- UUAGC 0.9.24 (Interfaces.ag) module Interfaces where {-# LINE 2 "Interfaces.ag" #-} @@ -13,7 +13,7 @@ alternative IRoot: child inters : Interfaces -}-data IRoot = IRoot (Interfaces) +data IRoot = IRoot (Interfaces ) -- Interface --------------------------------------------------- {- alternatives:@@ -22,7 +22,7 @@ child cons : {[ConstructorIdent]} child seg : Segments -}-data Interface = Interface (NontermIdent) ([ConstructorIdent]) (Segments) +data Interface = Interface (NontermIdent) (([ConstructorIdent])) (Segments ) -- Interfaces -------------------------------------------------- {- alternatives:@@ -31,7 +31,7 @@ child tl : Interfaces alternative Nil: -}-type Interfaces = [(Interface)]+type Interfaces = [Interface ] -- Segment ----------------------------------------------------- {- alternatives:@@ -39,7 +39,7 @@ child inh : {[Vertex]} child syn : {[Vertex]} -}-data Segment = Segment ([Vertex]) ([Vertex]) +data Segment = Segment (([Vertex])) (([Vertex])) -- Segments ---------------------------------------------------- {- alternatives:@@ -48,4 +48,4 @@ child tl : Segments alternative Nil: -}-type Segments = [(Segment)]+type Segments = [Segment ]
src-derived/InterfacesRules.hs view
@@ -1,1283 +1,1247 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.21 (InterfacesRules.lag)-module InterfacesRules where-{-# LINE 10 "InterfacesRules.lag" #-}--import Interfaces-import SequentialTypes-import CodeSyntax-import GrammarInfo--import qualified Data.Sequence as Seq-import Data.Sequence(Seq)-import qualified Data.Map as Map-import Data.Map(Map)-import qualified Data.Set as Set-import Data.Set(Set)-import Data.Tree(Tree(Node))-import Data.Graph(Graph, dfs, edges, buildG, transposeG)-import Data.Maybe (fromJust)-import Data.List (partition,transpose,(\\),nub,intersect, findIndex)-import Data.Array ((!),inRange,bounds,assocs)-import Data.Foldable(toList)--import Debug.Trace(trace)-{-# LINE 27 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 2 "./Interfaces.ag" #-}--import CommonTypes-import SequentialTypes-{-# LINE 33 "../src-derived/InterfacesRules.hs" #-}-{-# LINE 58 "InterfacesRules.lag" #-}--type VisitSS = [Vertex]-{-# LINE 37 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 93 "InterfacesRules.lag" #-}--gather :: Info -> [Vertex] -> [[Vertex]]-gather info = eqClasses comp- where comp a b = isEqualField (ruleTable info ! a) (ruleTable info ! b)-{-# LINE 44 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 134 "InterfacesRules.lag" #-}---- Only non-empty syn will ever be forced, because visits with empty syn are never performed--- Right hand side synthesized attributes always have a field-cv :: (Vertex -> CRule) -> Int -> Vertex -> ([Vertex],[Vertex]) -> (Vertex,ChildVisit)-cv look n v (inh,syn) = let fld = getField (look (head syn))- rnt = fromJust (getRhsNt (look (head syn)))- d = ChildVisit fld rnt n inh syn- in (v,d)-{-# LINE 55 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 157 "InterfacesRules.lag" #-}--ed v (inh,syn) = map (\i -> (i,v)) inh ++ map (\s -> (v,s)) syn-{-# LINE 60 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 244 "InterfacesRules.lag" #-}--postorder (Node a ts) = postorderF ts ++ [a]-postorderF = concatMap postorder-postOrd g = postorderF . dfs g-topSort' g = postOrd g-{-# LINE 68 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 323 "InterfacesRules.lag" #-}--type IntraVisit = [Vertex]-{-# LINE 73 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 345 "InterfacesRules.lag" #-}--swap (a,b) = (b,a)-{-# LINE 78 "../src-derived/InterfacesRules.hs" #-}--{-# LINE 419 "InterfacesRules.lag" #-}--ccv :: Identifier -> NontermIdent -> Int -> CInterfaceMap -> CRule-ccv name nt n table- = CChildVisit name nt n inh syn last- where CInterface segs = Map.findWithDefault (error ("InterfacesRules::ccv::interfaces not in table for nt: " ++ show nt)) nt table- (seg:remain) = drop n segs- CSegment inh syn = seg - last = null remain-{-# LINE 89 "../src-derived/InterfacesRules.hs" #-}--- IRoot --------------------------------------------------------{-- visit 0:- inherited attributes:- dpr : [Edge]- info : Info- tdp : Graph- synthesized attributes:- edp : [Edge]- inters : CInterfaceMap- visits : CVisitsMap- alternatives:- alternative IRoot:- child inters : Interfaces - visit 0:- local newedges : _- local visitssGraph : _- local descr : _--}--- cata-sem_IRoot :: IRoot ->- T_IRoot -sem_IRoot !(IRoot _inters ) =- (sem_IRoot_IRoot (sem_Interfaces _inters ) )--- semantic domain-newtype T_IRoot = T_IRoot (([Edge]) ->- Info ->- Graph ->- ( ([Edge]),CInterfaceMap,CVisitsMap))-data Inh_IRoot = Inh_IRoot {dpr_Inh_IRoot :: !([Edge]),info_Inh_IRoot :: !(Info),tdp_Inh_IRoot :: !(Graph)}-data Syn_IRoot = Syn_IRoot {edp_Syn_IRoot :: !([Edge]),inters_Syn_IRoot :: !(CInterfaceMap),visits_Syn_IRoot :: !(CVisitsMap)}-wrap_IRoot :: T_IRoot ->- Inh_IRoot ->- Syn_IRoot -wrap_IRoot !(T_IRoot sem ) !(Inh_IRoot _lhsIdpr _lhsIinfo _lhsItdp ) =- (let ( !_lhsOedp,!_lhsOinters,!_lhsOvisits) =- (sem _lhsIdpr _lhsIinfo _lhsItdp )- in (Syn_IRoot _lhsOedp _lhsOinters _lhsOvisits ))-sem_IRoot_IRoot :: T_Interfaces ->- T_IRoot -sem_IRoot_IRoot !(T_Interfaces inters_ ) =- (T_IRoot (\ (!_lhsIdpr)- (!_lhsIinfo)- (!_lhsItdp) ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 136 "InterfacesRules.hs" #-})) of- { !_intersOinfo ->- (case (({-# LINE 85 "InterfacesRules.lag" #-}- snd (bounds _lhsItdp) + 1- {-# LINE 140 "InterfacesRules.hs" #-})) of- { !_intersOv ->- (case ((inters_ _intersOinfo _intersOv )) of- { ( !_intersIdescr,!_intersIfirstvisitvertices,!_intersInewedges,!_intersIv,!T_Interfaces_1 inters_1) ->- (case (({-# LINE 260 "InterfacesRules.lag" #-}- let terminals = [ v | (v,cr) <- assocs (ruleTable _lhsIinfo), not (getHasCode cr), isLocal cr ]- in _intersIfirstvisitvertices ++ terminals- {-# LINE 147 "InterfacesRules.hs" #-})) of- { !_intersOprev ->- (case (({-# LINE 71 "InterfacesRules.lag" #-}- toList _intersInewedges- {-# LINE 151 "InterfacesRules.hs" #-})) of- { !_newedges ->- (case (({-# LINE 72 "InterfacesRules.lag" #-}- let graph = buildG (0,_intersIv-1) es- es = _newedges ++ edges _lhsItdp- in transposeG graph- {-# LINE 157 "InterfacesRules.hs" #-})) of- { !_visitssGraph ->- (case (({-# LINE 218 "InterfacesRules.lag" #-}- _visitssGraph- {-# LINE 161 "InterfacesRules.hs" #-})) of- { !_intersOvssGraph ->- (case (({-# LINE 147 "InterfacesRules.lag" #-}- toList _intersIdescr- {-# LINE 165 "InterfacesRules.hs" #-})) of- { !_descr ->- (case (({-# LINE 127 "InterfacesRules.lag" #-}- Map.fromList _descr- {-# LINE 169 "InterfacesRules.hs" #-})) of- { !_intersOvisitDescr ->- (case ((inters_1 _intersOprev _intersOvisitDescr _intersOvssGraph )) of- { ( !_intersIinters,!T_Interfaces_2 inters_2) ->- (case (({-# LINE 380 "InterfacesRules.lag" #-}- _intersIinters- {-# LINE 175 "InterfacesRules.hs" #-})) of- { !_intersOallInters ->- (case (({-# LINE 343 "InterfacesRules.lag" #-}- buildG (0,_intersIv-1) (map swap (_lhsIdpr ++ _newedges))- {-# LINE 179 "InterfacesRules.hs" #-})) of- { !_intersOddp ->- (case ((inters_2 _intersOallInters _intersOddp )) of- { ( !_intersIedp,!_intersIvisits) ->- (case (({-# LINE 442 "InterfacesRules.lag" #-}- toList _intersIedp- {-# LINE 185 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 382 "InterfacesRules.lag" #-}- _intersIinters- {-# LINE 189 "InterfacesRules.hs" #-})) of- { !_lhsOinters ->- (case (({-# LINE 383 "InterfacesRules.lag" #-}- _intersIvisits- {-# LINE 193 "InterfacesRules.hs" #-})) of- { !_lhsOvisits ->- ( _lhsOedp,_lhsOinters,_lhsOvisits) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )--- Interface ----------------------------------------------------{-- visit 0:- inherited attribute:- info : Info- chained attribute:- v : Vertex- synthesized attributes:- descr : Seq (Vertex,ChildVisit)- firstvisitvertices : [Vertex]- newedges : Seq Edge - visit 1:- inherited attributes:- prev : [Vertex]- visitDescr : Map Vertex ChildVisit- vssGraph : Graph- synthesized attributes:- inter : CInterface- nt : NontermIdent- visit 2:- inherited attributes:- allInters : CInterfaceMap- ddp : Graph- synthesized attributes:- edp : Seq Edge- visits : Map ConstructorIdent CVisits- alternatives:- alternative Interface:- child nt : {NontermIdent}- child cons : {[ConstructorIdent]}- child seg : Segments - visit 0:- local look : {Vertex -> CRule}- local v : _- local firstvisitvertices : _- local descr : _- local newedges : _--}--- cata-sem_Interface :: Interface ->- T_Interface -sem_Interface !(Interface _nt _cons _seg ) =- (sem_Interface_Interface _nt _cons (sem_Segments _seg ) )--- semantic domain-newtype T_Interface = T_Interface (Info ->- Vertex ->- ( (Seq (Vertex,ChildVisit)),([Vertex]),(Seq Edge ),Vertex,T_Interface_1 ))-newtype T_Interface_1 = T_Interface_1 (([Vertex]) ->- (Map Vertex ChildVisit) ->- Graph ->- ( CInterface,NontermIdent,T_Interface_2 ))-newtype T_Interface_2 = T_Interface_2 (CInterfaceMap ->- Graph ->- ( (Seq Edge),(Map ConstructorIdent CVisits)))-data Inh_Interface = Inh_Interface {allInters_Inh_Interface :: !(CInterfaceMap),ddp_Inh_Interface :: !(Graph),info_Inh_Interface :: !(Info),prev_Inh_Interface :: !([Vertex]),v_Inh_Interface :: !(Vertex),visitDescr_Inh_Interface :: !(Map Vertex ChildVisit),vssGraph_Inh_Interface :: !(Graph)}-data Syn_Interface = Syn_Interface {descr_Syn_Interface :: !(Seq (Vertex,ChildVisit)),edp_Syn_Interface :: !(Seq Edge),firstvisitvertices_Syn_Interface :: !([Vertex]),inter_Syn_Interface :: !(CInterface),newedges_Syn_Interface :: !(Seq Edge ),nt_Syn_Interface :: !(NontermIdent),v_Syn_Interface :: !(Vertex),visits_Syn_Interface :: !(Map ConstructorIdent CVisits)}-wrap_Interface :: T_Interface ->- Inh_Interface ->- Syn_Interface -wrap_Interface !(T_Interface sem ) !(Inh_Interface _lhsIallInters _lhsIddp _lhsIinfo _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =- (let ( !_lhsOdescr,!_lhsOfirstvisitvertices,!_lhsOnewedges,!_lhsOv,!T_Interface_1 sem_1) =- (sem _lhsIinfo _lhsIv )- ( !_lhsOinter,!_lhsOnt,!T_Interface_2 sem_2) =- (sem_1 _lhsIprev _lhsIvisitDescr _lhsIvssGraph )- ( !_lhsOedp,!_lhsOvisits) =- (sem_2 _lhsIallInters _lhsIddp )- in (Syn_Interface _lhsOdescr _lhsOedp _lhsOfirstvisitvertices _lhsOinter _lhsOnewedges _lhsOnt _lhsOv _lhsOvisits ))-sem_Interface_Interface :: NontermIdent ->- ([ConstructorIdent]) ->- T_Segments ->- T_Interface -sem_Interface_Interface !nt_ !cons_ !(T_Segments seg_ ) =- (T_Interface (\ (!_lhsIinfo)- (!_lhsIv) ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 272 "InterfacesRules.hs" #-})) of- { !_segOinfo ->- (case (({-# LINE 205 "InterfacesRules.lag" #-}- 0- {-# LINE 276 "InterfacesRules.hs" #-})) of- { !_segOn ->- (case (({-# LINE 195 "InterfacesRules.lag" #-}- \a -> ruleTable _lhsIinfo ! a- {-# LINE 280 "InterfacesRules.hs" #-})) of- { !_look ->- (case (({-# LINE 187 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 284 "InterfacesRules.hs" #-})) of- { !_segOv ->- (case ((seg_ _segOinfo _segOn _segOv )) of- { ( !_segIdescr,!_segIgroups,!_segInewedges,!_segInewvertices,!_segIv,!T_Segments_1 seg_1) ->- (case (({-# LINE 188 "InterfacesRules.lag" #-}- _segIv + length _segInewvertices- {-# LINE 290 "InterfacesRules.hs" #-})) of- { !_v ->- (case (({-# LINE 190 "InterfacesRules.lag" #-}- [_segIv .. _v-1]- {-# LINE 294 "InterfacesRules.hs" #-})) of- { !_firstvisitvertices ->- (case (({-# LINE 196 "InterfacesRules.lag" #-}- zipWith (cv _look (-1)) _firstvisitvertices _segIgroups- {-# LINE 298 "InterfacesRules.hs" #-})) of- { !_descr ->- (case (({-# LINE 197 "InterfacesRules.lag" #-}- _segIdescr Seq.>< Seq.fromList _descr- {-# LINE 302 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 258 "InterfacesRules.lag" #-}- _firstvisitvertices- {-# LINE 306 "InterfacesRules.hs" #-})) of- { !_lhsOfirstvisitvertices ->- (case (({-# LINE 191 "InterfacesRules.lag" #-}- zip _firstvisitvertices _segInewvertices- {-# LINE 310 "InterfacesRules.hs" #-})) of- { !_newedges ->- (case (({-# LINE 192 "InterfacesRules.lag" #-}- _segInewedges Seq.>< Seq.fromList _newedges- {-# LINE 314 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 189 "InterfacesRules.lag" #-}- _v- {-# LINE 318 "InterfacesRules.hs" #-})) of- { !_lhsOv ->- (case ((sem_Interface_Interface_1 cons_ (T_Segments_1 seg_1 ) nt_ )) of- { ( !sem_Interface_1) ->- ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interface_1) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Interface_Interface_1 :: ([ConstructorIdent]) ->- T_Segments_1 ->- NontermIdent ->- T_Interface_1 -sem_Interface_Interface_1 !cons_ !(T_Segments_1 seg_1 ) !nt_ =- (T_Interface_1 (\ (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 333 "InterfacesRules.hs" #-})) of- { !_segOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 337 "InterfacesRules.hs" #-})) of- { !_segOvisitDescr ->- (case (({-# LINE 263 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 341 "InterfacesRules.hs" #-})) of- { !_segOprev ->- (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 (({-# LINE 395 "InterfacesRules.lag" #-}- CInterface _segIsegs- {-# LINE 351 "InterfacesRules.hs" #-})) of- { !_lhsOinter ->- (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) ->- ( _lhsOinter,_lhsOnt,sem_Interface_2) }) }) }) }) }) }) }) })) )-sem_Interface_Interface_2 :: ([Vertex]) ->- T_Segments_2 ->- ([ConstructorIdent]) ->- T_Interface_2 -sem_Interface_Interface_2 !_lhsIprev !(T_Segments_2 seg_2 ) !cons_ =- (T_Interface_2 (\ (!_lhsIallInters)- (!_lhsIddp) ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 369 "InterfacesRules.hs" #-})) of- { !_segOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 373 "InterfacesRules.hs" #-})) of- { !_segOallInters ->- (case (({-# LINE 351 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 377 "InterfacesRules.hs" #-})) of- { !_segOfromLhs ->- (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 (({-# LINE 437 "InterfacesRules.lag" #-}- _segIedp- {-# LINE 387 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 396 "InterfacesRules.lag" #-}- Map.fromList (zip cons_ (transpose _segIcvisits))- {-# LINE 391 "InterfacesRules.hs" #-})) of- { !_lhsOvisits ->- ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) })) )--- Interfaces ---------------------------------------------------{-- visit 0:- inherited attribute:- info : Info- chained attribute:- v : Vertex- synthesized attributes:- descr : Seq (Vertex,ChildVisit)- firstvisitvertices : [Vertex]- newedges : Seq Edge - visit 1:- inherited attributes:- prev : [Vertex]- visitDescr : Map Vertex ChildVisit- vssGraph : Graph- synthesized attribute:- inters : CInterfaceMap- visit 2:- inherited attributes:- allInters : CInterfaceMap- ddp : Graph- synthesized attributes:- edp : Seq Edge- visits : CVisitsMap- alternatives:- alternative Cons:- child hd : Interface - child tl : Interfaces - alternative Nil:--}--- cata-sem_Interfaces :: Interfaces ->- T_Interfaces -sem_Interfaces !list =- (Prelude.foldr sem_Interfaces_Cons sem_Interfaces_Nil (Prelude.map sem_Interface list) )--- semantic domain-newtype T_Interfaces = T_Interfaces (Info ->- Vertex ->- ( (Seq (Vertex,ChildVisit)),([Vertex]),(Seq Edge ),Vertex,T_Interfaces_1 ))-newtype T_Interfaces_1 = T_Interfaces_1 (([Vertex]) ->- (Map Vertex ChildVisit) ->- Graph ->- ( CInterfaceMap,T_Interfaces_2 ))-newtype T_Interfaces_2 = T_Interfaces_2 (CInterfaceMap ->- Graph ->- ( (Seq Edge),CVisitsMap))-data Inh_Interfaces = Inh_Interfaces {allInters_Inh_Interfaces :: !(CInterfaceMap),ddp_Inh_Interfaces :: !(Graph),info_Inh_Interfaces :: !(Info),prev_Inh_Interfaces :: !([Vertex]),v_Inh_Interfaces :: !(Vertex),visitDescr_Inh_Interfaces :: !(Map Vertex ChildVisit),vssGraph_Inh_Interfaces :: !(Graph)}-data Syn_Interfaces = Syn_Interfaces {descr_Syn_Interfaces :: !(Seq (Vertex,ChildVisit)),edp_Syn_Interfaces :: !(Seq Edge),firstvisitvertices_Syn_Interfaces :: !([Vertex]),inters_Syn_Interfaces :: !(CInterfaceMap),newedges_Syn_Interfaces :: !(Seq Edge ),v_Syn_Interfaces :: !(Vertex),visits_Syn_Interfaces :: !(CVisitsMap)}-wrap_Interfaces :: T_Interfaces ->- Inh_Interfaces ->- Syn_Interfaces -wrap_Interfaces !(T_Interfaces sem ) !(Inh_Interfaces _lhsIallInters _lhsIddp _lhsIinfo _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =- (let ( !_lhsOdescr,!_lhsOfirstvisitvertices,!_lhsOnewedges,!_lhsOv,!T_Interfaces_1 sem_1) =- (sem _lhsIinfo _lhsIv )- ( !_lhsOinters,!T_Interfaces_2 sem_2) =- (sem_1 _lhsIprev _lhsIvisitDescr _lhsIvssGraph )- ( !_lhsOedp,!_lhsOvisits) =- (sem_2 _lhsIallInters _lhsIddp )- in (Syn_Interfaces _lhsOdescr _lhsOedp _lhsOfirstvisitvertices _lhsOinters _lhsOnewedges _lhsOv _lhsOvisits ))-sem_Interfaces_Cons :: T_Interface ->- T_Interfaces ->- T_Interfaces -sem_Interfaces_Cons !(T_Interface hd_ ) !(T_Interfaces tl_ ) =- (T_Interfaces (\ (!_lhsIinfo)- (!_lhsIv) ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 462 "InterfacesRules.hs" #-})) of- { !_hdOv ->- (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 (({-# LINE 82 "InterfacesRules.lag" #-}- _hdIv- {-# LINE 472 "InterfacesRules.hs" #-})) of- { !_tlOv ->- (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 (({-# LINE 130 "InterfacesRules.lag" #-}- _hdIdescr Seq.>< _tlIdescr- {-# LINE 482 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 258 "InterfacesRules.lag" #-}- _hdIfirstvisitvertices ++ _tlIfirstvisitvertices- {-# LINE 486 "InterfacesRules.hs" #-})) of- { !_lhsOfirstvisitvertices ->- (case (({-# LINE 129 "InterfacesRules.lag" #-}- _hdInewedges Seq.>< _tlInewedges- {-# LINE 490 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (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) ->- ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) }) }) }) }) }) }) })) )-sem_Interfaces_Cons_1 :: T_Interfaces_1 ->- T_Interface_1 ->- T_Interfaces_1 -sem_Interfaces_Cons_1 !(T_Interfaces_1 tl_1 ) !(T_Interface_1 hd_1 ) =- (T_Interfaces_1 (\ (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 508 "InterfacesRules.hs" #-})) of- { !_tlOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 512 "InterfacesRules.hs" #-})) of- { !_tlOvisitDescr ->- (case (({-# LINE 258 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 516 "InterfacesRules.hs" #-})) of- { !_tlOprev ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 520 "InterfacesRules.hs" #-})) of- { !_hdOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 524 "InterfacesRules.hs" #-})) of- { !_hdOvisitDescr ->- (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 (({-# 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) ->- ( _lhsOinters,sem_Interfaces_2) }) }) }) }) }) }) }) }) }) })) )-sem_Interfaces_Cons_2 :: T_Interfaces_2 ->- T_Interface_2 ->- NontermIdent ->- T_Interfaces_2 -sem_Interfaces_Cons_2 !(T_Interfaces_2 tl_2 ) !(T_Interface_2 hd_2 ) !_hdInt =- (T_Interfaces_2 (\ (!_lhsIallInters)- (!_lhsIddp) ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 550 "InterfacesRules.hs" #-})) of- { !_tlOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 554 "InterfacesRules.hs" #-})) of- { !_tlOallInters ->- (case ((tl_2 _tlOallInters _tlOddp )) of- { ( !_tlIedp,!_tlIvisits) ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 560 "InterfacesRules.hs" #-})) of- { !_hdOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 564 "InterfacesRules.hs" #-})) of- { !_hdOallInters ->- (case ((hd_2 _hdOallInters _hdOddp )) of- { ( !_hdIedp,!_hdIvisits) ->- (case (({-# LINE 437 "InterfacesRules.lag" #-}- _hdIedp Seq.>< _tlIedp- {-# LINE 570 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (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 (({-# LINE 130 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 583 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 258 "InterfacesRules.lag" #-}- []- {-# LINE 587 "InterfacesRules.hs" #-})) of- { !_lhsOfirstvisitvertices ->- (case (({-# LINE 129 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 591 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 595 "InterfacesRules.hs" #-})) of- { !_lhsOv ->- (case ((sem_Interfaces_Nil_1 )) of- { ( !sem_Interfaces_1) ->- ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) })) )-sem_Interfaces_Nil_1 :: T_Interfaces_1 -sem_Interfaces_Nil_1 =- (T_Interfaces_1 (\ (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 387 "InterfacesRules.lag" #-}- Map.empty- {-# LINE 607 "InterfacesRules.hs" #-})) of- { !_lhsOinters ->- (case ((sem_Interfaces_Nil_2 )) of- { ( !sem_Interfaces_2) ->- ( _lhsOinters,sem_Interfaces_2) }) })) )-sem_Interfaces_Nil_2 :: T_Interfaces_2 -sem_Interfaces_Nil_2 =- (T_Interfaces_2 (\ (!_lhsIallInters)- (!_lhsIddp) ->- (case (({-# LINE 437 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 618 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 388 "InterfacesRules.lag" #-}- Map.empty- {-# LINE 622 "InterfacesRules.hs" #-})) of- { !_lhsOvisits ->- ( _lhsOedp,_lhsOvisits) }) })) )--- Segment ------------------------------------------------------{-- visit 0:- inherited attribute:- info : Info- chained attribute:- v : Vertex- visit 1:- inherited attributes:- n : Int- nextNewvertices : [Vertex]- synthesized attributes:- descr : Seq (Vertex,ChildVisit)- groups : [([Vertex],[Vertex])]- newedges : Seq Edge - newvertices : [Vertex]- visit 2:- inherited attributes:- cons : [ConstructorIdent]- visitDescr : Map Vertex ChildVisit- vssGraph : Graph- chained attribute:- prev : [Vertex]- synthesized attribute:- seg : CSegment- visit 3:- inherited attributes:- allInters : CInterfaceMap- ddp : Graph- fromLhs : [Vertex]- isFirst : Bool- nextInh : [Vertex]- nextIntravisits : [IntraVisit]- synthesized attributes:- cvisits : [CVisit]- edp : Seq Edge- inh : [Vertex]- intravisits : [IntraVisit]- visitss : [VisitSS]- alternatives:- alternative Segment:- child inh : {[Vertex]}- child syn : {[Vertex]}- visit 0:- local look : {Vertex -> CRule}- local occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}- local groups : {[([Vertex],[Vertex])]}- local v : {Int}- visit 1:- local newvertices : _- local visitedges : _- local attredges : _- intra v : {Int}- intra groups : {[([Vertex],[Vertex])]}- intra look : {Vertex -> CRule}- intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}- visit 2:- local synOccur : _- local vss : _- local visitss' : _- local visitss : {[[Vertex]]}- local defined : _- local _tup1 : {(Map Identifier Type,Map Identifier Type)}- local synmap : {Map Identifier Type}- local inhmap : {Map Identifier Type}- intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}- visit 3:- local computed : _- local fromLhs : _- local iv : _- local intravisits : _- intra visitss : {[[Vertex]]}- intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}- intra synmap : {Map Identifier Type}- intra inhmap : {Map Identifier Type}--}--- cata-sem_Segment :: Segment ->- T_Segment -sem_Segment !(Segment _inh _syn ) =- (sem_Segment_Segment _inh _syn )--- semantic domain-newtype T_Segment = T_Segment (Info ->- Vertex ->- ( Vertex,T_Segment_1 ))-newtype T_Segment_1 = T_Segment_1 (Int ->- ([Vertex]) ->- ( (Seq (Vertex,ChildVisit)),([([Vertex],[Vertex])]),(Seq Edge ),([Vertex]),T_Segment_2 ))-newtype T_Segment_2 = T_Segment_2 (([ConstructorIdent]) ->- ([Vertex]) ->- (Map Vertex ChildVisit) ->- Graph ->- ( ([Vertex]),CSegment,T_Segment_3 ))-newtype T_Segment_3 = T_Segment_3 (CInterfaceMap ->- Graph ->- ([Vertex]) ->- Bool ->- ([Vertex]) ->- ([IntraVisit]) ->- ( ([CVisit]),(Seq Edge),([Vertex]),([IntraVisit]),([VisitSS])))-data Inh_Segment = Inh_Segment {allInters_Inh_Segment :: !(CInterfaceMap),cons_Inh_Segment :: !([ConstructorIdent]),ddp_Inh_Segment :: !(Graph),fromLhs_Inh_Segment :: !([Vertex]),info_Inh_Segment :: !(Info),isFirst_Inh_Segment :: !(Bool),n_Inh_Segment :: !(Int),nextInh_Inh_Segment :: !([Vertex]),nextIntravisits_Inh_Segment :: !([IntraVisit]),nextNewvertices_Inh_Segment :: !([Vertex]),prev_Inh_Segment :: !([Vertex]),v_Inh_Segment :: !(Vertex),visitDescr_Inh_Segment :: !(Map Vertex ChildVisit),vssGraph_Inh_Segment :: !(Graph)}-data Syn_Segment = Syn_Segment {cvisits_Syn_Segment :: !([CVisit]),descr_Syn_Segment :: !(Seq (Vertex,ChildVisit)),edp_Syn_Segment :: !(Seq Edge),groups_Syn_Segment :: !([([Vertex],[Vertex])]),inh_Syn_Segment :: !([Vertex]),intravisits_Syn_Segment :: !([IntraVisit]),newedges_Syn_Segment :: !(Seq Edge ),newvertices_Syn_Segment :: !([Vertex]),prev_Syn_Segment :: !([Vertex]),seg_Syn_Segment :: !(CSegment),v_Syn_Segment :: !(Vertex),visitss_Syn_Segment :: !([VisitSS])}-wrap_Segment :: T_Segment ->- Inh_Segment ->- Syn_Segment -wrap_Segment !(T_Segment sem ) !(Inh_Segment _lhsIallInters _lhsIcons _lhsIddp _lhsIfromLhs _lhsIinfo _lhsIisFirst _lhsIn _lhsInextInh _lhsInextIntravisits _lhsInextNewvertices _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =- (let ( !_lhsOv,!T_Segment_1 sem_1) =- (sem _lhsIinfo _lhsIv )- ( !_lhsOdescr,!_lhsOgroups,!_lhsOnewedges,!_lhsOnewvertices,!T_Segment_2 sem_2) =- (sem_1 _lhsIn _lhsInextNewvertices )- ( !_lhsOprev,!_lhsOseg,!T_Segment_3 sem_3) =- (sem_2 _lhsIcons _lhsIprev _lhsIvisitDescr _lhsIvssGraph )- ( !_lhsOcvisits,!_lhsOedp,!_lhsOinh,!_lhsOintravisits,!_lhsOvisitss) =- (sem_3 _lhsIallInters _lhsIddp _lhsIfromLhs _lhsIisFirst _lhsInextInh _lhsInextIntravisits )- in (Syn_Segment _lhsOcvisits _lhsOdescr _lhsOedp _lhsOgroups _lhsOinh _lhsOintravisits _lhsOnewedges _lhsOnewvertices _lhsOprev _lhsOseg _lhsOv _lhsOvisitss ))-sem_Segment_Segment :: ([Vertex]) ->- ([Vertex]) ->- T_Segment -sem_Segment_Segment !inh_ !syn_ =- (T_Segment (\ (!_lhsIinfo)- (!_lhsIv) ->- (case (({-# LINE 106 "InterfacesRules.lag" #-}- \a -> ruleTable _lhsIinfo ! a- {-# LINE 748 "InterfacesRules.hs" #-})) of- { !_look ->- (case (({-# LINE 109 "InterfacesRules.lag" #-}- \p us -> [ a | u <- us- , a <- tdsToTdp _lhsIinfo ! u- , p (_look a)]- {-# LINE 754 "InterfacesRules.hs" #-})) of- { !_occurAs ->- (case (({-# LINE 113 "InterfacesRules.lag" #-}- let group as = gather _lhsIinfo (_occurAs isRhs as)- in map (partition (isInh . _look)) (group (inh_ ++ syn_))- {-# LINE 759 "InterfacesRules.hs" #-})) of- { !_groups ->- (case (({-# LINE 116 "InterfacesRules.lag" #-}- _lhsIv + length _groups- {-# LINE 763 "InterfacesRules.hs" #-})) of- { !_v ->- (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) ->- ( _lhsOv,sem_Segment_1) }) }) }) }) }) })) )-sem_Segment_Segment_1 :: Int ->- Vertex ->- ([([Vertex],[Vertex])]) ->- (Vertex -> CRule) ->- ([Vertex]) ->- ((CRule -> Bool) -> [Vertex] -> [Vertex]) ->- Info ->- ([Vertex]) ->- T_Segment_1 -sem_Segment_Segment_1 !_v !_lhsIv !_groups !_look !syn_ !_occurAs !_lhsIinfo !inh_ =- (T_Segment_1 (\ (!_lhsIn)- (!_lhsInextNewvertices) ->- (case (({-# LINE 117 "InterfacesRules.lag" #-}- [_lhsIv .. _v -1]- {-# LINE 786 "InterfacesRules.hs" #-})) of- { !_newvertices ->- (case (({-# LINE 132 "InterfacesRules.lag" #-}- Seq.fromList $ zipWith (cv _look _lhsIn) _newvertices _groups- {-# LINE 790 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 182 "InterfacesRules.lag" #-}- _groups- {-# LINE 794 "InterfacesRules.hs" #-})) of- { !_lhsOgroups ->- (case (({-# LINE 174 "InterfacesRules.lag" #-}- zip _newvertices _lhsInextNewvertices- {-# LINE 798 "InterfacesRules.hs" #-})) of- { !_visitedges ->- (case (({-# LINE 155 "InterfacesRules.lag" #-}- concat (zipWith ed _newvertices _groups)- {-# LINE 802 "InterfacesRules.hs" #-})) of- { !_attredges ->- (case (({-# LINE 175 "InterfacesRules.lag" #-}- Seq.fromList _attredges Seq.>< Seq.fromList _visitedges- {-# LINE 806 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (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) ->- ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,sem_Segment_2) }) }) }) }) }) }) }) })) )-sem_Segment_Segment_2 :: ([Vertex]) ->- ((CRule -> Bool) -> [Vertex] -> [Vertex]) ->- Info ->- ([Vertex]) ->- T_Segment_2 -sem_Segment_Segment_2 !syn_ !_occurAs !_lhsIinfo !inh_ =- (T_Segment_2 (\ (!_lhsIcons)- (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 229 "InterfacesRules.lag" #-}- gather _lhsIinfo (_occurAs isLhs syn_)- {-# LINE 827 "InterfacesRules.hs" #-})) of- { !_synOccur ->- (case (({-# LINE 230 "InterfacesRules.lag" #-}- let hasCode v | inRange (bounds (ruleTable _lhsIinfo)) v = getHasCode (ruleTable _lhsIinfo ! v)- | otherwise = True- in if null syn_- then replicate (length _lhsIcons) []- else map (filter hasCode . topSort' _lhsIvssGraph) _synOccur- {-# LINE 835 "InterfacesRules.hs" #-})) of- { !_vss ->- (case (({-# LINE 270 "InterfacesRules.lag" #-}- map (\\ _lhsIprev) _vss- {-# LINE 839 "InterfacesRules.hs" #-})) of- { !_visitss' ->- (case (({-# LINE 284 "InterfacesRules.lag" #-}- let rem :: [(Identifier,Identifier,Maybe Type)] -> [Vertex] -> [Vertex]- rem prev [] = []- rem prev (v:vs)- | inRange (bounds table) v- = let cr = table ! v- addV = case findIndex cmp prev of- Just _ -> id- _ -> (v:)- cmp (fld,attr,tp) = getField cr == fld && getAttr cr == attr && sameNT (getType cr) tp- sameNT (Just (NT ntA _)) (Just (NT ntB _)) = ntA == ntB- sameNT _ _ = False- def = Map.elems (getDefines cr)- in addV (rem (def ++ prev) vs)- | otherwise = v:rem prev vs- table = ruleTable _lhsIinfo- in map (rem []) _visitss'- {-# LINE 858 "InterfacesRules.hs" #-})) of- { !_visitss ->- (case (({-# LINE 271 "InterfacesRules.lag" #-}- let defines v = case Map.lookup v _lhsIvisitDescr of- Nothing -> [v]- Just (ChildVisit _ _ _ inh _) -> v:inh- in concatMap (concatMap defines) _visitss- {-# LINE 865 "InterfacesRules.hs" #-})) of- { !_defined ->- (case (({-# LINE 275 "InterfacesRules.lag" #-}- _lhsIprev ++ _defined- {-# LINE 869 "InterfacesRules.hs" #-})) of- { !_lhsOprev ->- (case (({-# LINE 409 "InterfacesRules.lag" #-}- let makemap = Map.fromList . map findType- findType v = getNtaNameType (attrTable _lhsIinfo ! v)- in (makemap inh_,makemap syn_)- {-# LINE 875 "InterfacesRules.hs" #-})) of- { !__tup1 ->- (case (({-# LINE 409 "InterfacesRules.lag" #-}- __tup1- {-# LINE 879 "InterfacesRules.hs" #-})) of- { !(_,!_synmap) ->- (case (({-# LINE 409 "InterfacesRules.lag" #-}- __tup1- {-# LINE 883 "InterfacesRules.hs" #-})) of- { !(!_inhmap,_) ->- (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) ->- ( _lhsOprev,_lhsOseg,sem_Segment_3) }) }) }) }) }) }) }) }) }) }) })) )-sem_Segment_Segment_3 :: ([[Vertex]]) ->- Info ->- (Map Vertex ChildVisit) ->- ([Vertex]) ->- ((CRule -> Bool) -> [Vertex] -> [Vertex]) ->- (Map Identifier Type) ->- (Map Identifier Type) ->- ([Vertex]) ->- T_Segment_3 -sem_Segment_Segment_3 !_visitss !_lhsIinfo !_lhsIvisitDescr !inh_ !_occurAs !_synmap !_inhmap !syn_ =- (T_Segment_3 (\ (!_lhsIallInters)- (!_lhsIddp)- (!_lhsIfromLhs)- (!_lhsIisFirst)- (!_lhsInextInh)- (!_lhsInextIntravisits) ->- (case (({-# LINE 357 "InterfacesRules.lag" #-}- let computes v = case Map.lookup v _lhsIvisitDescr of- Nothing -> Map.keys (getDefines (ruleTable _lhsIinfo ! v))- Just (ChildVisit _ _ _ _ syn) -> v:syn- in concatMap (concatMap computes) _visitss- {-# LINE 913 "InterfacesRules.hs" #-})) of- { !_computed ->- (case (({-# LINE 356 "InterfacesRules.lag" #-}- _occurAs isLhs inh_ ++ _lhsIfromLhs- {-# LINE 917 "InterfacesRules.hs" #-})) of- { !_fromLhs ->- (case (({-# LINE 362 "InterfacesRules.lag" #-}- \vs next ->- let needed = concatMap (_lhsIddp !) vs- in nub (needed ++ next) \\ (_fromLhs ++ _computed)- {-# LINE 923 "InterfacesRules.hs" #-})) of- { !_iv ->- (case (({-# LINE 361 "InterfacesRules.lag" #-}- zipWith _iv _visitss _lhsInextIntravisits- {-# LINE 927 "InterfacesRules.hs" #-})) of- { !_intravisits ->- (case (({-# LINE 412 "InterfacesRules.lag" #-}- let mkVisit vss intra = CVisit _inhmap _synmap (mkSequence vss) (mkSequence intra) True- mkSequence = map mkRule- mkRule v = case Map.lookup v _lhsIvisitDescr of- Nothing -> ruleTable _lhsIinfo ! v- Just (ChildVisit name nt n _ _) -> ccv name nt n _lhsIallInters- in zipWith mkVisit _visitss _intravisits- {-# LINE 936 "InterfacesRules.hs" #-})) of- { !_lhsOcvisits ->- (case (({-# LINE 439 "InterfacesRules.lag" #-}- Seq.fromList [(i,s) | i <- inh_, s <- syn_]- Seq.>< Seq.fromList [(s,i) | s <- syn_, i <- _lhsInextInh ]- {-# LINE 941 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 444 "InterfacesRules.lag" #-}- inh_- {-# LINE 945 "InterfacesRules.hs" #-})) of- { !_lhsOinh ->- (case (({-# LINE 327 "InterfacesRules.lag" #-}- _intravisits- {-# LINE 949 "InterfacesRules.hs" #-})) of- { !_lhsOintravisits ->- (case (({-# LINE 269 "InterfacesRules.lag" #-}- _visitss- {-# LINE 953 "InterfacesRules.hs" #-})) of- { !_lhsOvisitss ->- ( _lhsOcvisits,_lhsOedp,_lhsOinh,_lhsOintravisits,_lhsOvisitss) }) }) }) }) }) }) }) }) })) )--- Segments -----------------------------------------------------{-- visit 0:- inherited attributes:- info : Info- n : Int- chained attribute:- v : Vertex- synthesized attributes:- descr : Seq (Vertex,ChildVisit)- groups : [([Vertex],[Vertex])]- newedges : Seq Edge - newvertices : [Vertex]- visit 1:- inherited attributes:- cons : [ConstructorIdent]- prev : [Vertex]- visitDescr : Map Vertex ChildVisit- vssGraph : Graph- synthesized attribute:- segs : CSegments- visit 2:- inherited attributes:- allInters : CInterfaceMap- ddp : Graph- fromLhs : [Vertex]- isFirst : Bool- synthesized attributes:- cvisits : [[CVisit]]- edp : Seq Edge- firstInh : [Vertex]- hdIntravisits : [IntraVisit]- prev : [Vertex]- alternatives:- alternative Cons:- child hd : Segment - child tl : Segments - alternative Nil:--}--- cata-sem_Segments :: Segments ->- T_Segments -sem_Segments !list =- (Prelude.foldr sem_Segments_Cons sem_Segments_Nil (Prelude.map sem_Segment list) )--- semantic domain-newtype T_Segments = T_Segments (Info ->- Int ->- Vertex ->- ( (Seq (Vertex,ChildVisit)),([([Vertex],[Vertex])]),(Seq Edge ),([Vertex]),Vertex,T_Segments_1 ))-newtype T_Segments_1 = T_Segments_1 (([ConstructorIdent]) ->- ([Vertex]) ->- (Map Vertex ChildVisit) ->- Graph ->- ( CSegments,T_Segments_2 ))-newtype T_Segments_2 = T_Segments_2 (CInterfaceMap ->- Graph ->- ([Vertex]) ->- Bool ->- ( ([[CVisit]]),(Seq Edge),([Vertex]),([IntraVisit]),([Vertex])))-data Inh_Segments = Inh_Segments {allInters_Inh_Segments :: !(CInterfaceMap),cons_Inh_Segments :: !([ConstructorIdent]),ddp_Inh_Segments :: !(Graph),fromLhs_Inh_Segments :: !([Vertex]),info_Inh_Segments :: !(Info),isFirst_Inh_Segments :: !(Bool),n_Inh_Segments :: !(Int),prev_Inh_Segments :: !([Vertex]),v_Inh_Segments :: !(Vertex),visitDescr_Inh_Segments :: !(Map Vertex ChildVisit),vssGraph_Inh_Segments :: !(Graph)}-data Syn_Segments = Syn_Segments {cvisits_Syn_Segments :: !([[CVisit]]),descr_Syn_Segments :: !(Seq (Vertex,ChildVisit)),edp_Syn_Segments :: !(Seq Edge),firstInh_Syn_Segments :: !([Vertex]),groups_Syn_Segments :: !([([Vertex],[Vertex])]),hdIntravisits_Syn_Segments :: !([IntraVisit]),newedges_Syn_Segments :: !(Seq Edge ),newvertices_Syn_Segments :: !([Vertex]),prev_Syn_Segments :: !([Vertex]),segs_Syn_Segments :: !(CSegments),v_Syn_Segments :: !(Vertex)}-wrap_Segments :: T_Segments ->- Inh_Segments ->- Syn_Segments -wrap_Segments !(T_Segments sem ) !(Inh_Segments _lhsIallInters _lhsIcons _lhsIddp _lhsIfromLhs _lhsIinfo _lhsIisFirst _lhsIn _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =- (let ( !_lhsOdescr,!_lhsOgroups,!_lhsOnewedges,!_lhsOnewvertices,!_lhsOv,!T_Segments_1 sem_1) =- (sem _lhsIinfo _lhsIn _lhsIv )- ( !_lhsOsegs,!T_Segments_2 sem_2) =- (sem_1 _lhsIcons _lhsIprev _lhsIvisitDescr _lhsIvssGraph )- ( !_lhsOcvisits,!_lhsOedp,!_lhsOfirstInh,!_lhsOhdIntravisits,!_lhsOprev) =- (sem_2 _lhsIallInters _lhsIddp _lhsIfromLhs _lhsIisFirst )- in (Syn_Segments _lhsOcvisits _lhsOdescr _lhsOedp _lhsOfirstInh _lhsOgroups _lhsOhdIntravisits _lhsOnewedges _lhsOnewvertices _lhsOprev _lhsOsegs _lhsOv ))-sem_Segments_Cons :: T_Segment ->- T_Segments ->- T_Segments -sem_Segments_Cons !(T_Segment hd_ ) !(T_Segments tl_ ) =- (T_Segments (\ (!_lhsIinfo)- (!_lhsIn)- (!_lhsIv) ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 1037 "InterfacesRules.hs" #-})) of- { !_hdOv ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 1041 "InterfacesRules.hs" #-})) of- { !_hdOinfo ->- (case ((hd_ _hdOinfo _hdOv )) of- { ( !_hdIv,!T_Segment_1 hd_1) ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _hdIv- {-# LINE 1047 "InterfacesRules.hs" #-})) of- { !_tlOv ->- (case (({-# LINE 83 "InterfacesRules.lag" #-}- _lhsIinfo- {-# LINE 1051 "InterfacesRules.hs" #-})) of- { !_tlOinfo ->- (case (({-# LINE 203 "InterfacesRules.lag" #-}- _lhsIn- {-# LINE 1055 "InterfacesRules.hs" #-})) of- { !_hdOn ->- (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 (({-# 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 (({-# LINE 130 "InterfacesRules.lag" #-}- _hdIdescr Seq.>< _tlIdescr- {-# LINE 1071 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 184 "InterfacesRules.lag" #-}- _hdIgroups- {-# LINE 1075 "InterfacesRules.hs" #-})) of- { !_lhsOgroups ->- (case (({-# LINE 129 "InterfacesRules.lag" #-}- _hdInewedges Seq.>< _tlInewedges- {-# LINE 1079 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 170 "InterfacesRules.lag" #-}- _hdInewvertices- {-# LINE 1083 "InterfacesRules.hs" #-})) of- { !_lhsOnewvertices ->- (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) ->- ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,_lhsOv,sem_Segments_1) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Segments_Cons_1 :: T_Segment_2 ->- T_Segments_1 ->- T_Segments_1 -sem_Segments_Cons_1 !(T_Segment_2 hd_2 ) !(T_Segments_1 tl_1 ) =- (T_Segments_1 (\ (!_lhsIcons)- (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 1102 "InterfacesRules.hs" #-})) of- { !_tlOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 1106 "InterfacesRules.hs" #-})) of- { !_tlOvisitDescr ->- (case (({-# LINE 216 "InterfacesRules.lag" #-}- _lhsIvssGraph- {-# LINE 1110 "InterfacesRules.hs" #-})) of- { !_hdOvssGraph ->- (case (({-# LINE 125 "InterfacesRules.lag" #-}- _lhsIvisitDescr- {-# LINE 1114 "InterfacesRules.hs" #-})) of- { !_hdOvisitDescr ->- (case (({-# LINE 263 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 1118 "InterfacesRules.hs" #-})) of- { !_hdOprev ->- (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 (({-# LINE 263 "InterfacesRules.lag" #-}- _hdIprev- {-# LINE 1128 "InterfacesRules.hs" #-})) of- { !_tlOprev ->- (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 (({-# 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) ->- ( _lhsOsegs,sem_Segments_2) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Segments_Cons_2 :: T_Segments_2 ->- T_Segment_3 ->- T_Segments_2 -sem_Segments_Cons_2 !(T_Segments_2 tl_2 ) !(T_Segment_3 hd_3 ) =- (T_Segments_2 (\ (!_lhsIallInters)- (!_lhsIddp)- (!_lhsIfromLhs)- (!_lhsIisFirst) ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 1153 "InterfacesRules.hs" #-})) of- { !_tlOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 1157 "InterfacesRules.hs" #-})) of- { !_tlOallInters ->- (case (({-# LINE 341 "InterfacesRules.lag" #-}- _lhsIddp- {-# LINE 1161 "InterfacesRules.hs" #-})) of- { !_hdOddp ->- (case (({-# LINE 378 "InterfacesRules.lag" #-}- _lhsIallInters- {-# LINE 1165 "InterfacesRules.hs" #-})) of- { !_hdOallInters ->- (case (({-# LINE 354 "InterfacesRules.lag" #-}- []- {-# LINE 1169 "InterfacesRules.hs" #-})) of- { !_tlOfromLhs ->- (case (({-# LINE 353 "InterfacesRules.lag" #-}- _lhsIfromLhs- {-# LINE 1173 "InterfacesRules.hs" #-})) of- { !_hdOfromLhs ->- (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 (({-# LINE 329 "InterfacesRules.lag" #-}- _tlIhdIntravisits- {-# LINE 1183 "InterfacesRules.hs" #-})) of- { !_hdOnextIntravisits ->- (case (({-# LINE 312 "InterfacesRules.lag" #-}- _lhsIisFirst- {-# LINE 1187 "InterfacesRules.hs" #-})) of- { !_hdOisFirst ->- (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 (({-# LINE 399 "InterfacesRules.lag" #-}- _hdIcvisits : _tlIcvisits- {-# LINE 1197 "InterfacesRules.hs" #-})) of- { !_lhsOcvisits ->- (case (({-# LINE 437 "InterfacesRules.lag" #-}- _hdIedp Seq.>< _tlIedp- {-# LINE 1201 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 447 "InterfacesRules.lag" #-}- _hdIinh- {-# LINE 1205 "InterfacesRules.hs" #-})) of- { !_lhsOfirstInh ->- (case (({-# LINE 330 "InterfacesRules.lag" #-}- _hdIintravisits- {-# LINE 1209 "InterfacesRules.hs" #-})) of- { !_lhsOhdIntravisits ->- (case (({-# LINE 263 "InterfacesRules.lag" #-}- _tlIprev- {-# LINE 1213 "InterfacesRules.hs" #-})) of- { !_lhsOprev ->- ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )-sem_Segments_Nil :: T_Segments -sem_Segments_Nil =- (T_Segments (\ (!_lhsIinfo)- (!_lhsIn)- (!_lhsIv) ->- (case (({-# LINE 130 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 1223 "InterfacesRules.hs" #-})) of- { !_lhsOdescr ->- (case (({-# LINE 185 "InterfacesRules.lag" #-}- []- {-# LINE 1227 "InterfacesRules.hs" #-})) of- { !_lhsOgroups ->- (case (({-# LINE 129 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 1231 "InterfacesRules.hs" #-})) of- { !_lhsOnewedges ->- (case (({-# LINE 171 "InterfacesRules.lag" #-}- []- {-# LINE 1235 "InterfacesRules.hs" #-})) of- { !_lhsOnewvertices ->- (case (({-# LINE 82 "InterfacesRules.lag" #-}- _lhsIv- {-# LINE 1239 "InterfacesRules.hs" #-})) of- { !_lhsOv ->- (case ((sem_Segments_Nil_1 )) of- { ( !sem_Segments_1) ->- ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,_lhsOv,sem_Segments_1) }) }) }) }) }) })) )-sem_Segments_Nil_1 :: T_Segments_1 -sem_Segments_Nil_1 =- (T_Segments_1 (\ (!_lhsIcons)- (!_lhsIprev)- (!_lhsIvisitDescr)- (!_lhsIvssGraph) ->- (case (({-# LINE 401 "InterfacesRules.lag" #-}- []- {-# LINE 1252 "InterfacesRules.hs" #-})) of- { !_lhsOsegs ->- (case ((sem_Segments_Nil_2 _lhsIprev )) of- { ( !sem_Segments_2) ->- ( _lhsOsegs,sem_Segments_2) }) })) )-sem_Segments_Nil_2 :: ([Vertex]) ->- T_Segments_2 -sem_Segments_Nil_2 !_lhsIprev =- (T_Segments_2 (\ (!_lhsIallInters)- (!_lhsIddp)- (!_lhsIfromLhs)- (!_lhsIisFirst) ->- (case (({-# LINE 399 "InterfacesRules.lag" #-}- []- {-# LINE 1266 "InterfacesRules.hs" #-})) of- { !_lhsOcvisits ->- (case (({-# LINE 437 "InterfacesRules.lag" #-}- Seq.empty- {-# LINE 1270 "InterfacesRules.hs" #-})) of- { !_lhsOedp ->- (case (({-# LINE 448 "InterfacesRules.lag" #-}- []- {-# LINE 1274 "InterfacesRules.hs" #-})) of- { !_lhsOfirstInh ->- (case (({-# LINE 331 "InterfacesRules.lag" #-}- repeat []- {-# LINE 1278 "InterfacesRules.hs" #-})) of- { !_lhsOhdIntravisits ->- (case (({-# LINE 263 "InterfacesRules.lag" #-}- _lhsIprev- {-# LINE 1282 "InterfacesRules.hs" #-})) of- { !_lhsOprev ->- ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) })) )+-- UUAGC 0.9.24 (InterfacesRules.lag)+module InterfacesRules where+{-# LINE 10 "InterfacesRules.lag" #-}++import Interfaces+import SequentialTypes+import CodeSyntax+import GrammarInfo++import qualified Data.Sequence as Seq+import Data.Sequence(Seq)+import qualified Data.Map as Map+import Data.Map(Map)+import qualified Data.Set as Set+import Data.Set(Set)+import Data.Tree(Tree(Node))+import Data.Graph(Graph, dfs, edges, buildG, transposeG)+import Data.Maybe (fromJust)+import Data.List (partition,transpose,(\\),nub,intersect, findIndex)+import Data.Array ((!),inRange,bounds,assocs)+import Data.Foldable(toList)++import Debug.Trace(trace)+{-# LINE 27 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 2 "./Interfaces.ag" #-}++import CommonTypes+import SequentialTypes+{-# LINE 33 "../src-derived/InterfacesRules.hs" #-}+{-# LINE 58 "InterfacesRules.lag" #-}++type VisitSS = [Vertex]+{-# LINE 37 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 93 "InterfacesRules.lag" #-}++gather :: Info -> [Vertex] -> [[Vertex]]+gather info = eqClasses comp+ where comp a b = isEqualField (ruleTable info ! a) (ruleTable info ! b)+{-# LINE 44 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 134 "InterfacesRules.lag" #-}++-- Only non-empty syn will ever be forced, because visits with empty syn are never performed+-- Right hand side synthesized attributes always have a field+cv :: (Vertex -> CRule) -> Int -> Vertex -> ([Vertex],[Vertex]) -> (Vertex,ChildVisit)+cv look n v (inh,syn) = let fld = getField (look (head syn))+ rnt = fromJust (getRhsNt (look (head syn)))+ d = ChildVisit fld rnt n inh syn+ in (v,d)+{-# LINE 55 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 157 "InterfacesRules.lag" #-}++ed v (inh,syn) = map (\i -> (i,v)) inh ++ map (\s -> (v,s)) syn+{-# LINE 60 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 244 "InterfacesRules.lag" #-}++postorder (Node a ts) = postorderF ts ++ [a]+postorderF = concatMap postorder+postOrd g = postorderF . dfs g+topSort' g = postOrd g+{-# LINE 68 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 323 "InterfacesRules.lag" #-}++type IntraVisit = [Vertex]+{-# LINE 73 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 345 "InterfacesRules.lag" #-}++swap (a,b) = (b,a)+{-# LINE 78 "../src-derived/InterfacesRules.hs" #-}++{-# LINE 419 "InterfacesRules.lag" #-}++ccv :: Identifier -> NontermIdent -> Int -> CInterfaceMap -> CRule+ccv name nt n table+ = CChildVisit name nt n inh syn last+ where CInterface segs = Map.findWithDefault (error ("InterfacesRules::ccv::interfaces not in table for nt: " ++ show nt)) nt table+ (seg:remain) = drop n segs+ CSegment inh syn = seg + last = null remain+{-# LINE 89 "../src-derived/InterfacesRules.hs" #-}+-- IRoot -------------------------------------------------------+{-+ visit 0:+ inherited attributes:+ dpr : [Edge]+ info : Info+ tdp : Graph+ synthesized attributes:+ edp : [Edge]+ inters : CInterfaceMap+ visits : CVisitsMap+ alternatives:+ alternative IRoot:+ child inters : Interfaces + visit 0:+ local newedges : _+ local visitssGraph : _+ local descr : _+-}+-- cata+sem_IRoot :: IRoot ->+ T_IRoot +sem_IRoot !(IRoot _inters ) =+ (sem_IRoot_IRoot (sem_Interfaces _inters ) )+-- semantic domain+newtype T_IRoot = T_IRoot (([Edge]) ->+ Info ->+ Graph ->+ ( ([Edge]),CInterfaceMap,CVisitsMap))+data Inh_IRoot = Inh_IRoot {dpr_Inh_IRoot :: !(([Edge])),info_Inh_IRoot :: !(Info),tdp_Inh_IRoot :: !(Graph)}+data Syn_IRoot = Syn_IRoot {edp_Syn_IRoot :: !(([Edge])),inters_Syn_IRoot :: !(CInterfaceMap),visits_Syn_IRoot :: !(CVisitsMap)}+wrap_IRoot :: T_IRoot ->+ Inh_IRoot ->+ Syn_IRoot +wrap_IRoot !(T_IRoot sem ) !(Inh_IRoot _lhsIdpr _lhsIinfo _lhsItdp ) =+ (let ( !_lhsOedp,!_lhsOinters,!_lhsOvisits) =+ (sem _lhsIdpr _lhsIinfo _lhsItdp )+ in (Syn_IRoot _lhsOedp _lhsOinters _lhsOvisits ))+sem_IRoot_IRoot :: T_Interfaces ->+ T_IRoot +sem_IRoot_IRoot !(T_Interfaces inters_ ) =+ (T_IRoot (\ (!_lhsIdpr)+ (!_lhsIinfo)+ (!_lhsItdp) ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 136 "InterfacesRules.hs" #-})) of+ { !_intersOinfo ->+ (case (({-# LINE 85 "InterfacesRules.lag" #-}+ snd (bounds _lhsItdp) + 1+ {-# LINE 140 "InterfacesRules.hs" #-})) of+ { !_intersOv ->+ (case ((inters_ _intersOinfo _intersOv )) of+ { ( !_intersIdescr,!_intersIfirstvisitvertices,!_intersInewedges,!_intersIv,!T_Interfaces_1 inters_1) ->+ (case (({-# LINE 260 "InterfacesRules.lag" #-}+ let terminals = [ v | (v,cr) <- assocs (ruleTable _lhsIinfo), not (getHasCode cr), isLocal cr ]+ in _intersIfirstvisitvertices ++ terminals+ {-# LINE 147 "InterfacesRules.hs" #-})) of+ { !_intersOprev ->+ (case (({-# LINE 71 "InterfacesRules.lag" #-}+ toList _intersInewedges+ {-# LINE 151 "InterfacesRules.hs" #-})) of+ { !_newedges ->+ (case (({-# LINE 72 "InterfacesRules.lag" #-}+ let graph = buildG (0,_intersIv-1) es+ es = _newedges ++ edges _lhsItdp+ in transposeG graph+ {-# LINE 157 "InterfacesRules.hs" #-})) of+ { !_visitssGraph ->+ (case (({-# LINE 218 "InterfacesRules.lag" #-}+ _visitssGraph+ {-# LINE 161 "InterfacesRules.hs" #-})) of+ { !_intersOvssGraph ->+ (case (({-# LINE 147 "InterfacesRules.lag" #-}+ toList _intersIdescr+ {-# LINE 165 "InterfacesRules.hs" #-})) of+ { !_descr ->+ (case (({-# LINE 127 "InterfacesRules.lag" #-}+ Map.fromList _descr+ {-# LINE 169 "InterfacesRules.hs" #-})) of+ { !_intersOvisitDescr ->+ (case ((inters_1 _intersOprev _intersOvisitDescr _intersOvssGraph )) of+ { ( !_intersIinters,!T_Interfaces_2 inters_2) ->+ (case (({-# LINE 380 "InterfacesRules.lag" #-}+ _intersIinters+ {-# LINE 175 "InterfacesRules.hs" #-})) of+ { !_intersOallInters ->+ (case (({-# LINE 343 "InterfacesRules.lag" #-}+ buildG (0,_intersIv-1) (map swap (_lhsIdpr ++ _newedges))+ {-# LINE 179 "InterfacesRules.hs" #-})) of+ { !_intersOddp ->+ (case ((inters_2 _intersOallInters _intersOddp )) of+ { ( !_intersIedp,!_intersIvisits) ->+ (case (({-# LINE 442 "InterfacesRules.lag" #-}+ toList _intersIedp+ {-# LINE 185 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 382 "InterfacesRules.lag" #-}+ _intersIinters+ {-# LINE 189 "InterfacesRules.hs" #-})) of+ { !_lhsOinters ->+ (case (({-# LINE 383 "InterfacesRules.lag" #-}+ _intersIvisits+ {-# LINE 193 "InterfacesRules.hs" #-})) of+ { !_lhsOvisits ->+ ( _lhsOedp,_lhsOinters,_lhsOvisits) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Interface ---------------------------------------------------+{-+ visit 0:+ inherited attribute:+ info : Info+ chained attribute:+ v : Vertex+ synthesized attributes:+ descr : Seq (Vertex,ChildVisit)+ firstvisitvertices : [Vertex]+ newedges : Seq Edge + visit 1:+ inherited attributes:+ prev : [Vertex]+ visitDescr : Map Vertex ChildVisit+ vssGraph : Graph+ synthesized attributes:+ inter : CInterface+ nt : NontermIdent+ visit 2:+ inherited attributes:+ allInters : CInterfaceMap+ ddp : Graph+ synthesized attributes:+ edp : Seq Edge+ visits : Map ConstructorIdent CVisits+ alternatives:+ alternative Interface:+ child nt : {NontermIdent}+ child cons : {[ConstructorIdent]}+ child seg : Segments + visit 0:+ local look : {Vertex -> CRule}+ local v : _+ local firstvisitvertices : _+ local descr : _+ local newedges : _+-}+-- cata+sem_Interface :: Interface ->+ T_Interface +sem_Interface !(Interface _nt _cons _seg ) =+ (sem_Interface_Interface _nt _cons (sem_Segments _seg ) )+-- semantic domain+newtype T_Interface = T_Interface (Info ->+ Vertex ->+ ( (Seq (Vertex,ChildVisit)),([Vertex]),(Seq Edge ),Vertex,T_Interface_1 ))+newtype T_Interface_1 = T_Interface_1 (([Vertex]) ->+ (Map Vertex ChildVisit) ->+ Graph ->+ ( CInterface,NontermIdent,T_Interface_2 ))+newtype T_Interface_2 = T_Interface_2 (CInterfaceMap ->+ Graph ->+ ( (Seq Edge),(Map ConstructorIdent CVisits)))+data Inh_Interface = Inh_Interface {allInters_Inh_Interface :: !(CInterfaceMap),ddp_Inh_Interface :: !(Graph),info_Inh_Interface :: !(Info),prev_Inh_Interface :: !(([Vertex])),v_Inh_Interface :: !(Vertex),visitDescr_Inh_Interface :: !((Map Vertex ChildVisit)),vssGraph_Inh_Interface :: !(Graph)}+data Syn_Interface = Syn_Interface {descr_Syn_Interface :: !((Seq (Vertex,ChildVisit))),edp_Syn_Interface :: !((Seq Edge)),firstvisitvertices_Syn_Interface :: !(([Vertex])),inter_Syn_Interface :: !(CInterface),newedges_Syn_Interface :: !((Seq Edge )),nt_Syn_Interface :: !(NontermIdent),v_Syn_Interface :: !(Vertex),visits_Syn_Interface :: !((Map ConstructorIdent CVisits))}+wrap_Interface :: T_Interface ->+ Inh_Interface ->+ Syn_Interface +wrap_Interface !(T_Interface sem ) !(Inh_Interface _lhsIallInters _lhsIddp _lhsIinfo _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =+ (let ( !_lhsOdescr,!_lhsOfirstvisitvertices,!_lhsOnewedges,!_lhsOv,!T_Interface_1 sem_1) =+ (sem _lhsIinfo _lhsIv )+ ( !_lhsOinter,!_lhsOnt,!T_Interface_2 sem_2) =+ (sem_1 _lhsIprev _lhsIvisitDescr _lhsIvssGraph )+ ( !_lhsOedp,!_lhsOvisits) =+ (sem_2 _lhsIallInters _lhsIddp )+ in (Syn_Interface _lhsOdescr _lhsOedp _lhsOfirstvisitvertices _lhsOinter _lhsOnewedges _lhsOnt _lhsOv _lhsOvisits ))+sem_Interface_Interface :: NontermIdent ->+ ([ConstructorIdent]) ->+ T_Segments ->+ T_Interface +sem_Interface_Interface !nt_ !cons_ !(T_Segments seg_ ) =+ (T_Interface (\ (!_lhsIinfo)+ (!_lhsIv) ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 272 "InterfacesRules.hs" #-})) of+ { !_segOinfo ->+ (case (({-# LINE 205 "InterfacesRules.lag" #-}+ 0+ {-# LINE 276 "InterfacesRules.hs" #-})) of+ { !_segOn ->+ (case (({-# LINE 195 "InterfacesRules.lag" #-}+ \a -> ruleTable _lhsIinfo ! a+ {-# LINE 280 "InterfacesRules.hs" #-})) of+ { !_look ->+ (case (({-# LINE 187 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 284 "InterfacesRules.hs" #-})) of+ { !_segOv ->+ (case ((seg_ _segOinfo _segOn _segOv )) of+ { ( !_segIdescr,!_segIgroups,!_segInewedges,!_segInewvertices,!_segIv,!T_Segments_1 seg_1) ->+ (case (({-# LINE 188 "InterfacesRules.lag" #-}+ _segIv + length _segInewvertices+ {-# LINE 290 "InterfacesRules.hs" #-})) of+ { !_v ->+ (case (({-# LINE 190 "InterfacesRules.lag" #-}+ [_segIv .. _v-1]+ {-# LINE 294 "InterfacesRules.hs" #-})) of+ { !_firstvisitvertices ->+ (case (({-# LINE 196 "InterfacesRules.lag" #-}+ zipWith (cv _look (-1)) _firstvisitvertices _segIgroups+ {-# LINE 298 "InterfacesRules.hs" #-})) of+ { !_descr ->+ (case (({-# LINE 197 "InterfacesRules.lag" #-}+ _segIdescr Seq.>< Seq.fromList _descr+ {-# LINE 302 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ _firstvisitvertices+ {-# LINE 306 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstvisitvertices ->+ (case (({-# LINE 191 "InterfacesRules.lag" #-}+ zip _firstvisitvertices _segInewvertices+ {-# LINE 310 "InterfacesRules.hs" #-})) of+ { !_newedges ->+ (case (({-# LINE 192 "InterfacesRules.lag" #-}+ _segInewedges Seq.>< Seq.fromList _newedges+ {-# LINE 314 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 189 "InterfacesRules.lag" #-}+ _v+ {-# LINE 318 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Interface_Interface_1 :: T_Interface_1 + sem_Interface_Interface_1 =+ (T_Interface_1 (\ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 327 "InterfacesRules.hs" #-})) of+ { !_segOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 331 "InterfacesRules.hs" #-})) of+ { !_segOvisitDescr ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 335 "InterfacesRules.hs" #-})) of+ { !_segOprev ->+ (case (({-# LINE 237 "InterfacesRules.lag" #-}+ cons_+ {-# LINE 339 "InterfacesRules.hs" #-})) of+ { !_segOcons ->+ (case ((seg_1 _segOcons _segOprev _segOvisitDescr _segOvssGraph )) of+ { ( !_segIsegs,!T_Segments_2 seg_2) ->+ (case (({-# LINE 395 "InterfacesRules.lag" #-}+ CInterface _segIsegs+ {-# LINE 345 "InterfacesRules.hs" #-})) of+ { !_lhsOinter ->+ (case (({-# LINE 391 "InterfacesRules.lag" #-}+ nt_+ {-# LINE 349 "InterfacesRules.hs" #-})) of+ { !_lhsOnt ->+ (case ((let sem_Interface_Interface_2 :: T_Interface_2 + sem_Interface_Interface_2 =+ (T_Interface_2 (\ (!_lhsIallInters)+ (!_lhsIddp) ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 357 "InterfacesRules.hs" #-})) of+ { !_segOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 361 "InterfacesRules.hs" #-})) of+ { !_segOallInters ->+ (case (({-# LINE 351 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 365 "InterfacesRules.hs" #-})) of+ { !_segOfromLhs ->+ (case (({-# LINE 314 "InterfacesRules.lag" #-}+ True+ {-# LINE 369 "InterfacesRules.hs" #-})) of+ { !_segOisFirst ->+ (case ((seg_2 _segOallInters _segOddp _segOfromLhs _segOisFirst )) of+ { ( !_segIcvisits,!_segIedp,!_segIfirstInh,!_segIhdIntravisits,!_segIprev) ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ _segIedp+ {-# LINE 375 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 396 "InterfacesRules.lag" #-}+ Map.fromList (zip cons_ (transpose _segIcvisits))+ {-# LINE 379 "InterfacesRules.hs" #-})) of+ { !_lhsOvisits ->+ ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) })) )+ in sem_Interface_Interface_2)) of+ { ( !sem_Interface_2) ->+ ( _lhsOinter,_lhsOnt,sem_Interface_2) }) }) }) }) }) }) }) })) )+ in sem_Interface_Interface_1)) of+ { ( !sem_Interface_1) ->+ ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interface_1) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+-- Interfaces --------------------------------------------------+{-+ visit 0:+ inherited attribute:+ info : Info+ chained attribute:+ v : Vertex+ synthesized attributes:+ descr : Seq (Vertex,ChildVisit)+ firstvisitvertices : [Vertex]+ newedges : Seq Edge + visit 1:+ inherited attributes:+ prev : [Vertex]+ visitDescr : Map Vertex ChildVisit+ vssGraph : Graph+ synthesized attribute:+ inters : CInterfaceMap+ visit 2:+ inherited attributes:+ allInters : CInterfaceMap+ ddp : Graph+ synthesized attributes:+ edp : Seq Edge+ visits : CVisitsMap+ alternatives:+ alternative Cons:+ child hd : Interface + child tl : Interfaces + alternative Nil:+-}+-- cata+sem_Interfaces :: Interfaces ->+ T_Interfaces +sem_Interfaces !list =+ (Prelude.foldr sem_Interfaces_Cons sem_Interfaces_Nil (Prelude.map sem_Interface list) )+-- semantic domain+newtype T_Interfaces = T_Interfaces (Info ->+ Vertex ->+ ( (Seq (Vertex,ChildVisit)),([Vertex]),(Seq Edge ),Vertex,T_Interfaces_1 ))+newtype T_Interfaces_1 = T_Interfaces_1 (([Vertex]) ->+ (Map Vertex ChildVisit) ->+ Graph ->+ ( CInterfaceMap,T_Interfaces_2 ))+newtype T_Interfaces_2 = T_Interfaces_2 (CInterfaceMap ->+ Graph ->+ ( (Seq Edge),CVisitsMap))+data Inh_Interfaces = Inh_Interfaces {allInters_Inh_Interfaces :: !(CInterfaceMap),ddp_Inh_Interfaces :: !(Graph),info_Inh_Interfaces :: !(Info),prev_Inh_Interfaces :: !(([Vertex])),v_Inh_Interfaces :: !(Vertex),visitDescr_Inh_Interfaces :: !((Map Vertex ChildVisit)),vssGraph_Inh_Interfaces :: !(Graph)}+data Syn_Interfaces = Syn_Interfaces {descr_Syn_Interfaces :: !((Seq (Vertex,ChildVisit))),edp_Syn_Interfaces :: !((Seq Edge)),firstvisitvertices_Syn_Interfaces :: !(([Vertex])),inters_Syn_Interfaces :: !(CInterfaceMap),newedges_Syn_Interfaces :: !((Seq Edge )),v_Syn_Interfaces :: !(Vertex),visits_Syn_Interfaces :: !(CVisitsMap)}+wrap_Interfaces :: T_Interfaces ->+ Inh_Interfaces ->+ Syn_Interfaces +wrap_Interfaces !(T_Interfaces sem ) !(Inh_Interfaces _lhsIallInters _lhsIddp _lhsIinfo _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =+ (let ( !_lhsOdescr,!_lhsOfirstvisitvertices,!_lhsOnewedges,!_lhsOv,!T_Interfaces_1 sem_1) =+ (sem _lhsIinfo _lhsIv )+ ( !_lhsOinters,!T_Interfaces_2 sem_2) =+ (sem_1 _lhsIprev _lhsIvisitDescr _lhsIvssGraph )+ ( !_lhsOedp,!_lhsOvisits) =+ (sem_2 _lhsIallInters _lhsIddp )+ in (Syn_Interfaces _lhsOdescr _lhsOedp _lhsOfirstvisitvertices _lhsOinters _lhsOnewedges _lhsOv _lhsOvisits ))+sem_Interfaces_Cons :: T_Interface ->+ T_Interfaces ->+ T_Interfaces +sem_Interfaces_Cons !(T_Interface hd_ ) !(T_Interfaces tl_ ) =+ (T_Interfaces (\ (!_lhsIinfo)+ (!_lhsIv) ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 456 "InterfacesRules.hs" #-})) of+ { !_hdOv ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 460 "InterfacesRules.hs" #-})) of+ { !_hdOinfo ->+ (case ((hd_ _hdOinfo _hdOv )) of+ { ( !_hdIdescr,!_hdIfirstvisitvertices,!_hdInewedges,!_hdIv,!T_Interface_1 hd_1) ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _hdIv+ {-# LINE 466 "InterfacesRules.hs" #-})) of+ { !_tlOv ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 470 "InterfacesRules.hs" #-})) of+ { !_tlOinfo ->+ (case ((tl_ _tlOinfo _tlOv )) of+ { ( !_tlIdescr,!_tlIfirstvisitvertices,!_tlInewedges,!_tlIv,!T_Interfaces_1 tl_1) ->+ (case (({-# LINE 130 "InterfacesRules.lag" #-}+ _hdIdescr Seq.>< _tlIdescr+ {-# LINE 476 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ _hdIfirstvisitvertices ++ _tlIfirstvisitvertices+ {-# LINE 480 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstvisitvertices ->+ (case (({-# LINE 129 "InterfacesRules.lag" #-}+ _hdInewedges Seq.>< _tlInewedges+ {-# LINE 484 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _tlIv+ {-# LINE 488 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Interfaces_Cons_1 :: T_Interfaces_1 + sem_Interfaces_Cons_1 =+ (T_Interfaces_1 (\ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 497 "InterfacesRules.hs" #-})) of+ { !_tlOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 501 "InterfacesRules.hs" #-})) of+ { !_tlOvisitDescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 505 "InterfacesRules.hs" #-})) of+ { !_tlOprev ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 509 "InterfacesRules.hs" #-})) of+ { !_hdOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 513 "InterfacesRules.hs" #-})) of+ { !_hdOvisitDescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 517 "InterfacesRules.hs" #-})) of+ { !_hdOprev ->+ (case ((tl_1 _tlOprev _tlOvisitDescr _tlOvssGraph )) of+ { ( !_tlIinters,!T_Interfaces_2 tl_2) ->+ (case ((hd_1 _hdOprev _hdOvisitDescr _hdOvssGraph )) of+ { ( !_hdIinter,!_hdInt,!T_Interface_2 hd_2) ->+ (case (({-# LINE 385 "InterfacesRules.lag" #-}+ Map.insert _hdInt _hdIinter _tlIinters+ {-# LINE 525 "InterfacesRules.hs" #-})) of+ { !_lhsOinters ->+ (case ((let sem_Interfaces_Cons_2 :: T_Interfaces_2 + sem_Interfaces_Cons_2 =+ (T_Interfaces_2 (\ (!_lhsIallInters)+ (!_lhsIddp) ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 533 "InterfacesRules.hs" #-})) of+ { !_tlOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 537 "InterfacesRules.hs" #-})) of+ { !_tlOallInters ->+ (case ((tl_2 _tlOallInters _tlOddp )) of+ { ( !_tlIedp,!_tlIvisits) ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 543 "InterfacesRules.hs" #-})) of+ { !_hdOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 547 "InterfacesRules.hs" #-})) of+ { !_hdOallInters ->+ (case ((hd_2 _hdOallInters _hdOddp )) of+ { ( !_hdIedp,!_hdIvisits) ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ _hdIedp Seq.>< _tlIedp+ {-# LINE 553 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 386 "InterfacesRules.lag" #-}+ Map.insert _hdInt _hdIvisits _tlIvisits+ {-# LINE 557 "InterfacesRules.hs" #-})) of+ { !_lhsOvisits ->+ ( _lhsOedp,_lhsOvisits) }) }) }) }) }) }) }) })) )+ in sem_Interfaces_Cons_2)) of+ { ( !sem_Interfaces_2) ->+ ( _lhsOinters,sem_Interfaces_2) }) }) }) }) }) }) }) }) }) })) )+ in sem_Interfaces_Cons_1)) of+ { ( !sem_Interfaces_1) ->+ ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) }) }) }) }) }) }) })) )+sem_Interfaces_Nil :: T_Interfaces +sem_Interfaces_Nil =+ (T_Interfaces (\ (!_lhsIinfo)+ (!_lhsIv) ->+ (case (({-# LINE 130 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 572 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 258 "InterfacesRules.lag" #-}+ []+ {-# LINE 576 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstvisitvertices ->+ (case (({-# LINE 129 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 580 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 584 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Interfaces_Nil_1 :: T_Interfaces_1 + sem_Interfaces_Nil_1 =+ (T_Interfaces_1 (\ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 387 "InterfacesRules.lag" #-}+ Map.empty+ {-# LINE 593 "InterfacesRules.hs" #-})) of+ { !_lhsOinters ->+ (case ((let sem_Interfaces_Nil_2 :: T_Interfaces_2 + sem_Interfaces_Nil_2 =+ (T_Interfaces_2 (\ (!_lhsIallInters)+ (!_lhsIddp) ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 601 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 388 "InterfacesRules.lag" #-}+ Map.empty+ {-# LINE 605 "InterfacesRules.hs" #-})) of+ { !_lhsOvisits ->+ ( _lhsOedp,_lhsOvisits) }) })) )+ in sem_Interfaces_Nil_2)) of+ { ( !sem_Interfaces_2) ->+ ( _lhsOinters,sem_Interfaces_2) }) })) )+ in sem_Interfaces_Nil_1)) of+ { ( !sem_Interfaces_1) ->+ ( _lhsOdescr,_lhsOfirstvisitvertices,_lhsOnewedges,_lhsOv,sem_Interfaces_1) }) }) }) }) })) )+-- Segment -----------------------------------------------------+{-+ visit 0:+ inherited attribute:+ info : Info+ chained attribute:+ v : Vertex+ visit 1:+ inherited attributes:+ n : Int+ nextNewvertices : [Vertex]+ synthesized attributes:+ descr : Seq (Vertex,ChildVisit)+ groups : [([Vertex],[Vertex])]+ newedges : Seq Edge + newvertices : [Vertex]+ visit 2:+ inherited attributes:+ cons : [ConstructorIdent]+ visitDescr : Map Vertex ChildVisit+ vssGraph : Graph+ chained attribute:+ prev : [Vertex]+ synthesized attribute:+ seg : CSegment+ visit 3:+ inherited attributes:+ allInters : CInterfaceMap+ ddp : Graph+ fromLhs : [Vertex]+ isFirst : Bool+ nextInh : [Vertex]+ nextIntravisits : [IntraVisit]+ synthesized attributes:+ cvisits : [CVisit]+ edp : Seq Edge+ inh : [Vertex]+ intravisits : [IntraVisit]+ visitss : [VisitSS]+ alternatives:+ alternative Segment:+ child inh : {[Vertex]}+ child syn : {[Vertex]}+ visit 0:+ local look : {Vertex -> CRule}+ local occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}+ local groups : {[([Vertex],[Vertex])]}+ local v : {Int}+ visit 1:+ local newvertices : _+ local visitedges : _+ local attredges : _+ intra v : {Int}+ intra groups : {[([Vertex],[Vertex])]}+ intra look : {Vertex -> CRule}+ intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}+ visit 2:+ local synOccur : _+ local vss : _+ local visitss' : _+ local visitss : {[[Vertex]]}+ local defined : _+ local _tup1 : {(Map Identifier Type,Map Identifier Type)}+ local synmap : {Map Identifier Type}+ local inhmap : {Map Identifier Type}+ intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}+ visit 3:+ local computed : _+ local fromLhs : _+ local iv : _+ local intravisits : _+ intra visitss : {[[Vertex]]}+ intra occurAs : {(CRule -> Bool) -> [Vertex] -> [Vertex]}+ intra synmap : {Map Identifier Type}+ intra inhmap : {Map Identifier Type}+-}+-- cata+sem_Segment :: Segment ->+ T_Segment +sem_Segment !(Segment _inh _syn ) =+ (sem_Segment_Segment _inh _syn )+-- semantic domain+newtype T_Segment = T_Segment (Info ->+ Vertex ->+ ( Vertex,T_Segment_1 ))+newtype T_Segment_1 = T_Segment_1 (Int ->+ ([Vertex]) ->+ ( (Seq (Vertex,ChildVisit)),([([Vertex],[Vertex])]),(Seq Edge ),([Vertex]),T_Segment_2 ))+newtype T_Segment_2 = T_Segment_2 (([ConstructorIdent]) ->+ ([Vertex]) ->+ (Map Vertex ChildVisit) ->+ Graph ->+ ( ([Vertex]),CSegment,T_Segment_3 ))+newtype T_Segment_3 = T_Segment_3 (CInterfaceMap ->+ Graph ->+ ([Vertex]) ->+ Bool ->+ ([Vertex]) ->+ ([IntraVisit]) ->+ ( ([CVisit]),(Seq Edge),([Vertex]),([IntraVisit]),([VisitSS])))+data Inh_Segment = Inh_Segment {allInters_Inh_Segment :: !(CInterfaceMap),cons_Inh_Segment :: !(([ConstructorIdent])),ddp_Inh_Segment :: !(Graph),fromLhs_Inh_Segment :: !(([Vertex])),info_Inh_Segment :: !(Info),isFirst_Inh_Segment :: !(Bool),n_Inh_Segment :: !(Int),nextInh_Inh_Segment :: !(([Vertex])),nextIntravisits_Inh_Segment :: !(([IntraVisit])),nextNewvertices_Inh_Segment :: !(([Vertex])),prev_Inh_Segment :: !(([Vertex])),v_Inh_Segment :: !(Vertex),visitDescr_Inh_Segment :: !((Map Vertex ChildVisit)),vssGraph_Inh_Segment :: !(Graph)}+data Syn_Segment = Syn_Segment {cvisits_Syn_Segment :: !(([CVisit])),descr_Syn_Segment :: !((Seq (Vertex,ChildVisit))),edp_Syn_Segment :: !((Seq Edge)),groups_Syn_Segment :: !(([([Vertex],[Vertex])])),inh_Syn_Segment :: !(([Vertex])),intravisits_Syn_Segment :: !(([IntraVisit])),newedges_Syn_Segment :: !((Seq Edge )),newvertices_Syn_Segment :: !(([Vertex])),prev_Syn_Segment :: !(([Vertex])),seg_Syn_Segment :: !(CSegment),v_Syn_Segment :: !(Vertex),visitss_Syn_Segment :: !(([VisitSS]))}+wrap_Segment :: T_Segment ->+ Inh_Segment ->+ Syn_Segment +wrap_Segment !(T_Segment sem ) !(Inh_Segment _lhsIallInters _lhsIcons _lhsIddp _lhsIfromLhs _lhsIinfo _lhsIisFirst _lhsIn _lhsInextInh _lhsInextIntravisits _lhsInextNewvertices _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =+ (let ( !_lhsOv,!T_Segment_1 sem_1) =+ (sem _lhsIinfo _lhsIv )+ ( !_lhsOdescr,!_lhsOgroups,!_lhsOnewedges,!_lhsOnewvertices,!T_Segment_2 sem_2) =+ (sem_1 _lhsIn _lhsInextNewvertices )+ ( !_lhsOprev,!_lhsOseg,!T_Segment_3 sem_3) =+ (sem_2 _lhsIcons _lhsIprev _lhsIvisitDescr _lhsIvssGraph )+ ( !_lhsOcvisits,!_lhsOedp,!_lhsOinh,!_lhsOintravisits,!_lhsOvisitss) =+ (sem_3 _lhsIallInters _lhsIddp _lhsIfromLhs _lhsIisFirst _lhsInextInh _lhsInextIntravisits )+ in (Syn_Segment _lhsOcvisits _lhsOdescr _lhsOedp _lhsOgroups _lhsOinh _lhsOintravisits _lhsOnewedges _lhsOnewvertices _lhsOprev _lhsOseg _lhsOv _lhsOvisitss ))+sem_Segment_Segment :: ([Vertex]) ->+ ([Vertex]) ->+ T_Segment +sem_Segment_Segment !inh_ !syn_ =+ (T_Segment (\ (!_lhsIinfo)+ (!_lhsIv) ->+ (case (({-# LINE 106 "InterfacesRules.lag" #-}+ \a -> ruleTable _lhsIinfo ! a+ {-# LINE 737 "InterfacesRules.hs" #-})) of+ { !_look ->+ (case (({-# LINE 109 "InterfacesRules.lag" #-}+ \p us -> [ a | u <- us+ , a <- tdsToTdp _lhsIinfo ! u+ , p (_look a)]+ {-# LINE 743 "InterfacesRules.hs" #-})) of+ { !_occurAs ->+ (case (({-# LINE 113 "InterfacesRules.lag" #-}+ let group as = gather _lhsIinfo (_occurAs isRhs as)+ in map (partition (isInh . _look)) (group (inh_ ++ syn_))+ {-# LINE 748 "InterfacesRules.hs" #-})) of+ { !_groups ->+ (case (({-# LINE 116 "InterfacesRules.lag" #-}+ _lhsIv + length _groups+ {-# LINE 752 "InterfacesRules.hs" #-})) of+ { !_v ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _v+ {-# LINE 756 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Segment_Segment_1 :: T_Segment_1 + sem_Segment_Segment_1 =+ (T_Segment_1 (\ (!_lhsIn)+ (!_lhsInextNewvertices) ->+ (case (({-# LINE 117 "InterfacesRules.lag" #-}+ [_lhsIv .. _v -1]+ {-# LINE 764 "InterfacesRules.hs" #-})) of+ { !_newvertices ->+ (case (({-# LINE 132 "InterfacesRules.lag" #-}+ Seq.fromList $ zipWith (cv _look _lhsIn) _newvertices _groups+ {-# LINE 768 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 182 "InterfacesRules.lag" #-}+ _groups+ {-# LINE 772 "InterfacesRules.hs" #-})) of+ { !_lhsOgroups ->+ (case (({-# LINE 174 "InterfacesRules.lag" #-}+ zip _newvertices _lhsInextNewvertices+ {-# LINE 776 "InterfacesRules.hs" #-})) of+ { !_visitedges ->+ (case (({-# LINE 155 "InterfacesRules.lag" #-}+ concat (zipWith ed _newvertices _groups)+ {-# LINE 780 "InterfacesRules.hs" #-})) of+ { !_attredges ->+ (case (({-# LINE 175 "InterfacesRules.lag" #-}+ Seq.fromList _attredges Seq.>< Seq.fromList _visitedges+ {-# LINE 784 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 166 "InterfacesRules.lag" #-}+ _newvertices+ {-# LINE 788 "InterfacesRules.hs" #-})) of+ { !_lhsOnewvertices ->+ (case ((let sem_Segment_Segment_2 :: T_Segment_2 + sem_Segment_Segment_2 =+ (T_Segment_2 (\ (!_lhsIcons)+ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 229 "InterfacesRules.lag" #-}+ gather _lhsIinfo (_occurAs isLhs syn_)+ {-# LINE 798 "InterfacesRules.hs" #-})) of+ { !_synOccur ->+ (case (({-# LINE 230 "InterfacesRules.lag" #-}+ let hasCode v | inRange (bounds (ruleTable _lhsIinfo)) v = getHasCode (ruleTable _lhsIinfo ! v)+ | otherwise = True+ in if null syn_+ then replicate (length _lhsIcons) []+ else map (filter hasCode . topSort' _lhsIvssGraph) _synOccur+ {-# LINE 806 "InterfacesRules.hs" #-})) of+ { !_vss ->+ (case (({-# LINE 270 "InterfacesRules.lag" #-}+ map (\\ _lhsIprev) _vss+ {-# LINE 810 "InterfacesRules.hs" #-})) of+ { !_visitss' ->+ (case (({-# LINE 284 "InterfacesRules.lag" #-}+ let rem :: [(Identifier,Identifier,Maybe Type)] -> [Vertex] -> [Vertex]+ rem prev [] = []+ rem prev (v:vs)+ | inRange (bounds table) v+ = let cr = table ! v+ addV = case findIndex cmp prev of+ Just _ -> id+ _ -> (v:)+ cmp (fld,attr,tp) = getField cr == fld && getAttr cr == attr && sameNT (getType cr) tp+ sameNT (Just (NT ntA _)) (Just (NT ntB _)) = ntA == ntB+ sameNT _ _ = False+ def = Map.elems (getDefines cr)+ in addV (rem (def ++ prev) vs)+ | otherwise = v:rem prev vs+ table = ruleTable _lhsIinfo+ in map (rem []) _visitss'+ {-# LINE 829 "InterfacesRules.hs" #-})) of+ { !_visitss ->+ (case (({-# LINE 271 "InterfacesRules.lag" #-}+ let defines v = case Map.lookup v _lhsIvisitDescr of+ Nothing -> [v]+ Just (ChildVisit _ _ _ inh _) -> v:inh+ in concatMap (concatMap defines) _visitss+ {-# LINE 836 "InterfacesRules.hs" #-})) of+ { !_defined ->+ (case (({-# LINE 275 "InterfacesRules.lag" #-}+ _lhsIprev ++ _defined+ {-# LINE 840 "InterfacesRules.hs" #-})) of+ { !_lhsOprev ->+ (case (({-# LINE 409 "InterfacesRules.lag" #-}+ let makemap = Map.fromList . map findType+ findType v = getNtaNameType (attrTable _lhsIinfo ! v)+ in (makemap inh_,makemap syn_)+ {-# LINE 846 "InterfacesRules.hs" #-})) of+ { !__tup1 ->+ (case (({-# LINE 409 "InterfacesRules.lag" #-}+ __tup1+ {-# LINE 850 "InterfacesRules.hs" #-})) of+ { !(_,!_synmap) ->+ (case (({-# LINE 409 "InterfacesRules.lag" #-}+ __tup1+ {-# LINE 854 "InterfacesRules.hs" #-})) of+ { !(!_inhmap,_) ->+ (case (({-# LINE 405 "InterfacesRules.lag" #-}+ if False then undefined _lhsIvssGraph _lhsIvisitDescr _lhsIprev else CSegment _inhmap _synmap+ {-# LINE 858 "InterfacesRules.hs" #-})) of+ { !_lhsOseg ->+ (case ((let sem_Segment_Segment_3 :: T_Segment_3 + sem_Segment_Segment_3 =+ (T_Segment_3 (\ (!_lhsIallInters)+ (!_lhsIddp)+ (!_lhsIfromLhs)+ (!_lhsIisFirst)+ (!_lhsInextInh)+ (!_lhsInextIntravisits) ->+ (case (({-# LINE 357 "InterfacesRules.lag" #-}+ let computes v = case Map.lookup v _lhsIvisitDescr of+ Nothing -> Map.keys (getDefines (ruleTable _lhsIinfo ! v))+ Just (ChildVisit _ _ _ _ syn) -> v:syn+ in concatMap (concatMap computes) _visitss+ {-# LINE 873 "InterfacesRules.hs" #-})) of+ { !_computed ->+ (case (({-# LINE 356 "InterfacesRules.lag" #-}+ _occurAs isLhs inh_ ++ _lhsIfromLhs+ {-# LINE 877 "InterfacesRules.hs" #-})) of+ { !_fromLhs ->+ (case (({-# LINE 362 "InterfacesRules.lag" #-}+ \vs next ->+ let needed = concatMap (_lhsIddp !) vs+ in nub (needed ++ next) \\ (_fromLhs ++ _computed)+ {-# LINE 883 "InterfacesRules.hs" #-})) of+ { !_iv ->+ (case (({-# LINE 361 "InterfacesRules.lag" #-}+ zipWith _iv _visitss _lhsInextIntravisits+ {-# LINE 887 "InterfacesRules.hs" #-})) of+ { !_intravisits ->+ (case (({-# LINE 412 "InterfacesRules.lag" #-}+ let mkVisit vss intra = CVisit _inhmap _synmap (mkSequence vss) (mkSequence intra) True+ mkSequence = map mkRule+ mkRule v = case Map.lookup v _lhsIvisitDescr of+ Nothing -> ruleTable _lhsIinfo ! v+ Just (ChildVisit name nt n _ _) -> ccv name nt n _lhsIallInters+ in zipWith mkVisit _visitss _intravisits+ {-# LINE 896 "InterfacesRules.hs" #-})) of+ { !_lhsOcvisits ->+ (case (({-# LINE 439 "InterfacesRules.lag" #-}+ Seq.fromList [(i,s) | i <- inh_, s <- syn_]+ Seq.>< Seq.fromList [(s,i) | s <- syn_, i <- _lhsInextInh ]+ {-# LINE 901 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 444 "InterfacesRules.lag" #-}+ inh_+ {-# LINE 905 "InterfacesRules.hs" #-})) of+ { !_lhsOinh ->+ (case (({-# LINE 327 "InterfacesRules.lag" #-}+ _intravisits+ {-# LINE 909 "InterfacesRules.hs" #-})) of+ { !_lhsOintravisits ->+ (case (({-# LINE 269 "InterfacesRules.lag" #-}+ _visitss+ {-# LINE 913 "InterfacesRules.hs" #-})) of+ { !_lhsOvisitss ->+ ( _lhsOcvisits,_lhsOedp,_lhsOinh,_lhsOintravisits,_lhsOvisitss) }) }) }) }) }) }) }) }) })) )+ in sem_Segment_Segment_3)) of+ { ( !sem_Segment_3) ->+ ( _lhsOprev,_lhsOseg,sem_Segment_3) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Segment_Segment_2)) of+ { ( !sem_Segment_2) ->+ ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,sem_Segment_2) }) }) }) }) }) }) }) })) )+ in sem_Segment_Segment_1)) of+ { ( !sem_Segment_1) ->+ ( _lhsOv,sem_Segment_1) }) }) }) }) }) })) )+-- Segments ----------------------------------------------------+{-+ visit 0:+ inherited attributes:+ info : Info+ n : Int+ chained attribute:+ v : Vertex+ synthesized attributes:+ descr : Seq (Vertex,ChildVisit)+ groups : [([Vertex],[Vertex])]+ newedges : Seq Edge + newvertices : [Vertex]+ visit 1:+ inherited attributes:+ cons : [ConstructorIdent]+ prev : [Vertex]+ visitDescr : Map Vertex ChildVisit+ vssGraph : Graph+ synthesized attribute:+ segs : CSegments+ visit 2:+ inherited attributes:+ allInters : CInterfaceMap+ ddp : Graph+ fromLhs : [Vertex]+ isFirst : Bool+ synthesized attributes:+ cvisits : [[CVisit]]+ edp : Seq Edge+ firstInh : [Vertex]+ hdIntravisits : [IntraVisit]+ prev : [Vertex]+ alternatives:+ alternative Cons:+ child hd : Segment + child tl : Segments + alternative Nil:+-}+-- cata+sem_Segments :: Segments ->+ T_Segments +sem_Segments !list =+ (Prelude.foldr sem_Segments_Cons sem_Segments_Nil (Prelude.map sem_Segment list) )+-- semantic domain+newtype T_Segments = T_Segments (Info ->+ Int ->+ Vertex ->+ ( (Seq (Vertex,ChildVisit)),([([Vertex],[Vertex])]),(Seq Edge ),([Vertex]),Vertex,T_Segments_1 ))+newtype T_Segments_1 = T_Segments_1 (([ConstructorIdent]) ->+ ([Vertex]) ->+ (Map Vertex ChildVisit) ->+ Graph ->+ ( CSegments,T_Segments_2 ))+newtype T_Segments_2 = T_Segments_2 (CInterfaceMap ->+ Graph ->+ ([Vertex]) ->+ Bool ->+ ( ([[CVisit]]),(Seq Edge),([Vertex]),([IntraVisit]),([Vertex])))+data Inh_Segments = Inh_Segments {allInters_Inh_Segments :: !(CInterfaceMap),cons_Inh_Segments :: !(([ConstructorIdent])),ddp_Inh_Segments :: !(Graph),fromLhs_Inh_Segments :: !(([Vertex])),info_Inh_Segments :: !(Info),isFirst_Inh_Segments :: !(Bool),n_Inh_Segments :: !(Int),prev_Inh_Segments :: !(([Vertex])),v_Inh_Segments :: !(Vertex),visitDescr_Inh_Segments :: !((Map Vertex ChildVisit)),vssGraph_Inh_Segments :: !(Graph)}+data Syn_Segments = Syn_Segments {cvisits_Syn_Segments :: !(([[CVisit]])),descr_Syn_Segments :: !((Seq (Vertex,ChildVisit))),edp_Syn_Segments :: !((Seq Edge)),firstInh_Syn_Segments :: !(([Vertex])),groups_Syn_Segments :: !(([([Vertex],[Vertex])])),hdIntravisits_Syn_Segments :: !(([IntraVisit])),newedges_Syn_Segments :: !((Seq Edge )),newvertices_Syn_Segments :: !(([Vertex])),prev_Syn_Segments :: !(([Vertex])),segs_Syn_Segments :: !(CSegments),v_Syn_Segments :: !(Vertex)}+wrap_Segments :: T_Segments ->+ Inh_Segments ->+ Syn_Segments +wrap_Segments !(T_Segments sem ) !(Inh_Segments _lhsIallInters _lhsIcons _lhsIddp _lhsIfromLhs _lhsIinfo _lhsIisFirst _lhsIn _lhsIprev _lhsIv _lhsIvisitDescr _lhsIvssGraph ) =+ (let ( !_lhsOdescr,!_lhsOgroups,!_lhsOnewedges,!_lhsOnewvertices,!_lhsOv,!T_Segments_1 sem_1) =+ (sem _lhsIinfo _lhsIn _lhsIv )+ ( !_lhsOsegs,!T_Segments_2 sem_2) =+ (sem_1 _lhsIcons _lhsIprev _lhsIvisitDescr _lhsIvssGraph )+ ( !_lhsOcvisits,!_lhsOedp,!_lhsOfirstInh,!_lhsOhdIntravisits,!_lhsOprev) =+ (sem_2 _lhsIallInters _lhsIddp _lhsIfromLhs _lhsIisFirst )+ in (Syn_Segments _lhsOcvisits _lhsOdescr _lhsOedp _lhsOfirstInh _lhsOgroups _lhsOhdIntravisits _lhsOnewedges _lhsOnewvertices _lhsOprev _lhsOsegs _lhsOv ))+sem_Segments_Cons :: T_Segment ->+ T_Segments ->+ T_Segments +sem_Segments_Cons !(T_Segment hd_ ) !(T_Segments tl_ ) =+ (T_Segments (\ (!_lhsIinfo)+ (!_lhsIn)+ (!_lhsIv) ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 1006 "InterfacesRules.hs" #-})) of+ { !_hdOv ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 1010 "InterfacesRules.hs" #-})) of+ { !_hdOinfo ->+ (case ((hd_ _hdOinfo _hdOv )) of+ { ( !_hdIv,!T_Segment_1 hd_1) ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _hdIv+ {-# LINE 1016 "InterfacesRules.hs" #-})) of+ { !_tlOv ->+ (case (({-# LINE 83 "InterfacesRules.lag" #-}+ _lhsIinfo+ {-# LINE 1020 "InterfacesRules.hs" #-})) of+ { !_tlOinfo ->+ (case (({-# LINE 203 "InterfacesRules.lag" #-}+ _lhsIn+ {-# LINE 1024 "InterfacesRules.hs" #-})) of+ { !_hdOn ->+ (case (({-# LINE 207 "InterfacesRules.lag" #-}+ _lhsIn + 1+ {-# LINE 1028 "InterfacesRules.hs" #-})) of+ { !_tlOn ->+ (case ((tl_ _tlOinfo _tlOn _tlOv )) of+ { ( !_tlIdescr,!_tlIgroups,!_tlInewedges,!_tlInewvertices,!_tlIv,!T_Segments_1 tl_1) ->+ (case (({-# LINE 169 "InterfacesRules.lag" #-}+ _tlInewvertices+ {-# LINE 1034 "InterfacesRules.hs" #-})) of+ { !_hdOnextNewvertices ->+ (case ((hd_1 _hdOn _hdOnextNewvertices )) of+ { ( !_hdIdescr,!_hdIgroups,!_hdInewedges,!_hdInewvertices,!T_Segment_2 hd_2) ->+ (case (({-# LINE 130 "InterfacesRules.lag" #-}+ _hdIdescr Seq.>< _tlIdescr+ {-# LINE 1040 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 184 "InterfacesRules.lag" #-}+ _hdIgroups+ {-# LINE 1044 "InterfacesRules.hs" #-})) of+ { !_lhsOgroups ->+ (case (({-# LINE 129 "InterfacesRules.lag" #-}+ _hdInewedges Seq.>< _tlInewedges+ {-# LINE 1048 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 170 "InterfacesRules.lag" #-}+ _hdInewvertices+ {-# LINE 1052 "InterfacesRules.hs" #-})) of+ { !_lhsOnewvertices ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _tlIv+ {-# LINE 1056 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Segments_Cons_1 :: T_Segments_1 + sem_Segments_Cons_1 =+ (T_Segments_1 (\ (!_lhsIcons)+ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 1066 "InterfacesRules.hs" #-})) of+ { !_tlOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 1070 "InterfacesRules.hs" #-})) of+ { !_tlOvisitDescr ->+ (case (({-# LINE 216 "InterfacesRules.lag" #-}+ _lhsIvssGraph+ {-# LINE 1074 "InterfacesRules.hs" #-})) of+ { !_hdOvssGraph ->+ (case (({-# LINE 125 "InterfacesRules.lag" #-}+ _lhsIvisitDescr+ {-# LINE 1078 "InterfacesRules.hs" #-})) of+ { !_hdOvisitDescr ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 1082 "InterfacesRules.hs" #-})) of+ { !_hdOprev ->+ (case (({-# LINE 235 "InterfacesRules.lag" #-}+ _lhsIcons+ {-# LINE 1086 "InterfacesRules.hs" #-})) of+ { !_hdOcons ->+ (case ((hd_2 _hdOcons _hdOprev _hdOvisitDescr _hdOvssGraph )) of+ { ( !_hdIprev,!_hdIseg,!T_Segment_3 hd_3) ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _hdIprev+ {-# LINE 1092 "InterfacesRules.hs" #-})) of+ { !_tlOprev ->+ (case (({-# LINE 235 "InterfacesRules.lag" #-}+ _lhsIcons+ {-# LINE 1096 "InterfacesRules.hs" #-})) of+ { !_tlOcons ->+ (case ((tl_1 _tlOcons _tlOprev _tlOvisitDescr _tlOvssGraph )) of+ { ( !_tlIsegs,!T_Segments_2 tl_2) ->+ (case (({-# LINE 400 "InterfacesRules.lag" #-}+ _hdIseg : _tlIsegs+ {-# LINE 1102 "InterfacesRules.hs" #-})) of+ { !_lhsOsegs ->+ (case ((let sem_Segments_Cons_2 :: T_Segments_2 + sem_Segments_Cons_2 =+ (T_Segments_2 (\ (!_lhsIallInters)+ (!_lhsIddp)+ (!_lhsIfromLhs)+ (!_lhsIisFirst) ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 1112 "InterfacesRules.hs" #-})) of+ { !_tlOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 1116 "InterfacesRules.hs" #-})) of+ { !_tlOallInters ->+ (case (({-# LINE 341 "InterfacesRules.lag" #-}+ _lhsIddp+ {-# LINE 1120 "InterfacesRules.hs" #-})) of+ { !_hdOddp ->+ (case (({-# LINE 378 "InterfacesRules.lag" #-}+ _lhsIallInters+ {-# LINE 1124 "InterfacesRules.hs" #-})) of+ { !_hdOallInters ->+ (case (({-# LINE 354 "InterfacesRules.lag" #-}+ []+ {-# LINE 1128 "InterfacesRules.hs" #-})) of+ { !_tlOfromLhs ->+ (case (({-# LINE 353 "InterfacesRules.lag" #-}+ _lhsIfromLhs+ {-# LINE 1132 "InterfacesRules.hs" #-})) of+ { !_hdOfromLhs ->+ (case (({-# LINE 316 "InterfacesRules.lag" #-}+ False+ {-# LINE 1136 "InterfacesRules.hs" #-})) of+ { !_tlOisFirst ->+ (case ((tl_2 _tlOallInters _tlOddp _tlOfromLhs _tlOisFirst )) of+ { ( !_tlIcvisits,!_tlIedp,!_tlIfirstInh,!_tlIhdIntravisits,!_tlIprev) ->+ (case (({-# LINE 329 "InterfacesRules.lag" #-}+ _tlIhdIntravisits+ {-# LINE 1142 "InterfacesRules.hs" #-})) of+ { !_hdOnextIntravisits ->+ (case (({-# LINE 312 "InterfacesRules.lag" #-}+ _lhsIisFirst+ {-# LINE 1146 "InterfacesRules.hs" #-})) of+ { !_hdOisFirst ->+ (case (({-# LINE 446 "InterfacesRules.lag" #-}+ _tlIfirstInh+ {-# LINE 1150 "InterfacesRules.hs" #-})) of+ { !_hdOnextInh ->+ (case ((hd_3 _hdOallInters _hdOddp _hdOfromLhs _hdOisFirst _hdOnextInh _hdOnextIntravisits )) of+ { ( !_hdIcvisits,!_hdIedp,!_hdIinh,!_hdIintravisits,!_hdIvisitss) ->+ (case (({-# LINE 399 "InterfacesRules.lag" #-}+ _hdIcvisits : _tlIcvisits+ {-# LINE 1156 "InterfacesRules.hs" #-})) of+ { !_lhsOcvisits ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ _hdIedp Seq.>< _tlIedp+ {-# LINE 1160 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 447 "InterfacesRules.lag" #-}+ _hdIinh+ {-# LINE 1164 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstInh ->+ (case (({-# LINE 330 "InterfacesRules.lag" #-}+ _hdIintravisits+ {-# LINE 1168 "InterfacesRules.hs" #-})) of+ { !_lhsOhdIntravisits ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _tlIprev+ {-# LINE 1172 "InterfacesRules.hs" #-})) of+ { !_lhsOprev ->+ ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Segments_Cons_2)) of+ { ( !sem_Segments_2) ->+ ( _lhsOsegs,sem_Segments_2) }) }) }) }) }) }) }) }) }) }) }) })) )+ in sem_Segments_Cons_1)) of+ { ( !sem_Segments_1) ->+ ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,_lhsOv,sem_Segments_1) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })) )+sem_Segments_Nil :: T_Segments +sem_Segments_Nil =+ (T_Segments (\ (!_lhsIinfo)+ (!_lhsIn)+ (!_lhsIv) ->+ (case (({-# LINE 130 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 1188 "InterfacesRules.hs" #-})) of+ { !_lhsOdescr ->+ (case (({-# LINE 185 "InterfacesRules.lag" #-}+ []+ {-# LINE 1192 "InterfacesRules.hs" #-})) of+ { !_lhsOgroups ->+ (case (({-# LINE 129 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 1196 "InterfacesRules.hs" #-})) of+ { !_lhsOnewedges ->+ (case (({-# LINE 171 "InterfacesRules.lag" #-}+ []+ {-# LINE 1200 "InterfacesRules.hs" #-})) of+ { !_lhsOnewvertices ->+ (case (({-# LINE 82 "InterfacesRules.lag" #-}+ _lhsIv+ {-# LINE 1204 "InterfacesRules.hs" #-})) of+ { !_lhsOv ->+ (case ((let sem_Segments_Nil_1 :: T_Segments_1 + sem_Segments_Nil_1 =+ (T_Segments_1 (\ (!_lhsIcons)+ (!_lhsIprev)+ (!_lhsIvisitDescr)+ (!_lhsIvssGraph) ->+ (case (({-# LINE 401 "InterfacesRules.lag" #-}+ []+ {-# LINE 1214 "InterfacesRules.hs" #-})) of+ { !_lhsOsegs ->+ (case ((let sem_Segments_Nil_2 :: T_Segments_2 + sem_Segments_Nil_2 =+ (T_Segments_2 (\ (!_lhsIallInters)+ (!_lhsIddp)+ (!_lhsIfromLhs)+ (!_lhsIisFirst) ->+ (case (({-# LINE 399 "InterfacesRules.lag" #-}+ []+ {-# LINE 1224 "InterfacesRules.hs" #-})) of+ { !_lhsOcvisits ->+ (case (({-# LINE 437 "InterfacesRules.lag" #-}+ Seq.empty+ {-# LINE 1228 "InterfacesRules.hs" #-})) of+ { !_lhsOedp ->+ (case (({-# LINE 448 "InterfacesRules.lag" #-}+ []+ {-# LINE 1232 "InterfacesRules.hs" #-})) of+ { !_lhsOfirstInh ->+ (case (({-# LINE 331 "InterfacesRules.lag" #-}+ repeat []+ {-# LINE 1236 "InterfacesRules.hs" #-})) of+ { !_lhsOhdIntravisits ->+ (case (({-# LINE 263 "InterfacesRules.lag" #-}+ _lhsIprev+ {-# LINE 1240 "InterfacesRules.hs" #-})) of+ { !_lhsOprev ->+ ( _lhsOcvisits,_lhsOedp,_lhsOfirstInh,_lhsOhdIntravisits,_lhsOprev) }) }) }) }) })) )+ in sem_Segments_Nil_2)) of+ { ( !sem_Segments_2) ->+ ( _lhsOsegs,sem_Segments_2) }) })) )+ in sem_Segments_Nil_1)) of+ { ( !sem_Segments_1) ->+ ( _lhsOdescr,_lhsOgroups,_lhsOnewedges,_lhsOnewvertices,_lhsOv,sem_Segments_1) }) }) }) }) }) })) )
src-derived/Order.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (Order.ag)+-- UUAGC 0.9.24 (Order.ag) module Order where {-# LINE 9 "Order.ag" #-} @@ -273,8 +273,8 @@ Bool -> Attributes -> ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),((Identifier,Type,Maybe (Maybe Type))),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))-data Inh_Child = Inh_Child {allfields_Inh_Child :: !([(Identifier,Type,Maybe (Maybe Type))]),allnts_Inh_Child :: !([Identifier]),attrs_Inh_Child :: !([(Identifier,Identifier)]),con_Inh_Child :: !(Identifier),inh_Inh_Child :: !(Attributes),nt_Inh_Child :: !(Identifier),o_unbox_Inh_Child :: !(Bool),syn_Inh_Child :: !(Attributes)}-data Syn_Child = Syn_Child {attributes_Syn_Child :: !([(Identifier,Attributes,Attributes)]),collectChildrenInhs_Syn_Child :: !(Map Identifier Attributes ),collectChildrenSyns_Syn_Child :: !(Map Identifier Attributes ),errors_Syn_Child :: !(Seq Error),field_Syn_Child :: !((Identifier,Type,Maybe (Maybe Type))),gathAltAttrs_Syn_Child :: !([AltAttr]),gathRules_Syn_Child :: !(Seq CRule),inhs_Syn_Child :: !(Seq (Identifier,Attributes)),nts_Syn_Child :: !(Seq (Identifier,NontermIdent)),singlevisits_Syn_Child :: !([CRule]),terminals_Syn_Child :: !([Identifier])}+data Inh_Child = Inh_Child {allfields_Inh_Child :: !(([(Identifier,Type,Maybe (Maybe Type))])),allnts_Inh_Child :: !(([Identifier])),attrs_Inh_Child :: !(([(Identifier,Identifier)])),con_Inh_Child :: !(Identifier),inh_Inh_Child :: !(Attributes),nt_Inh_Child :: !(Identifier),o_unbox_Inh_Child :: !(Bool),syn_Inh_Child :: !(Attributes)}+data Syn_Child = Syn_Child {attributes_Syn_Child :: !(([(Identifier,Attributes,Attributes)])),collectChildrenInhs_Syn_Child :: !((Map Identifier Attributes )),collectChildrenSyns_Syn_Child :: !((Map Identifier Attributes )),errors_Syn_Child :: !((Seq Error)),field_Syn_Child :: !(((Identifier,Type,Maybe (Maybe Type)))),gathAltAttrs_Syn_Child :: !(([AltAttr])),gathRules_Syn_Child :: !((Seq CRule)),inhs_Syn_Child :: !((Seq (Identifier,Attributes))),nts_Syn_Child :: !((Seq (Identifier,NontermIdent))),singlevisits_Syn_Child :: !(([CRule])),terminals_Syn_Child :: !(([Identifier]))} wrap_Child :: T_Child -> Inh_Child -> Syn_Child @@ -429,8 +429,8 @@ Bool -> Attributes -> ( ([(Identifier,Attributes,Attributes)]),(Map Identifier Attributes ),(Map Identifier Attributes ),(Seq Error),([(Identifier,Type,Maybe (Maybe Type))]),([AltAttr]),(Seq CRule),(Seq (Identifier,Attributes)),(Seq (Identifier,NontermIdent)),([CRule]),([Identifier])))-data Inh_Children = Inh_Children {allfields_Inh_Children :: !([(Identifier,Type,Maybe (Maybe Type))]),allnts_Inh_Children :: !([Identifier]),attrs_Inh_Children :: !([(Identifier,Identifier)]),con_Inh_Children :: !(Identifier),inh_Inh_Children :: !(Attributes),nt_Inh_Children :: !(Identifier),o_unbox_Inh_Children :: !(Bool),syn_Inh_Children :: !(Attributes)}-data Syn_Children = Syn_Children {attributes_Syn_Children :: !([(Identifier,Attributes,Attributes)]),collectChildrenInhs_Syn_Children :: !(Map Identifier Attributes ),collectChildrenSyns_Syn_Children :: !(Map Identifier Attributes ),errors_Syn_Children :: !(Seq Error),fields_Syn_Children :: !([(Identifier,Type,Maybe (Maybe Type))]),gathAltAttrs_Syn_Children :: !([AltAttr]),gathRules_Syn_Children :: !(Seq CRule),inhs_Syn_Children :: !(Seq (Identifier,Attributes)),nts_Syn_Children :: !(Seq (Identifier,NontermIdent)),singlevisits_Syn_Children :: !([CRule]),terminals_Syn_Children :: !([Identifier])}+data Inh_Children = Inh_Children {allfields_Inh_Children :: !(([(Identifier,Type,Maybe (Maybe Type))])),allnts_Inh_Children :: !(([Identifier])),attrs_Inh_Children :: !(([(Identifier,Identifier)])),con_Inh_Children :: !(Identifier),inh_Inh_Children :: !(Attributes),nt_Inh_Children :: !(Identifier),o_unbox_Inh_Children :: !(Bool),syn_Inh_Children :: !(Attributes)}+data Syn_Children = Syn_Children {attributes_Syn_Children :: !(([(Identifier,Attributes,Attributes)])),collectChildrenInhs_Syn_Children :: !((Map Identifier Attributes )),collectChildrenSyns_Syn_Children :: !((Map Identifier Attributes )),errors_Syn_Children :: !((Seq Error)),fields_Syn_Children :: !(([(Identifier,Type,Maybe (Maybe Type))])),gathAltAttrs_Syn_Children :: !(([AltAttr])),gathRules_Syn_Children :: !((Seq CRule)),inhs_Syn_Children :: !((Seq (Identifier,Attributes))),nts_Syn_Children :: !((Seq (Identifier,NontermIdent))),singlevisits_Syn_Children :: !(([CRule])),terminals_Syn_Children :: !(([Identifier]))} wrap_Children :: T_Children -> Inh_Children -> Syn_Children @@ -757,9 +757,9 @@ ([(Identifier,Identifier)]) -> Identifier -> Identifier ->- ( (Set (Identifier,Identifier)),Expression,(Seq Error),([String]),([(Identifier,Identifier)]),([Identifier]),([Identifier])))-data Inh_Expression = Inh_Expression {allfields_Inh_Expression :: !([(Identifier,Type,Maybe (Maybe Type))]),allnts_Inh_Expression :: !([Identifier]),attrs_Inh_Expression :: !([(Identifier,Identifier)]),con_Inh_Expression :: !(Identifier),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])}+ ( (Set (Identifier,Identifier)),Expression ,(Seq Error),([String]),([(Identifier,Identifier)]),([Identifier]),([Identifier])))+data Inh_Expression = Inh_Expression {allfields_Inh_Expression :: !(([(Identifier,Type,Maybe (Maybe Type))])),allnts_Inh_Expression :: !(([Identifier])),attrs_Inh_Expression :: !(([(Identifier,Identifier)])),con_Inh_Expression :: !(Identifier),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 @@ -777,7 +777,7 @@ _lhsIcon _lhsInt -> (let _lhsOallRhsVars :: (Set (Identifier,Identifier))- _lhsOcopy :: Expression+ _lhsOcopy :: Expression _lhsOerrors :: (Seq Error) _lhsOtextLines :: ([String]) _lhsOusedAttrs :: ([(Identifier,Identifier)])@@ -922,7 +922,7 @@ newtype T_Grammar = T_Grammar (Options -> ( (Seq Error),Int,Int,CGrammar)) data Inh_Grammar = Inh_Grammar {options_Inh_Grammar :: !(Options)}-data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: !(Seq Error),nAutoRules_Syn_Grammar :: !(Int),nExplicitRules_Syn_Grammar :: !(Int),output_Syn_Grammar :: !(CGrammar)}+data Syn_Grammar = Syn_Grammar {errors_Syn_Grammar :: !((Seq Error)),nAutoRules_Syn_Grammar :: !(Int),nExplicitRules_Syn_Grammar :: !(Int),output_Syn_Grammar :: !(CGrammar)} wrap_Grammar :: T_Grammar -> Inh_Grammar -> Syn_Grammar @@ -1271,8 +1271,8 @@ String -> Int -> ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminal,(Seq Edge),(Seq Error),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),Int))-data Inh_Nonterminal = Inh_Nonterminal {acount_Inh_Nonterminal :: !(Int),allnts_Inh_Nonterminal :: !([Identifier]),aroundMap_Inh_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),cInterfaceMap_Inh_Nonterminal :: !(CInterfaceMap),cVisitsMap_Inh_Nonterminal :: !(CVisitsMap),manualAttrDepMap_Inh_Nonterminal :: !(AttrOrderMap),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),nAutoRules_Syn_Nonterminal :: !(Int),nExplicitRules_Syn_Nonterminal :: !(Int),nonts_Syn_Nonterminal :: !([(NontermIdent,[ConstructorIdent])]),ntattrs_Syn_Nonterminal :: !(Seq (Vertex,NTAttr)),rules_Syn_Nonterminal :: !(Seq (Vertex,CRule)),vcount_Syn_Nonterminal :: !(Int)}+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)),nAutoRules_Syn_Nonterminal :: !(Int),nExplicitRules_Syn_Nonterminal :: !(Int),nonts_Syn_Nonterminal :: !(([(NontermIdent,[ConstructorIdent])])),ntattrs_Syn_Nonterminal :: !((Seq (Vertex,NTAttr))),rules_Syn_Nonterminal :: !((Seq (Vertex,CRule))),vcount_Syn_Nonterminal :: !(Int)} wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> Syn_Nonterminal @@ -1599,8 +1599,8 @@ String -> Int -> ( Int,(Seq Edge),(Seq (Int,Int,Int)),(Seq Edge),CNonterminals,(Seq Edge),(Seq Error),(Seq Edge),Int,Int,([(NontermIdent,[ConstructorIdent])]),(Seq (Vertex,NTAttr)),(Seq (Vertex,CRule)),Int))-data Inh_Nonterminals = Inh_Nonterminals {acount_Inh_Nonterminals :: !(Int),allnts_Inh_Nonterminals :: !([Identifier]),aroundMap_Inh_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))),cInterfaceMap_Inh_Nonterminals :: !(CInterfaceMap),cVisitsMap_Inh_Nonterminals :: !(CVisitsMap),manualAttrDepMap_Inh_Nonterminals :: !(AttrOrderMap),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),nAutoRules_Syn_Nonterminals :: !(Int),nExplicitRules_Syn_Nonterminals :: !(Int),nonts_Syn_Nonterminals :: !([(NontermIdent,[ConstructorIdent])]),ntattrs_Syn_Nonterminals :: !(Seq (Vertex,NTAttr)),rules_Syn_Nonterminals :: !(Seq (Vertex,CRule)),vcount_Syn_Nonterminals :: !(Int)}+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)),nAutoRules_Syn_Nonterminals :: !(Int),nExplicitRules_Syn_Nonterminals :: !(Int),nonts_Syn_Nonterminals :: !(([(NontermIdent,[ConstructorIdent])])),ntattrs_Syn_Nonterminals :: !((Seq (Vertex,NTAttr))),rules_Syn_Nonterminals :: !((Seq (Vertex,CRule))),vcount_Syn_Nonterminals :: !(Int)} wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> Syn_Nonterminals @@ -2132,9 +2132,9 @@ 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)])}+ ( 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 @@ -2159,7 +2159,7 @@ _lhsOlocVars :: ([Identifier]) _lhsOinstVars :: ([Identifier]) _lhsOerrors :: (Seq Error)- _lhsOcopy :: Pattern+ _lhsOcopy :: Pattern _patOallTypeSigs :: (Map Identifier Type) _patOaltAttrs :: (Map AltAttr Vertex) _patOcon :: Identifier@@ -2172,13 +2172,13 @@ _partsOinh :: Attributes _partsOnt :: Identifier _partsOsyn :: Attributes- _patIcopy :: Pattern+ _patIcopy :: Pattern _patIerrors :: (Seq Error) _patIgathAltAttrs :: ([AltAttr]) _patIinstVars :: ([Identifier]) _patIlocVars :: ([Identifier]) _patIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _partsIcopy :: Patterns+ _partsIcopy :: Patterns _partsIerrors :: (Seq Error) _partsIgathAltAttrs :: ([AltAttr]) _partsIinstVars :: ([Identifier])@@ -2303,14 +2303,14 @@ _lhsOinstVars :: ([Identifier]) _lhsOlocVars :: ([Identifier]) _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Pattern+ _lhsOcopy :: Pattern _patsOallTypeSigs :: (Map Identifier Type) _patsOaltAttrs :: (Map AltAttr Vertex) _patsOcon :: Identifier _patsOinh :: Attributes _patsOnt :: Identifier _patsOsyn :: Attributes- _patsIcopy :: Patterns+ _patsIcopy :: Patterns _patsIerrors :: (Seq Error) _patsIgathAltAttrs :: ([AltAttr]) _patsIinstVars :: ([Identifier])@@ -2398,14 +2398,14 @@ _lhsOinstVars :: ([Identifier]) _lhsOlocVars :: ([Identifier]) _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Pattern+ _lhsOcopy :: Pattern _patOallTypeSigs :: (Map Identifier Type) _patOaltAttrs :: (Map AltAttr Vertex) _patOcon :: Identifier _patOinh :: Attributes _patOnt :: Identifier _patOsyn :: Attributes- _patIcopy :: Pattern+ _patIcopy :: Pattern _patIerrors :: (Seq Error) _patIgathAltAttrs :: ([AltAttr]) _patIinstVars :: ([Identifier])@@ -2494,14 +2494,14 @@ _lhsOinstVars :: ([Identifier]) _lhsOlocVars :: ([Identifier]) _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Pattern+ _lhsOcopy :: Pattern _patsOallTypeSigs :: (Map Identifier Type) _patsOaltAttrs :: (Map AltAttr Vertex) _patsOcon :: Identifier _patsOinh :: Attributes _patsOnt :: Identifier _patsOsyn :: Attributes- _patsIcopy :: Patterns+ _patsIcopy :: Patterns _patsIerrors :: (Seq Error) _patsIgathAltAttrs :: ([AltAttr]) _patsIinstVars :: ([Identifier])@@ -2589,7 +2589,7 @@ _lhsOinstVars :: ([Identifier]) _lhsOlocVars :: ([Identifier]) _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Pattern+ _lhsOcopy :: Pattern -- use rule "Order.ag"(line 84, column 70) _lhsOerrors = ({-# LINE 84 "Order.ag" #-}@@ -2665,9 +2665,9 @@ 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)])}+ ( 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 @@ -2690,7 +2690,7 @@ _lhsOinstVars :: ([Identifier]) _lhsOlocVars :: ([Identifier]) _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Patterns+ _lhsOcopy :: Patterns _hdOallTypeSigs :: (Map Identifier Type) _hdOaltAttrs :: (Map AltAttr Vertex) _hdOcon :: Identifier@@ -2703,13 +2703,13 @@ _tlOinh :: Attributes _tlOnt :: Identifier _tlOsyn :: Attributes- _hdIcopy :: Pattern+ _hdIcopy :: Pattern _hdIerrors :: (Seq Error) _hdIgathAltAttrs :: ([AltAttr]) _hdIinstVars :: ([Identifier]) _hdIlocVars :: ([Identifier]) _hdIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _tlIcopy :: Patterns+ _tlIcopy :: Patterns _tlIerrors :: (Seq Error) _tlIgathAltAttrs :: ([AltAttr]) _tlIinstVars :: ([Identifier])@@ -2828,7 +2828,7 @@ _lhsOinstVars :: ([Identifier]) _lhsOlocVars :: ([Identifier]) _lhsOpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)])- _lhsOcopy :: Patterns+ _lhsOcopy :: Patterns -- use rule "Order.ag"(line 84, column 70) _lhsOerrors = ({-# LINE 84 "Order.ag" #-}@@ -2945,8 +2945,8 @@ Attributes -> Int -> ( (Seq Edge),(Seq Edge),CProduction,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))-data Inh_Production = Inh_Production {allnts_Inh_Production :: !([Identifier]),aroundMap_Inh_Production :: !(Map ConstructorIdent (Map Identifier [Expression])),cVisitsMap_Inh_Production :: !(CVisitsMap),inh_Inh_Production :: !(Attributes),manualAttrDepMap_Inh_Production :: !(AttrOrderMap),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),nAutoRules_Syn_Production :: !(Int),nExplicitRules_Syn_Production :: !(Int),rules_Syn_Production :: !(Seq (Vertex,CRule)),vcount_Syn_Production :: !(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)),nAutoRules_Syn_Production :: !(Int),nExplicitRules_Syn_Production :: !(Int),rules_Syn_Production :: !((Seq (Vertex,CRule))),vcount_Syn_Production :: !(Int)} wrap_Production :: T_Production -> Inh_Production -> Syn_Production @@ -3423,8 +3423,8 @@ Attributes -> Int -> ( (Seq Edge),(Seq Edge),CProductions,([ConstructorIdent]),(Seq Edge),(Seq Error),(Seq Edge),Int,Int,(Seq (Vertex,CRule)),Int))-data Inh_Productions = Inh_Productions {allnts_Inh_Productions :: !([Identifier]),aroundMap_Inh_Productions :: !(Map ConstructorIdent (Map Identifier [Expression])),cVisitsMap_Inh_Productions :: !(CVisitsMap),inh_Inh_Productions :: !(Attributes),manualAttrDepMap_Inh_Productions :: !(AttrOrderMap),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),nAutoRules_Syn_Productions :: !(Int),nExplicitRules_Syn_Productions :: !(Int),rules_Syn_Productions :: !(Seq (Vertex,CRule)),vcount_Syn_Productions :: !(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)),nAutoRules_Syn_Productions :: !(Int),nExplicitRules_Syn_Productions :: !(Int),rules_Syn_Productions :: !((Seq (Vertex,CRule))),vcount_Syn_Productions :: !(Int)} wrap_Productions :: T_Productions -> Inh_Productions -> Syn_Productions @@ -3929,8 +3929,8 @@ Attributes -> (Map Identifier Attributes) -> ( (Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier]),Int,Int))-data Inh_Rule = Inh_Rule {allTypeSigs_Inh_Rule :: !(Map Identifier Type),allfields_Inh_Rule :: !([(Identifier,Type,Maybe (Maybe Type))]),allnts_Inh_Rule :: !([Identifier]),altAttrs_Inh_Rule :: !(Map AltAttr Vertex),attrs_Inh_Rule :: !([(Identifier,Identifier)]),childInhs_Inh_Rule :: !(Map Identifier Attributes),childNts_Inh_Rule :: !(Map Identifier NontermIdent),con_Inh_Rule :: !(Identifier),inh_Inh_Rule :: !(Attributes),inhsOfChildren_Inh_Rule :: !(Map Identifier Attributes),nt_Inh_Rule :: !(Identifier),o_case_Inh_Rule :: !(Bool),o_cata_Inh_Rule :: !(Bool),o_dovisit_Inh_Rule :: !(Bool),o_newtypes_Inh_Rule :: !(Bool),o_rename_Inh_Rule :: !(Bool),o_sem_Inh_Rule :: !(Bool),o_sig_Inh_Rule :: !(Bool),o_wantvisit_Inh_Rule :: !(Bool),prefix_Inh_Rule :: !(String),syn_Inh_Rule :: !(Attributes),synsOfChildren_Inh_Rule :: !(Map Identifier Attributes)}-data Syn_Rule = Syn_Rule {directDep_Syn_Rule :: !(Seq Edge),errors_Syn_Rule :: !(Seq Error),gathAltAttrs_Syn_Rule :: !([AltAttr]),gathRules_Syn_Rule :: !(Seq CRule),instDep_Syn_Rule :: !(Seq Edge),instVars_Syn_Rule :: !([Identifier]),locVars_Syn_Rule :: !([Identifier]),nAutoRules_Syn_Rule :: !(Int),nExplicitRules_Syn_Rule :: !(Int)}+data Inh_Rule = Inh_Rule {allTypeSigs_Inh_Rule :: !((Map Identifier Type)),allfields_Inh_Rule :: !(([(Identifier,Type,Maybe (Maybe Type))])),allnts_Inh_Rule :: !(([Identifier])),altAttrs_Inh_Rule :: !((Map AltAttr Vertex)),attrs_Inh_Rule :: !(([(Identifier,Identifier)])),childInhs_Inh_Rule :: !((Map Identifier Attributes)),childNts_Inh_Rule :: !((Map Identifier NontermIdent)),con_Inh_Rule :: !(Identifier),inh_Inh_Rule :: !(Attributes),inhsOfChildren_Inh_Rule :: !((Map Identifier Attributes)),nt_Inh_Rule :: !(Identifier),o_case_Inh_Rule :: !(Bool),o_cata_Inh_Rule :: !(Bool),o_dovisit_Inh_Rule :: !(Bool),o_newtypes_Inh_Rule :: !(Bool),o_rename_Inh_Rule :: !(Bool),o_sem_Inh_Rule :: !(Bool),o_sig_Inh_Rule :: !(Bool),o_wantvisit_Inh_Rule :: !(Bool),prefix_Inh_Rule :: !(String),syn_Inh_Rule :: !(Attributes),synsOfChildren_Inh_Rule :: !((Map Identifier Attributes))}+data Syn_Rule = Syn_Rule {directDep_Syn_Rule :: !((Seq Edge)),errors_Syn_Rule :: !((Seq Error)),gathAltAttrs_Syn_Rule :: !(([AltAttr])),gathRules_Syn_Rule :: !((Seq CRule)),instDep_Syn_Rule :: !((Seq Edge)),instVars_Syn_Rule :: !(([Identifier])),locVars_Syn_Rule :: !(([Identifier])),nAutoRules_Syn_Rule :: !(Int),nExplicitRules_Syn_Rule :: !(Int)} wrap_Rule :: T_Rule -> Inh_Rule -> Syn_Rule @@ -3988,14 +3988,14 @@ _rhsOattrs :: ([(Identifier,Identifier)]) _rhsOcon :: Identifier _rhsOnt :: Identifier- _patternIcopy :: Pattern+ _patternIcopy :: Pattern _patternIerrors :: (Seq Error) _patternIgathAltAttrs :: ([AltAttr]) _patternIinstVars :: ([Identifier]) _patternIlocVars :: ([Identifier]) _patternIpatternAttrs :: ([(Identifier,Identifier,Bool,Patterns)]) _rhsIallRhsVars :: (Set (Identifier,Identifier))- _rhsIcopy :: Expression+ _rhsIcopy :: Expression _rhsIerrors :: (Seq Error) _rhsItextLines :: ([String]) _rhsIusedAttrs :: ([(Identifier,Identifier)])@@ -4239,8 +4239,8 @@ Attributes -> (Map Identifier Attributes) -> ( (Seq Edge),(Seq Error),([AltAttr]),(Seq CRule),(Seq Edge),([Identifier]),([Identifier]),Int,Int))-data Inh_Rules = Inh_Rules {allTypeSigs_Inh_Rules :: !(Map Identifier Type),allfields_Inh_Rules :: !([(Identifier,Type,Maybe (Maybe Type))]),allnts_Inh_Rules :: !([Identifier]),altAttrs_Inh_Rules :: !(Map AltAttr Vertex),attrs_Inh_Rules :: !([(Identifier,Identifier)]),childInhs_Inh_Rules :: !(Map Identifier Attributes),childNts_Inh_Rules :: !(Map Identifier NontermIdent),con_Inh_Rules :: !(Identifier),inh_Inh_Rules :: !(Attributes),inhsOfChildren_Inh_Rules :: !(Map Identifier Attributes),nt_Inh_Rules :: !(Identifier),o_case_Inh_Rules :: !(Bool),o_cata_Inh_Rules :: !(Bool),o_dovisit_Inh_Rules :: !(Bool),o_newtypes_Inh_Rules :: !(Bool),o_rename_Inh_Rules :: !(Bool),o_sem_Inh_Rules :: !(Bool),o_sig_Inh_Rules :: !(Bool),o_wantvisit_Inh_Rules :: !(Bool),prefix_Inh_Rules :: !(String),syn_Inh_Rules :: !(Attributes),synsOfChildren_Inh_Rules :: !(Map Identifier Attributes)}-data Syn_Rules = Syn_Rules {directDep_Syn_Rules :: !(Seq Edge),errors_Syn_Rules :: !(Seq Error),gathAltAttrs_Syn_Rules :: !([AltAttr]),gathRules_Syn_Rules :: !(Seq CRule),instDep_Syn_Rules :: !(Seq Edge),instVars_Syn_Rules :: !([Identifier]),locVars_Syn_Rules :: !([Identifier]),nAutoRules_Syn_Rules :: !(Int),nExplicitRules_Syn_Rules :: !(Int)}+data Inh_Rules = Inh_Rules {allTypeSigs_Inh_Rules :: !((Map Identifier Type)),allfields_Inh_Rules :: !(([(Identifier,Type,Maybe (Maybe Type))])),allnts_Inh_Rules :: !(([Identifier])),altAttrs_Inh_Rules :: !((Map AltAttr Vertex)),attrs_Inh_Rules :: !(([(Identifier,Identifier)])),childInhs_Inh_Rules :: !((Map Identifier Attributes)),childNts_Inh_Rules :: !((Map Identifier NontermIdent)),con_Inh_Rules :: !(Identifier),inh_Inh_Rules :: !(Attributes),inhsOfChildren_Inh_Rules :: !((Map Identifier Attributes)),nt_Inh_Rules :: !(Identifier),o_case_Inh_Rules :: !(Bool),o_cata_Inh_Rules :: !(Bool),o_dovisit_Inh_Rules :: !(Bool),o_newtypes_Inh_Rules :: !(Bool),o_rename_Inh_Rules :: !(Bool),o_sem_Inh_Rules :: !(Bool),o_sig_Inh_Rules :: !(Bool),o_wantvisit_Inh_Rules :: !(Bool),prefix_Inh_Rules :: !(String),syn_Inh_Rules :: !(Attributes),synsOfChildren_Inh_Rules :: !((Map Identifier Attributes))}+data Syn_Rules = Syn_Rules {directDep_Syn_Rules :: !((Seq Edge)),errors_Syn_Rules :: !((Seq Error)),gathAltAttrs_Syn_Rules :: !(([AltAttr])),gathRules_Syn_Rules :: !((Seq CRule)),instDep_Syn_Rules :: !((Seq Edge)),instVars_Syn_Rules :: !(([Identifier])),locVars_Syn_Rules :: !(([Identifier])),nAutoRules_Syn_Rules :: !(Int),nExplicitRules_Syn_Rules :: !(Int)} wrap_Rules :: T_Rules -> Inh_Rules -> Syn_Rules @@ -4712,8 +4712,8 @@ -- 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)}+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 @@ -4752,8 +4752,8 @@ -- 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)}+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
src-derived/Patterns.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (Patterns.ag)+-- UUAGC 0.9.24 (Patterns.ag) module Patterns where {-# LINE 2 "Patterns.ag" #-} @@ -40,10 +40,10 @@ visit 0: local copy : _ -}-data Pattern = Alias (Identifier) (Identifier) (Pattern) (Patterns) - | Constr (ConstructorIdent) (Patterns) - | Irrefutable (Pattern) - | Product (Pos) (Patterns) +data Pattern = Alias (Identifier) (Identifier) (Pattern ) (Patterns ) + | Constr (ConstructorIdent) (Patterns ) + | Irrefutable (Pattern ) + | Product (Pos) (Patterns ) | Underscore (Pos) deriving ( Show) -- Patterns ----------------------------------------------------@@ -61,4 +61,4 @@ visit 0: local copy : _ -}-type Patterns = [(Pattern)]+type Patterns = [Pattern ]
src-derived/PrintCode.hs view
@@ -1,6 +1,6 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.21 (PrintCode.ag)+-- UUAGC 0.9.24 (PrintCode.ag) module PrintCode where {-# LINE 10 "PrintCode.ag" #-} @@ -325,8 +325,8 @@ (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)}+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 @@ -582,8 +582,8 @@ (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)}+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 @@ -2368,9 +2368,9 @@ newtype T_Pattern = T_Pattern (Bool -> Bool -> Options ->- ( Pattern,Bool,PP_Doc,PP_Doc,([PP_Doc])))+ ( 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])}+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 @@ -2681,9 +2681,9 @@ newtype T_Patterns = T_Patterns (Bool -> Bool -> Options ->- ( Patterns,([PP_Doc]),([PP_Doc]),([PP_Doc])))+ ( 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])}+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 @@ -2814,8 +2814,8 @@ (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)}+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
src-derived/PrintErrorMessages.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (PrintErrorMessages.ag)+-- UUAGC 0.9.24 (PrintErrorMessages.ag) module PrintErrorMessages where {-# LINE 4 "PrintErrorMessages.ag" #-} @@ -431,9 +431,9 @@ -- semantic domain newtype T_Error = T_Error (Options -> Bool ->- ( Error,PP_Doc))+ ( Error ,PP_Doc)) data Inh_Error = Inh_Error {options_Inh_Error :: Options,verbose_Inh_Error :: Bool}-data Syn_Error = Syn_Error {me_Syn_Error :: Error,pp_Syn_Error :: PP_Doc}+data Syn_Error = Syn_Error {me_Syn_Error :: Error ,pp_Syn_Error :: PP_Doc} wrap_Error :: T_Error -> Inh_Error -> Syn_Error @@ -449,7 +449,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 332, column 21) _lhsOpp = ({-# LINE 332 "PrintErrorMessages.ag" #-}@@ -485,7 +485,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 374, column 21) _lhsOpp = ({-# LINE 374 "PrintErrorMessages.ag" #-}@@ -511,7 +511,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 365, column 21) _lhsOpp = ({-# LINE 365 "PrintErrorMessages.ag" #-}@@ -543,7 +543,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 403, column 21) _lhsOpp = ({-# LINE 403 "PrintErrorMessages.ag" #-}@@ -574,7 +574,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 78, column 21) _lhsOpp = ({-# LINE 78 "PrintErrorMessages.ag" #-}@@ -617,7 +617,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 171, column 21) _lhsOpp = ({-# LINE 171 "PrintErrorMessages.ag" #-}@@ -658,7 +658,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 133, column 21) _lhsOpp = ({-# LINE 133 "PrintErrorMessages.ag" #-}@@ -700,7 +700,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 191, column 21) _lhsOpp = ({-# LINE 191 "PrintErrorMessages.ag" #-}@@ -739,7 +739,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 209, column 21) _lhsOpp = ({-# LINE 209 "PrintErrorMessages.ag" #-}@@ -774,7 +774,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 117, column 21) _lhsOpp = ({-# LINE 117 "PrintErrorMessages.ag" #-}@@ -813,7 +813,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 224, column 21) _lhsOpp = ({-# LINE 224 "PrintErrorMessages.ag" #-}@@ -851,7 +851,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 152, column 21) _lhsOpp = ({-# LINE 152 "PrintErrorMessages.ag" #-}@@ -890,7 +890,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 100, column 21) _lhsOpp = ({-# LINE 100 "PrintErrorMessages.ag" #-}@@ -930,7 +930,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 464, column 21) _lhsOpp = ({-# LINE 464 "PrintErrorMessages.ag" #-}@@ -968,7 +968,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 411, column 21) _lhsOpp = ({-# LINE 411 "PrintErrorMessages.ag" #-}@@ -1002,7 +1002,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 391, column 21) _lhsOpp = ({-# LINE 391 "PrintErrorMessages.ag" #-}@@ -1039,7 +1039,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 379, column 21) _lhsOpp = ({-# LINE 379 "PrintErrorMessages.ag" #-}@@ -1074,7 +1074,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 434, column 21) _lhsOpp = ({-# LINE 434 "PrintErrorMessages.ag" #-}@@ -1111,7 +1111,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 291, column 23) _lhsOpp = ({-# LINE 291 "PrintErrorMessages.ag" #-}@@ -1146,7 +1146,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 278, column 21) _lhsOpp = ({-# LINE 278 "PrintErrorMessages.ag" #-}@@ -1180,7 +1180,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 481, column 20) _lhsOpp = ({-# LINE 481 "PrintErrorMessages.ag" #-}@@ -1218,7 +1218,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 420, column 21) _lhsOpp = ({-# LINE 420 "PrintErrorMessages.ag" #-}@@ -1254,7 +1254,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 448, column 21) _lhsOpp = ({-# LINE 448 "PrintErrorMessages.ag" #-}@@ -1292,7 +1292,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 72, column 21) _lhsOpp = ({-# LINE 72 "PrintErrorMessages.ag" #-}@@ -1322,7 +1322,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 303, column 21) _lhsOpp = ({-# LINE 303 "PrintErrorMessages.ag" #-}@@ -1356,7 +1356,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 251, column 21) _lhsOpp = ({-# LINE 251 "PrintErrorMessages.ag" #-}@@ -1392,7 +1392,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 346, column 21) _lhsOpp = ({-# LINE 346 "PrintErrorMessages.ag" #-}@@ -1433,7 +1433,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 263, column 21) _lhsOpp = ({-# LINE 263 "PrintErrorMessages.ag" #-}@@ -1470,7 +1470,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 317, column 21) _lhsOpp = ({-# LINE 317 "PrintErrorMessages.ag" #-}@@ -1505,7 +1505,7 @@ (T_Error (\ _lhsIoptions _lhsIverbose -> (let _lhsOpp :: PP_Doc- _lhsOme :: Error+ _lhsOme :: Error -- "PrintErrorMessages.ag"(line 241, column 21) _lhsOpp = ({-# LINE 241 "PrintErrorMessages.ag" #-}@@ -1572,7 +1572,7 @@ _hdOoptions :: Options _hdOverbose :: Bool _tlOoptions :: Options- _hdIme :: Error+ _hdIme :: Error _hdIpp :: PP_Doc _tlIpp :: PP_Doc -- "PrintErrorMessages.ag"(line 67, column 8)
src-derived/PrintOcamlCode.hs view
@@ -1,6 +1,6 @@ {-# OPTIONS_GHC -XBangPatterns #-} --- UUAGC 0.9.21 (PrintOcamlCode.ag)+-- UUAGC 0.9.24 (PrintOcamlCode.ag) module PrintOcamlCode where {-# LINE 10 "PrintOcamlCode.ag" #-} @@ -214,7 +214,7 @@ Options -> (Map BlockInfo PP_Doc) -> ( PP_Docs))-data Inh_Chunk = Inh_Chunk {isToplevel_Inh_Chunk :: !(Bool),options_Inh_Chunk :: !(Options),textBlockMap_Inh_Chunk :: !(Map BlockInfo PP_Doc)}+data Inh_Chunk = Inh_Chunk {isToplevel_Inh_Chunk :: !(Bool),options_Inh_Chunk :: !(Options),textBlockMap_Inh_Chunk :: !((Map BlockInfo PP_Doc))} data Syn_Chunk = Syn_Chunk {pps_Syn_Chunk :: !(PP_Docs)} wrap_Chunk :: T_Chunk -> Inh_Chunk ->@@ -344,7 +344,7 @@ Options -> (Map BlockInfo PP_Doc) -> ( PP_Docs))-data Inh_Chunks = Inh_Chunks {isToplevel_Inh_Chunks :: !(Bool),options_Inh_Chunks :: !(Options),textBlockMap_Inh_Chunks :: !(Map BlockInfo PP_Doc)}+data Inh_Chunks = Inh_Chunks {isToplevel_Inh_Chunks :: !(Bool),options_Inh_Chunks :: !(Options),textBlockMap_Inh_Chunks :: !((Map BlockInfo PP_Doc))} data Syn_Chunks = Syn_Chunks {pps_Syn_Chunks :: !(PP_Docs)} wrap_Chunks :: T_Chunks -> Inh_Chunks ->@@ -1404,9 +1404,9 @@ (sem_Pattern_Underscore _pos ) -- semantic domain newtype T_Pattern = T_Pattern (Options ->- ( Pattern,Bool,PP_Doc))+ ( Pattern ,Bool,PP_Doc)) data Inh_Pattern = Inh_Pattern {options_Inh_Pattern :: !(Options)}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern),isUnderscore_Syn_Pattern :: !(Bool),pp_Syn_Pattern :: !(PP_Doc)}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern ),isUnderscore_Syn_Pattern :: !(Bool),pp_Syn_Pattern :: !(PP_Doc)} wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern @@ -1581,9 +1581,9 @@ (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) ) -- semantic domain newtype T_Patterns = T_Patterns (Options ->- ( Patterns,PP_Docs))+ ( Patterns ,PP_Docs)) data Inh_Patterns = Inh_Patterns {options_Inh_Patterns :: !(Options)}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns),pps_Syn_Patterns :: !(PP_Docs)}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns ),pps_Syn_Patterns :: !(PP_Docs)} wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns @@ -1658,7 +1658,7 @@ newtype T_Program = T_Program (Options -> (Map BlockInfo PP_Doc) -> ( PP_Docs))-data Inh_Program = Inh_Program {options_Inh_Program :: !(Options),textBlockMap_Inh_Program :: !(Map BlockInfo PP_Doc)}+data Inh_Program = Inh_Program {options_Inh_Program :: !(Options),textBlockMap_Inh_Program :: !((Map BlockInfo PP_Doc))} data Syn_Program = Syn_Program {output_Syn_Program :: !(PP_Docs)} wrap_Program :: T_Program -> Inh_Program ->
src-derived/PrintVisitCode.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (PrintVisitCode.ag)+-- UUAGC 0.9.24 (PrintVisitCode.ag) module PrintVisitCode where {-# LINE 10 "PrintVisitCode.ag" #-} @@ -579,9 +579,9 @@ sem_Pattern (Underscore _pos ) = (sem_Pattern_Underscore _pos ) -- semantic domain-newtype T_Pattern = T_Pattern (( Pattern))+newtype T_Pattern = T_Pattern (( Pattern )) data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern)}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: !(Pattern )} wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern @@ -685,9 +685,9 @@ sem_Patterns list = (Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list) ) -- semantic domain-newtype T_Patterns = T_Patterns (( Patterns))+newtype T_Patterns = T_Patterns (( Patterns )) data Inh_Patterns = Inh_Patterns {}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns)}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: !(Patterns )} wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns
src-derived/SemHsTokens.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (SemHsTokens.ag)+-- UUAGC 0.9.24 (SemHsTokens.ag) module SemHsTokens where {-# LINE 4 "SemHsTokens.ag" #-} @@ -93,8 +93,8 @@ ([Identifier]) -> Identifier -> ( (Seq Error),((Pos,String)),([(Identifier,Identifier)]),(Seq Identifier),([Identifier])))-data Inh_HsToken = Inh_HsToken {allfields_Inh_HsToken :: [(Identifier,Type,Maybe (Maybe Type))],allnts_Inh_HsToken :: [Identifier],attrs_Inh_HsToken :: [(Identifier,Identifier)],con_Inh_HsToken :: Identifier,fieldnames_Inh_HsToken :: [Identifier],nt_Inh_HsToken :: Identifier}-data Syn_HsToken = Syn_HsToken {errors_Syn_HsToken :: Seq Error,tok_Syn_HsToken :: (Pos,String),usedAttrs_Syn_HsToken :: [(Identifier,Identifier)],usedFields_Syn_HsToken :: Seq Identifier,usedLocals_Syn_HsToken :: [Identifier]}+data Inh_HsToken = Inh_HsToken {allfields_Inh_HsToken :: ([(Identifier,Type,Maybe (Maybe Type))]),allnts_Inh_HsToken :: ([Identifier]),attrs_Inh_HsToken :: ([(Identifier,Identifier)]),con_Inh_HsToken :: Identifier,fieldnames_Inh_HsToken :: ([Identifier]),nt_Inh_HsToken :: Identifier}+data Syn_HsToken = Syn_HsToken {errors_Syn_HsToken :: (Seq Error),tok_Syn_HsToken :: ((Pos,String)),usedAttrs_Syn_HsToken :: ([(Identifier,Identifier)]),usedFields_Syn_HsToken :: (Seq Identifier),usedLocals_Syn_HsToken :: ([Identifier])} wrap_HsToken :: T_HsToken -> Inh_HsToken -> Syn_HsToken @@ -429,8 +429,8 @@ ([Identifier]) -> Identifier -> ( (Seq Error),([(Pos,String)]),([(Identifier,Identifier)]),(Seq Identifier),([Identifier])))-data Inh_HsTokens = Inh_HsTokens {allfields_Inh_HsTokens :: [(Identifier,Type,Maybe (Maybe Type))],allnts_Inh_HsTokens :: [Identifier],attrs_Inh_HsTokens :: [(Identifier,Identifier)],con_Inh_HsTokens :: Identifier,fieldnames_Inh_HsTokens :: [Identifier],nt_Inh_HsTokens :: Identifier}-data Syn_HsTokens = Syn_HsTokens {errors_Syn_HsTokens :: Seq Error,tks_Syn_HsTokens :: [(Pos,String)],usedAttrs_Syn_HsTokens :: [(Identifier,Identifier)],usedFields_Syn_HsTokens :: Seq Identifier,usedLocals_Syn_HsTokens :: [Identifier]}+data Inh_HsTokens = Inh_HsTokens {allfields_Inh_HsTokens :: ([(Identifier,Type,Maybe (Maybe Type))]),allnts_Inh_HsTokens :: ([Identifier]),attrs_Inh_HsTokens :: ([(Identifier,Identifier)]),con_Inh_HsTokens :: Identifier,fieldnames_Inh_HsTokens :: ([Identifier]),nt_Inh_HsTokens :: Identifier}+data Syn_HsTokens = Syn_HsTokens {errors_Syn_HsTokens :: (Seq Error),tks_Syn_HsTokens :: ([(Pos,String)]),usedAttrs_Syn_HsTokens :: ([(Identifier,Identifier)]),usedFields_Syn_HsTokens :: (Seq Identifier),usedLocals_Syn_HsTokens :: ([Identifier])} wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> Syn_HsTokens @@ -635,8 +635,8 @@ Identifier -> Identifier -> ( (Seq Error),([String]),([(Identifier,Identifier)]),([Identifier]),([Identifier])))-data Inh_HsTokensRoot = Inh_HsTokensRoot {allfields_Inh_HsTokensRoot :: [(Identifier,Type,Maybe (Maybe Type))],allnts_Inh_HsTokensRoot :: [Identifier],attrs_Inh_HsTokensRoot :: [(Identifier,Identifier)],con_Inh_HsTokensRoot :: Identifier,nt_Inh_HsTokensRoot :: Identifier}-data Syn_HsTokensRoot = Syn_HsTokensRoot {errors_Syn_HsTokensRoot :: Seq Error,textLines_Syn_HsTokensRoot :: [String],usedAttrs_Syn_HsTokensRoot :: [(Identifier,Identifier)],usedFields_Syn_HsTokensRoot :: [Identifier],usedLocals_Syn_HsTokensRoot :: [Identifier]}+data Inh_HsTokensRoot = Inh_HsTokensRoot {allfields_Inh_HsTokensRoot :: ([(Identifier,Type,Maybe (Maybe Type))]),allnts_Inh_HsTokensRoot :: ([Identifier]),attrs_Inh_HsTokensRoot :: ([(Identifier,Identifier)]),con_Inh_HsTokensRoot :: Identifier,nt_Inh_HsTokensRoot :: Identifier}+data Syn_HsTokensRoot = Syn_HsTokensRoot {errors_Syn_HsTokensRoot :: (Seq Error),textLines_Syn_HsTokensRoot :: ([String]),usedAttrs_Syn_HsTokensRoot :: ([(Identifier,Identifier)]),usedFields_Syn_HsTokensRoot :: ([Identifier]),usedLocals_Syn_HsTokensRoot :: ([Identifier])} wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> Syn_HsTokensRoot
src-derived/TfmToVisage.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (TfmToVisage.ag)+-- UUAGC 0.9.24 (TfmToVisage.ag) module TfmToVisage where {-# LINE 8 "TfmToVisage.ag" #-} @@ -156,7 +156,7 @@ newtype T_Children = T_Children (VisageRuleMap -> ( ([VisageChild]))) data Inh_Children = Inh_Children {rulemap_Inh_Children :: VisageRuleMap}-data Syn_Children = Syn_Children {vchildren_Syn_Children :: [VisageChild]}+data Syn_Children = Syn_Children {vchildren_Syn_Children :: ([VisageChild])} wrap_Children :: T_Children -> Inh_Children -> Syn_Children @@ -222,9 +222,9 @@ sem_Expression (Expression _pos _tks ) = (sem_Expression_Expression _pos _tks ) -- semantic domain-newtype T_Expression = T_Expression (( Expression))+newtype T_Expression = T_Expression (( Expression )) data Inh_Expression = Inh_Expression {}-data Syn_Expression = Syn_Expression {self_Syn_Expression :: Expression}+data Syn_Expression = Syn_Expression {self_Syn_Expression :: Expression } wrap_Expression :: T_Expression -> Inh_Expression -> Syn_Expression @@ -236,7 +236,7 @@ ([HsToken]) -> T_Expression sem_Expression_Expression pos_ tks_ =- (T_Expression (let _lhsOself :: Expression+ (T_Expression (let _lhsOself :: Expression -- self rule _self = ({-# LINE 71 "TfmToVisage.ag" #-}@@ -373,7 +373,7 @@ -- semantic domain newtype T_Nonterminals = T_Nonterminals (( ([VisageNonterminal]))) data Inh_Nonterminals = Inh_Nonterminals {}-data Syn_Nonterminals = Syn_Nonterminals {vnonts_Syn_Nonterminals :: [VisageNonterminal]}+data Syn_Nonterminals = Syn_Nonterminals {vnonts_Syn_Nonterminals :: ([VisageNonterminal])} wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> Syn_Nonterminals @@ -461,9 +461,9 @@ sem_Pattern (Underscore _pos ) = (sem_Pattern_Underscore _pos ) -- semantic domain-newtype T_Pattern = T_Pattern (( Pattern,( [(Identifier,Identifier)] ),Pattern,VisagePattern))+newtype T_Pattern = T_Pattern (( Pattern ,( [(Identifier,Identifier)] ),Pattern ,VisagePattern)) data Inh_Pattern = Inh_Pattern {}-data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern,fieldattrs_Syn_Pattern :: [(Identifier,Identifier)] ,self_Syn_Pattern :: Pattern,vpat_Syn_Pattern :: VisagePattern}+data Syn_Pattern = Syn_Pattern {copy_Syn_Pattern :: Pattern ,fieldattrs_Syn_Pattern :: ( [(Identifier,Identifier)] ),self_Syn_Pattern :: Pattern ,vpat_Syn_Pattern :: VisagePattern} wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern @@ -479,15 +479,15 @@ sem_Pattern_Alias field_ attr_ (T_Pattern pat_ ) (T_Patterns parts_ ) = (T_Pattern (let _lhsOvpat :: VisagePattern _lhsOfieldattrs :: ( [(Identifier,Identifier)] )- _lhsOcopy :: Pattern- _lhsOself :: Pattern- _patIcopy :: Pattern+ _lhsOcopy :: Pattern + _lhsOself :: Pattern + _patIcopy :: Pattern _patIfieldattrs :: ( [(Identifier,Identifier)] )- _patIself :: Pattern+ _patIself :: Pattern _patIvpat :: VisagePattern- _partsIcopy :: Patterns+ _partsIcopy :: Patterns _partsIfieldattrs :: ( [(Identifier,Identifier)] )- _partsIself :: Patterns+ _partsIself :: Patterns _partsIvpats :: ([VisagePattern]) -- "TfmToVisage.ag"(line 135, column 17) _lhsOvpat =@@ -532,11 +532,11 @@ sem_Pattern_Constr name_ (T_Patterns pats_ ) = (T_Pattern (let _lhsOvpat :: VisagePattern _lhsOfieldattrs :: ( [(Identifier,Identifier)] )- _lhsOcopy :: Pattern- _lhsOself :: Pattern- _patsIcopy :: Patterns+ _lhsOcopy :: Pattern + _lhsOself :: Pattern + _patsIcopy :: Patterns _patsIfieldattrs :: ( [(Identifier,Identifier)] )- _patsIself :: Patterns+ _patsIself :: Patterns _patsIvpats :: ([VisagePattern]) -- "TfmToVisage.ag"(line 133, column 17) _lhsOvpat =@@ -575,12 +575,12 @@ T_Pattern sem_Pattern_Irrefutable (T_Pattern pat_ ) = (T_Pattern (let _lhsOfieldattrs :: ( [(Identifier,Identifier)] )- _lhsOcopy :: Pattern- _lhsOself :: Pattern+ _lhsOcopy :: Pattern + _lhsOself :: Pattern _lhsOvpat :: VisagePattern- _patIcopy :: Pattern+ _patIcopy :: Pattern _patIfieldattrs :: ( [(Identifier,Identifier)] )- _patIself :: Pattern+ _patIself :: Pattern _patIvpat :: VisagePattern -- use rule "TfmToVisage.ag"(line 141, column 43) _lhsOfieldattrs =@@ -621,11 +621,11 @@ sem_Pattern_Product pos_ (T_Patterns pats_ ) = (T_Pattern (let _lhsOvpat :: VisagePattern _lhsOfieldattrs :: ( [(Identifier,Identifier)] )- _lhsOcopy :: Pattern- _lhsOself :: Pattern- _patsIcopy :: Patterns+ _lhsOcopy :: Pattern + _lhsOself :: Pattern + _patsIcopy :: Patterns _patsIfieldattrs :: ( [(Identifier,Identifier)] )- _patsIself :: Patterns+ _patsIself :: Patterns _patsIvpats :: ([VisagePattern]) -- "TfmToVisage.ag"(line 134, column 17) _lhsOvpat =@@ -665,8 +665,8 @@ sem_Pattern_Underscore pos_ = (T_Pattern (let _lhsOvpat :: VisagePattern _lhsOfieldattrs :: ( [(Identifier,Identifier)] )- _lhsOcopy :: Pattern- _lhsOself :: Pattern+ _lhsOcopy :: Pattern + _lhsOself :: Pattern -- "TfmToVisage.ag"(line 138, column 17) _lhsOvpat = ({-# LINE 138 "TfmToVisage.ag" #-}@@ -724,9 +724,9 @@ 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)] ),Patterns,([VisagePattern])))+newtype T_Patterns = T_Patterns (( Patterns ,( [(Identifier,Identifier)] ),Patterns ,([VisagePattern]))) data Inh_Patterns = Inh_Patterns {}-data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns,fieldattrs_Syn_Patterns :: [(Identifier,Identifier)] ,self_Syn_Patterns :: Patterns,vpats_Syn_Patterns :: [VisagePattern]}+data Syn_Patterns = Syn_Patterns {copy_Syn_Patterns :: Patterns ,fieldattrs_Syn_Patterns :: ( [(Identifier,Identifier)] ),self_Syn_Patterns :: Patterns ,vpats_Syn_Patterns :: ([VisagePattern])} wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns @@ -740,15 +740,15 @@ sem_Patterns_Cons (T_Pattern hd_ ) (T_Patterns tl_ ) = (T_Patterns (let _lhsOvpats :: ([VisagePattern]) _lhsOfieldattrs :: ( [(Identifier,Identifier)] )- _lhsOcopy :: Patterns- _lhsOself :: Patterns- _hdIcopy :: Pattern+ _lhsOcopy :: Patterns + _lhsOself :: Patterns + _hdIcopy :: Pattern _hdIfieldattrs :: ( [(Identifier,Identifier)] )- _hdIself :: Pattern+ _hdIself :: Pattern _hdIvpat :: VisagePattern- _tlIcopy :: Patterns+ _tlIcopy :: Patterns _tlIfieldattrs :: ( [(Identifier,Identifier)] )- _tlIself :: Patterns+ _tlIself :: Patterns _tlIvpats :: ([VisagePattern]) -- "TfmToVisage.ag"(line 129, column 17) _lhsOvpats =@@ -789,8 +789,8 @@ sem_Patterns_Nil = (T_Patterns (let _lhsOvpats :: ([VisagePattern]) _lhsOfieldattrs :: ( [(Identifier,Identifier)] )- _lhsOcopy :: Patterns- _lhsOself :: Patterns+ _lhsOcopy :: Patterns + _lhsOself :: Patterns -- "TfmToVisage.ag"(line 130, column 17) _lhsOvpats = ({-# LINE 130 "TfmToVisage.ag" #-}@@ -913,7 +913,7 @@ -- semantic domain newtype T_Productions = T_Productions (( ([VisageProduction]))) data Inh_Productions = Inh_Productions {}-data Syn_Productions = Syn_Productions {vprods_Syn_Productions :: [VisageProduction]}+data Syn_Productions = Syn_Productions {vprods_Syn_Productions :: ([VisageProduction])} wrap_Productions :: T_Productions -> Inh_Productions -> Syn_Productions @@ -986,11 +986,11 @@ T_Rule sem_Rule_Rule mbName_ (T_Pattern pattern_ ) (T_Expression rhs_ ) owrt_ origin_ explicit_ = (T_Rule (let _lhsOvrule :: VisageRule- _patternIcopy :: Pattern+ _patternIcopy :: Pattern _patternIfieldattrs :: ( [(Identifier,Identifier)] )- _patternIself :: Pattern+ _patternIself :: Pattern _patternIvpat :: VisagePattern- _rhsIself :: Expression+ _rhsIself :: Expression -- "TfmToVisage.ag"(line 126, column 11) _lhsOvrule = ({-# LINE 126 "TfmToVisage.ag" #-}@@ -1020,7 +1020,7 @@ -- semantic domain newtype T_Rules = T_Rules (( ([VisageRule]))) data Inh_Rules = Inh_Rules {}-data Syn_Rules = Syn_Rules {vrules_Syn_Rules :: [VisageRule]}+data Syn_Rules = Syn_Rules {vrules_Syn_Rules :: ([VisageRule])} wrap_Rules :: T_Rules -> Inh_Rules -> Syn_Rules
src-derived/Transform.hs view
@@ -1,5683 +1,5689 @@ --- UUAGC 0.9.21 (Transform.ag)-module Transform where-{-# LINE 8 "Transform.ag" #-}--import Control.Monad(mplus,mzero)-import List (partition, elem, nub,intersperse)-import Data.Maybe-import qualified Data.Map as Map-import Data.Map (Map)-import Data.Set as Set (Set, member, union, toList, fromList, empty, singleton, member, unions, size, fold, intersection, difference, insert)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq, empty, (><),fromList)-import Data.Foldable(toList)-import UU.Scanner.Position(noPos)--import ConcreteSyntax-import AbstractSyntax-import ErrorMessages-import Patterns (Patterns(..),Pattern(..))-import Expression (Expression(..))-import HsToken--import Options-import CommonTypes-{-# LINE 28 "../src-derived/Transform.hs" #-}--{-# LINE 2 "./ConcreteSyntax.ag" #-}--import UU.Scanner.Position (Pos)-import Patterns (Pattern)-import Expression (Expression)-import CommonTypes-{-# LINE 36 "../src-derived/Transform.hs" #-}--{-# LINE 2 "./Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 43 "../src-derived/Transform.hs" #-}-{-# LINE 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 = (Maybe Identifier, [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 321 "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 (mbNm, pat,exp,as,owrt,str) ((r1,e1),m1) - = let (e2,m2,u2,b2) = foldr (checkDefi owrt) (e1,m1,[],[]) as- in ( (Rule mbNm (pat u2) exp owrt str True : r1, e2), m2)-- checkDefi :: Bool -> AttrName -> AccumDefiCheck -> AccumDefiCheck- checkDefi owrt fa@(field,attr) (e,m,u,bs)- = case lookup field fieldmap- of Just (NT tp _) -> - let tp' = maybe tp id (deforestedNt tp)- in if field == _LOC || field == _INST || field == _FIRST || field == _LAST- || hasAttrib (if getName field==getName _LHS then snd else fst) tp' attr- then case Map.lookupIndex fa m of- Just ix -> let ((_,attr2),b) = Map.elemAt ix m- in if b && not (fa `elem` bs)- then ( e, Map.insert fa owrt m, fa:u, fa:bs)- else (((Seq.<|)) (DupRule nt con field attr2 attr) e, m, fa:u, bs)- Nothing -> ( e, Map.insert fa owrt m, u, fa:bs)- else (((Seq.<|)) (SuperfluousRule nt con field attr) e, m, fa:u, bs)- _ -> (((Seq.<|)) (UndefChild nt con field) e, m, fa:u, bs )-- in fst (foldr checkRule (([],Seq.empty),Map.empty) rs)--checkRuleNames :: NontermIdent -> ConstructorIdent -> [RuleInfo] -> Seq Error-checkRuleNames nt con- = fst . foldr checkRule (Seq.empty, Set.empty)- where- checkRule (Just nm,_,_,_,_,_) (errs, nms)- | nm `Set.member` nms = (DupRuleName nt con nm Seq.<| errs, nms)- | otherwise = (errs, Set.insert nm nms)- checkRule (Nothing,_,_,_,_,_) inp = inp--checkSigs :: NontermIdent -> ConstructorIdent -> [SigInfo] -> SigsAndErrors-checkSigs nt con sis - = let checkSig (ide,typ) (sigs,errs)- = if ide `elem` map (\(TypeSig n t)-> n) sigs- then (sigs, ((Seq.<|)) (DupSig nt con ide) errs)- -- else if not (ide `elem` locattrdefs)- -- then (sigs, ((Seq.<|)) (SupSig nt con ide) errs)- else (TypeSig ide typ:sigs, errs)- in foldr checkSig ([],Seq.empty) sis--checkInsts :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [SigInfo]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [Identifier] -> InstsAndErrors-checkInsts allNts sigMap fieldMap nt con- = foldr (\inst (insts, errs) ->- maybe (insts, Seq.singleton (MissingInstSig nt con inst) >< errs)- (\info@(k, NT nm _) ->- case findInst k insts of- Just k' -> (insts, Seq.singleton (DupChild nt con k k') >< errs)- Nothing -> case nm `Set.member` allNts of- True -> (info : insts, errs)- False | take 2 (getName nm) == "T_" -> let nm' = Ident (drop 2 (getName nm)) (getPos nm)- in case nm' `Set.member` allNts of- True -> (info : insts, errs)- False -> (insts, Seq.singleton (UndefNont nm') >< errs)- | otherwise -> (insts, Seq.singleton (UndefNont nm) >< errs)- ) - $ findSig inst- ) ([], Seq.empty)- where- sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt sigMap)- - findSig name- = do tp@(NT _ _) <- lookup name sigs- return (name, tp)- - findInst _ [] = Nothing- findInst k ((k', _): r)- | k == k' = Just k'- | otherwise = findInst k r--checkUniques :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [UniqueInfo] -> UniquesAndErrors-checkUniques allAttrs nt con uniques- = let checkUnique (ident,ref) (us,errs)- = if ident `Map.member` us- then (us, ((Seq.<|)) (DupUnique nt con ident) errs)- else if Map.member ref inhs && Map.member ref syns- then (Map.insert ident ref us, errs)- else (us, ((Seq.<|)) (MissingUnique nt ref) errs)-- (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs- in foldr checkUnique (Map.empty, Seq.empty) uniques--checkAugments :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [AugmentInfo] -> AugmentsAndErrors-checkAugments allAttrs nt con augments- = let checkAugment (ident,expr) (as,errs)- = if ident `Map.member` as- then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)- else if Map.member ident syns- then (Map.insert ident [expr] as, errs)- else (as, ((Seq.<|)) (MissingSyn nt ident) errs)-- (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs- in foldr checkAugment (Map.empty, Seq.empty) augments--checkArounds :: Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [AroundInfo] -> AroundsAndErrors-checkArounds fieldMap nt con arounds- = let checkAround (ident,expr) (as,errs)- = if ident `Map.member` as- then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)- else case lookup ident fields of- Just (NT _ _) -> (Map.insert ident [expr] as, errs)- _ -> (as, ((Seq.<|)) (UndefChild nt con ident) errs)- fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)- in foldr checkAround (Map.empty, Seq.empty) arounds--unionunionplusplus = Map.unionWith (Map.unionWith (++))-{-# LINE 243 "../src-derived/Transform.hs" #-}--{-# LINE 455 "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 Nothing pat rhs False "-- generated by the unique rule mechanism." False- attr fld a = Alias fld a (Underscore noPos) []- gencase nm outp- = h ("case " ++ uniqueDispenser opts ++ " __cont of { (__cont, " ++ getName nm ++ ") -> ") ++ outp ++ h "}"- h s = [HsToken s noPos]- finalout us = h ("(__cont, " ++ concat (intersperse "," (map getName us)) ++ ")")- wrap ref inp = h "case " ++ [AGField _LHS ref noPos Nothing] ++ h " of { __cont | __cont `seq` True -> " ++ inp ++ h "}"-{-# LINE 270 "../src-derived/Transform.hs" #-}--{-# LINE 625 "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 295 "../src-derived/Transform.hs" #-}--{-# LINE 733 "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 304 "../src-derived/Transform.hs" #-}--{-# LINE 765 "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 313 "../src-derived/Transform.hs" #-}--{-# LINE 791 "Transform.ag" #-}--mergeParams :: ParamMap -> ParamMap -> ParamMap-mergeParams = Map.unionWith (++)-{-# LINE 319 "../src-derived/Transform.hs" #-}--{-# LINE 814 "Transform.ag" #-}--mergeCtx :: ContextMap -> ContextMap -> ContextMap-mergeCtx- = Map.unionWith nubconcat- where nubconcat a b = nub (a ++ b)-{-# LINE 327 "../src-derived/Transform.hs" #-}--{-# LINE 827 "Transform.ag" #-}--mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)-{-# LINE 332 "../src-derived/Transform.hs" #-}--{-# LINE 838 "Transform.ag" #-}--merge x y = foldr f y (Map.toList x)- where f ~(k,v) m = Map.insertWith (Map.union) k v m-{-# LINE 338 "../src-derived/Transform.hs" #-}--{-# LINE 865 "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 348 "../src-derived/Transform.hs" #-}--{-# LINE 876 "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 354 "../src-derived/Transform.hs" #-}--{-# LINE 1006 "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 363 "../src-derived/Transform.hs" #-}--{-# LINE 1013 "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) (filter (not . existsAsInst) 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)- virt = if isVirtual- then case lookup nm flds of- Just tp' -> Just (Just tp')- Nothing -> Just Nothing- else Nothing- in Child nm tp inh syn virt- existsAsInst (nm,_) = maybe False (const True) (lookup nm insts)- 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 414 "../src-derived/Transform.hs" #-}--{-# LINE 1063 "Transform.ag" #-}--mapUnionWithSetUnion = Map.unionWith Set.union-mapUnionWithPlusPlus = Map.unionWith (++)-{-# LINE 420 "../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 allNamesErrs : _- 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 errs10 : _- 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 549 "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 555 "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 561 "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 567 "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 576 "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 582 "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 588 "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 594 "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 600 "Transform.hs" #-})- -- "Transform.ag"(line 268, column 10)- _augmentSigs =- ({-# LINE 268 "Transform.ag" #-}- let gen mp = []- in Map.map (Map.map gen) _allAugments- {-# LINE 606 "Transform.hs" #-})- -- "Transform.ag"(line 271, column 10)- _allRulesErrs =- ({-# LINE 271 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs )) _allRules- {-# LINE 611 "Transform.hs" #-})- -- "Transform.ag"(line 272, column 10)- _allNamesErrs =- ({-# LINE 272 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . checkRuleNames) _allRules- {-# LINE 616 "Transform.hs" #-})- -- "Transform.ag"(line 273, column 10)- _allSigsErrs =- ({-# LINE 273 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkSigs )) _allSigs- {-# LINE 621 "Transform.hs" #-})- -- "Transform.ag"(line 274, column 10)- _allInstsErrs =- ({-# LINE 274 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals _allSigs _allFields )) _allInsts- {-# LINE 626 "Transform.hs" #-})- -- "Transform.ag"(line 275, column 10)- _allUniquesErrs =- ({-# LINE 275 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls )) _allUniques- {-# LINE 631 "Transform.hs" #-})- -- "Transform.ag"(line 276, column 10)- _allAugmentErrs =- ({-# LINE 276 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls )) _allAugments- {-# LINE 636 "Transform.hs" #-})- -- "Transform.ag"(line 277, column 10)- _allAroundsErrs =- ({-# LINE 277 "Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields )) _allArounds- {-# LINE 641 "Transform.hs" #-})- -- "Transform.ag"(line 279, column 10)- _checkedRulesPre =- ({-# LINE 279 "Transform.ag" #-}- Map.map (Map.map fst) _allRulesErrs- {-# LINE 646 "Transform.hs" #-})- -- "Transform.ag"(line 280, column 10)- _checkedSigs =- ({-# LINE 280 "Transform.ag" #-}- Map.map (Map.map fst) _allSigsErrs `unionunionplusplus` _augmentSigs- {-# LINE 651 "Transform.hs" #-})- -- "Transform.ag"(line 281, column 10)- _checkedInsts =- ({-# LINE 281 "Transform.ag" #-}- Map.map (Map.map fst) _allInstsErrs- {-# LINE 656 "Transform.hs" #-})- -- "Transform.ag"(line 282, column 10)- _checkedUniques =- ({-# LINE 282 "Transform.ag" #-}- Map.map (Map.map fst) _allUniquesErrs- {-# LINE 661 "Transform.hs" #-})- -- "Transform.ag"(line 283, column 10)- _checkedAugments =- ({-# LINE 283 "Transform.ag" #-}- Map.map (Map.map fst) _allAugmentErrs- {-# LINE 666 "Transform.hs" #-})- -- "Transform.ag"(line 284, column 10)- _checkedArounds =- ({-# LINE 284 "Transform.ag" #-}- Map.map (Map.map fst) _allAroundsErrs- {-# LINE 671 "Transform.hs" #-})- -- "Transform.ag"(line 285, column 10)- _checkedRules =- ({-# LINE 285 "Transform.ag" #-}- Map.unionWith (Map.unionWith (++)) _checkedRulesPre (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allFields _allAttrDecls )) _checkedUniques )- {-# LINE 676 "Transform.hs" #-})- -- "Transform.ag"(line 287, column 10)- _errs1 =- ({-# LINE 287 "Transform.ag" #-}- let f = checkForDuplicates (DupSynonym)- in Seq.fromList . f . map fst $ _elemsItypeSyns- {-# LINE 682 "Transform.hs" #-})- -- "Transform.ag"(line 290, column 10)- _errs2 =- ({-# LINE 290 "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 689 "Transform.hs" #-})- -- "Transform.ag"(line 294, column 10)- _errs3 =- ({-# LINE 294 "Transform.ag" #-}- let f (nt,cons) = checkForDuplicates (DupAlt nt) cons- in Seq.empty- {-# LINE 695 "Transform.hs" #-})- -- "Transform.ag"(line 298, column 10)- _errs4 =- ({-# LINE 298 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allRulesErrs- {-# LINE 701 "Transform.hs" #-})- -- "Transform.ag"(line 301, column 10)- _errs5 =- ({-# LINE 301 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allSigsErrs- {-# LINE 707 "Transform.hs" #-})- -- "Transform.ag"(line 304, column 10)- _errs6 =- ({-# LINE 304 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allInstsErrs- {-# LINE 713 "Transform.hs" #-})- -- "Transform.ag"(line 307, column 10)- _errs7 =- ({-# LINE 307 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allUniquesErrs- {-# LINE 719 "Transform.hs" #-})- -- "Transform.ag"(line 310, column 10)- _errs8 =- ({-# LINE 310 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allAugmentErrs- {-# LINE 725 "Transform.hs" #-})- -- "Transform.ag"(line 313, column 10)- _errs9 =- ({-# LINE 313 "Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allAroundsErrs- {-# LINE 731 "Transform.hs" #-})- -- "Transform.ag"(line 316, column 10)- _errs10 =- ({-# LINE 316 "Transform.ag" #-}- let f m s = Map.fold ((><)) s m- in Map.fold f Seq.empty _allNamesErrs- {-# LINE 737 "Transform.hs" #-})- -- "Transform.ag"(line 319, column 10)- _lhsOerrors =- ({-# LINE 319 "Transform.ag" #-}- _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9 >< _errs10- {-# LINE 742 "Transform.hs" #-})- -- "Transform.ag"(line 498, column 10)- _allNonterminals =- ({-# LINE 498 "Transform.ag" #-}- _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames- {-# LINE 747 "Transform.hs" #-})- -- "Transform.ag"(line 518, column 8)- _elemsOallConstructors =- ({-# LINE 518 "Transform.ag" #-}- _elemsIcollectedConstructorsMap- {-# LINE 752 "Transform.hs" #-})- -- "Transform.ag"(line 591, column 8)- _elemsOdefSets =- ({-# LINE 591 "Transform.ag" #-}- Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals ))- {-# LINE 757 "Transform.hs" #-})- -- "Transform.ag"(line 592, column 8)- _elemsOdefinedSets =- ({-# LINE 592 "Transform.ag" #-}- Map.map fst _elemsIdefSets- {-# LINE 762 "Transform.hs" #-})- -- "Transform.ag"(line 844, column 8)- _elemsOattrDecls =- ({-# LINE 844 "Transform.ag" #-}- Map.empty- {-# LINE 767 "Transform.hs" #-})- -- "Transform.ag"(line 883, column 9)- _allAttrDecls =- ({-# LINE 883 "Transform.ag" #-}- if withSelf _lhsIoptions- then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals )- else _elemsIattrDecls- {-# LINE 774 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- _elemsIblocks- {-# LINE 779 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- _elemsImoduleDecl- {-# LINE 784 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- _elemsIpragmas- {-# LINE 789 "Transform.hs" #-})- -- copy rule (from local)- _elemsOallAttrDecls =- ({-# LINE 746 "Transform.ag" #-}- _allAttrDecls- {-# LINE 794 "Transform.hs" #-})- -- copy rule (from local)- _elemsOallFields =- ({-# LINE 126 "Transform.ag" #-}- _allFields- {-# LINE 799 "Transform.hs" #-})- -- copy rule (from local)- _elemsOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _allNonterminals- {-# LINE 804 "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 867 "Transform.hs" #-})- -- use rule "Transform.ag"(line 91, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 91 "Transform.ag" #-}- _namesIcollectedConstructorNames- {-# LINE 872 "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 934 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- _hdIcollectedFields ++ _tlIcollectedFields- {-# LINE 939 "Transform.hs" #-})- -- copy rule (down)- _hdOallConstructors =- ({-# LINE 94 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 944 "Transform.hs" #-})- -- copy rule (down)- _hdOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 949 "Transform.hs" #-})- -- copy rule (down)- _hdOnts =- ({-# LINE 163 "Transform.ag" #-}- _lhsInts- {-# LINE 954 "Transform.hs" #-})- -- copy rule (down)- _tlOallConstructors =- ({-# LINE 94 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 959 "Transform.hs" #-})- -- copy rule (down)- _tlOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 964 "Transform.hs" #-})- -- copy rule (down)- _tlOnts =- ({-# LINE 163 "Transform.ag" #-}- _lhsInts- {-# LINE 969 "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 986 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 991 "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 852, column 15)- __tup1 =- ({-# LINE 852 "Transform.ag" #-}- checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls- {-# LINE 1057 "Transform.hs" #-})- -- "Transform.ag"(line 852, column 15)- (_attrDecls,_) =- ({-# LINE 852 "Transform.ag" #-}- __tup1- {-# LINE 1062 "Transform.hs" #-})- -- "Transform.ag"(line 852, column 15)- (_,_errors) =- ({-# LINE 852 "Transform.ag" #-}- __tup1- {-# LINE 1067 "Transform.hs" #-})- -- "Transform.ag"(line 854, column 15)- __tup2 =- ({-# LINE 854 "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 1079 "Transform.hs" #-})- -- "Transform.ag"(line 854, column 15)- (_inherited,_,_) =- ({-# LINE 854 "Transform.ag" #-}- __tup2- {-# LINE 1084 "Transform.hs" #-})- -- "Transform.ag"(line 854, column 15)- (_,_synthesized,_) =- ({-# LINE 854 "Transform.ag" #-}- __tup2- {-# LINE 1089 "Transform.hs" #-})- -- "Transform.ag"(line 854, column 15)- (_,_,_useMap) =- ({-# LINE 854 "Transform.ag" #-}- __tup2- {-# LINE 1094 "Transform.hs" #-})- -- "Transform.ag"(line 862, column 11)- _lhsOuseMap =- ({-# LINE 862 "Transform.ag" #-}- Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))- {-# LINE 1099 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _errors- {-# LINE 1104 "Transform.hs" #-})- -- copy rule (from local)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _attrDecls- {-# LINE 1109 "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 658, column 17)- _lhsOconstructors =- ({-# LINE 658 "Transform.ag" #-}- \ds -> ds- {-# LINE 1160 "Transform.hs" #-})- -- use rule "Transform.ag"(line 91, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 91 "Transform.ag" #-}- Set.empty- {-# LINE 1165 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 1170 "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 657, column 17)- _lhsOconstructors =- ({-# LINE 657 "Transform.ag" #-}- \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds- {-# LINE 1189 "Transform.hs" #-})- -- use rule "Transform.ag"(line 91, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 91 "Transform.ag" #-}- _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames- {-# LINE 1194 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 1199 "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 506, column 11)- _lhsOcollectedConstructorNames =- ({-# LINE 506 "Transform.ag" #-}- Set.singleton name_- {-# LINE 1215 "Transform.hs" #-})- -- "Transform.ag"(line 655, column 17)- _lhsOconstructors =- ({-# LINE 655 "Transform.ag" #-}- \ds -> Set.singleton name_- {-# LINE 1220 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 1225 "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 656, column 17)- _lhsOconstructors =- ({-# LINE 656 "Transform.ag" #-}- \ds -> _set1Iconstructors ds `Set.union` _set2Iconstructors ds- {-# LINE 1244 "Transform.hs" #-})- -- use rule "Transform.ag"(line 91, column 62)- _lhsOcollectedConstructorNames =- ({-# LINE 91 "Transform.ag" #-}- _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames- {-# LINE 1249 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 1254 "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 804, column 7)- _lhsOctxCollect =- ({-# LINE 804 "Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 1453 "Transform.hs" #-})- -- "Transform.ag"(line 848, column 10)- _attrsOnts =- ({-# LINE 848 "Transform.ag" #-}- _namesInontSet- {-# LINE 1458 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 1463 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 1468 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 1473 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 1478 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 1483 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 1488 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 1493 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _namesIcollectedNames- {-# LINE 1498 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 1503 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 1508 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 1513 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 1518 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 1523 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _namesIerrors Seq.>< _attrsIerrors- {-# LINE 1528 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 1533 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- Map.empty- {-# LINE 1538 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 1543 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 1548 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 1553 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- _attrsIuseMap- {-# LINE 1558 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 1563 "Transform.hs" #-})- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _attrsIattrDecls- {-# LINE 1568 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 1573 "Transform.hs" #-})- -- copy rule (down)- _namesOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 1578 "Transform.hs" #-})- -- copy rule (down)- _namesOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1583 "Transform.hs" #-})- -- copy rule (down)- _namesOdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 1588 "Transform.hs" #-})- -- copy rule (down)- _attrsOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 1593 "Transform.hs" #-})- -- copy rule (down)- _attrsOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1598 "Transform.hs" #-})- -- copy rule (down)- _attrsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 1603 "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 1671 "Transform.hs" #-})- -- "Transform.ag"(line 512, column 11)- _lhsOcollectedConstructorsMap =- ({-# LINE 512 "Transform.ag" #-}- Map.fromList- [ (n, _altsIcollectedConstructorNames)- | n <- Set.toList _namesInontSet- ]- {-# LINE 1679 "Transform.hs" #-})- -- "Transform.ag"(line 781, column 7)- _lhsOparamsCollect =- ({-# LINE 781 "Transform.ag" #-}- if null params_- then Map.empty- else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]- {-# LINE 1686 "Transform.hs" #-})- -- "Transform.ag"(line 804, column 7)- _lhsOctxCollect =- ({-# LINE 804 "Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 1693 "Transform.hs" #-})- -- "Transform.ag"(line 847, column 10)- _attrsOnts =- ({-# LINE 847 "Transform.ag" #-}- _namesInontSet- {-# LINE 1698 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 1703 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 1708 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 1713 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 1718 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- _altsIcollectedFields- {-# LINE 1723 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 1728 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _namesIcollectedNames- {-# LINE 1733 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 1738 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 1743 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 1748 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 1753 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 1758 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _namesIerrors Seq.>< _attrsIerrors- {-# LINE 1763 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 1768 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 1773 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 1778 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 1783 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- _attrsIuseMap- {-# LINE 1788 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 1793 "Transform.hs" #-})- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _attrsIattrDecls- {-# LINE 1798 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 1803 "Transform.hs" #-})- -- copy rule (down)- _namesOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 1808 "Transform.hs" #-})- -- copy rule (down)- _namesOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1813 "Transform.hs" #-})- -- copy rule (down)- _namesOdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 1818 "Transform.hs" #-})- -- copy rule (down)- _attrsOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 1823 "Transform.hs" #-})- -- copy rule (down)- _attrsOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1828 "Transform.hs" #-})- -- copy rule (down)- _attrsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 1833 "Transform.hs" #-})- -- copy rule (down)- _altsOallConstructors =- ({-# LINE 94 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 1838 "Transform.hs" #-})- -- copy rule (down)- _altsOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 1843 "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 832, column 14)- _lhsOderivings =- ({-# LINE 832 "Transform.ag" #-}- Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]- {-# LINE 1897 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 1902 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 1907 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 1912 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 1917 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 1922 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 1927 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 1932 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _setIcollectedNames- {-# LINE 1937 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 1942 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 1947 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 1952 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 1957 "Transform.hs" #-})- -- use rule "Transform.ag"(line 800, column 34)- _lhsOctxCollect =- ({-# LINE 800 "Transform.ag" #-}- Map.empty- {-# LINE 1962 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _setIerrors- {-# LINE 1967 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 1972 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- Map.empty- {-# LINE 1977 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 1982 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 1987 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 1992 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- Map.empty- {-# LINE 1997 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 2002 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2007 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 2012 "Transform.hs" #-})- -- copy rule (down)- _setOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2017 "Transform.hs" #-})- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2022 "Transform.hs" #-})- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 2027 "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 1000, column 7)- _lhsOmoduleDecl =- ({-# LINE 1000 "Transform.ag" #-}- Just (name_, exports_, imports_)- {-# LINE 2072 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 2077 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 2082 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 2087 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 2092 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 2097 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 2102 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 2107 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 2112 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 2117 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 2122 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 2127 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 2132 "Transform.hs" #-})- -- use rule "Transform.ag"(line 800, column 34)- _lhsOctxCollect =- ({-# LINE 800 "Transform.ag" #-}- Map.empty- {-# LINE 2137 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 2142 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 2147 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- Map.empty- {-# LINE 2152 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 2157 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 2162 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 2167 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- Map.empty- {-# LINE 2172 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 2177 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2182 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 2187 "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 676, column 13)- _lhsOpragmas =- ({-# LINE 676 "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 2267 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 2272 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 2277 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 2282 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 2287 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 2292 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 2297 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 2302 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 2307 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 2312 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 2317 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 2322 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 2327 "Transform.hs" #-})- -- use rule "Transform.ag"(line 800, column 34)- _lhsOctxCollect =- ({-# LINE 800 "Transform.ag" #-}- Map.empty- {-# LINE 2332 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 2337 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 2342 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 2347 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- Map.empty- {-# LINE 2352 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 2357 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 2362 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- Map.empty- {-# LINE 2367 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 2372 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2377 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 2382 "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 2451 "Transform.hs" #-})- -- "Transform.ag"(line 804, column 7)- _lhsOctxCollect =- ({-# LINE 804 "Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 2458 "Transform.hs" #-})- -- "Transform.ag"(line 849, column 10)- _attrsOnts =- ({-# LINE 849 "Transform.ag" #-}- _namesInontSet- {-# LINE 2463 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- _altsIattrOrderCollect- {-# LINE 2468 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 2473 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- _altsIcollectedArounds- {-# LINE 2478 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- _altsIcollectedAugments- {-# LINE 2483 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 2488 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 2493 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- _altsIcollectedInsts- {-# LINE 2498 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _namesIcollectedNames- {-# LINE 2503 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- _altsIcollectedRules- {-# LINE 2508 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 2513 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- _altsIcollectedSigs- {-# LINE 2518 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- _altsIcollectedUniques- {-# LINE 2523 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 2528 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors- {-# LINE 2533 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 2538 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- Map.empty- {-# LINE 2543 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 2548 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- _altsIsemPragmasCollect- {-# LINE 2553 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 2558 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- _attrsIuseMap- {-# LINE 2563 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 2568 "Transform.hs" #-})- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _attrsIattrDecls- {-# LINE 2573 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 2578 "Transform.hs" #-})- -- copy rule (down)- _namesOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2583 "Transform.hs" #-})- -- copy rule (down)- _namesOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2588 "Transform.hs" #-})- -- copy rule (down)- _namesOdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 2593 "Transform.hs" #-})- -- copy rule (down)- _attrsOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2598 "Transform.hs" #-})- -- copy rule (down)- _attrsOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2603 "Transform.hs" #-})- -- copy rule (down)- _attrsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2608 "Transform.hs" #-})- -- copy rule (down)- _altsOallAttrDecls =- ({-# LINE 746 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 2613 "Transform.hs" #-})- -- copy rule (down)- _altsOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2618 "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 489, column 10)- _lhsOcollectedSetNames =- ({-# LINE 489 "Transform.ag" #-}- Set.singleton name_- {-# LINE 2672 "Transform.hs" #-})- -- "Transform.ag"(line 596, column 13)- __tup3 =- ({-# LINE 596 "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 2686 "Transform.hs" #-})- -- "Transform.ag"(line 596, column 13)- (_defSets2,_) =- ({-# LINE 596 "Transform.ag" #-}- __tup3- {-# LINE 2691 "Transform.hs" #-})- -- "Transform.ag"(line 596, column 13)- (_,_errs) =- ({-# LINE 596 "Transform.ag" #-}- __tup3- {-# LINE 2696 "Transform.hs" #-})- -- "Transform.ag"(line 606, column 9)- _lhsOdefSets =- ({-# LINE 606 "Transform.ag" #-}- _defSets2- {-# LINE 2701 "Transform.hs" #-})- -- "Transform.ag"(line 606, column 9)- _lhsOerrors =- ({-# LINE 607 "Transform.ag" #-}- _errs >< _setIerrors- {-# LINE 2706 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 2711 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 2716 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 2721 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 2726 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 2731 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 2736 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 2741 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _setIcollectedNames- {-# LINE 2746 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 2751 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 2756 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 2761 "Transform.hs" #-})- -- use rule "Transform.ag"(line 800, column 34)- _lhsOctxCollect =- ({-# LINE 800 "Transform.ag" #-}- Map.empty- {-# LINE 2766 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 2771 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 2776 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- Map.empty- {-# LINE 2781 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 2786 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 2791 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 2796 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- Map.empty- {-# LINE 2801 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 2806 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2811 "Transform.hs" #-})- -- copy rule (down)- _setOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 2816 "Transform.hs" #-})- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 2821 "Transform.hs" #-})- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 2826 "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 2878 "Transform.hs" #-})- -- "Transform.ag"(line 184, column 10)- _blockValue =- ({-# LINE 184 "Transform.ag" #-}- [(lines_, pos_)]- {-# LINE 2883 "Transform.hs" #-})- -- "Transform.ag"(line 185, column 10)- _lhsOblocks =- ({-# LINE 185 "Transform.ag" #-}- Map.singleton _blockInfo _blockValue- {-# LINE 2888 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 2893 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 2898 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 2903 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 2908 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 2913 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 2918 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 2923 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 2928 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 2933 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 2938 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 2943 "Transform.hs" #-})- -- use rule "Transform.ag"(line 800, column 34)- _lhsOctxCollect =- ({-# LINE 800 "Transform.ag" #-}- Map.empty- {-# LINE 2948 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 2953 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 2958 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 2963 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- Map.empty- {-# LINE 2968 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 2973 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 2978 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 2983 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- Map.empty- {-# LINE 2988 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 2993 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 2998 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 3003 "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 3047 "Transform.hs" #-})- -- "Transform.ag"(line 492, column 11)- _lhsOcollectedNames =- ({-# LINE 492 "Transform.ag" #-}- Set.singleton name_- {-# LINE 3052 "Transform.hs" #-})- -- "Transform.ag"(line 546, column 11)- _expanded =- ({-# LINE 546 "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 3085 "Transform.hs" #-})- -- "Transform.ag"(line 575, column 11)- _argType =- ({-# LINE 575 "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 3096 "Transform.hs" #-})- -- "Transform.ag"(line 582, column 11)- _lhsOtypeSyns =- ({-# LINE 582 "Transform.ag" #-}- [(name_,_argType)]- {-# LINE 3101 "Transform.hs" #-})- -- "Transform.ag"(line 787, column 7)- _lhsOparamsCollect =- ({-# LINE 787 "Transform.ag" #-}- if null params_- then Map.empty- else Map.singleton name_ params_- {-# LINE 3108 "Transform.hs" #-})- -- "Transform.ag"(line 810, column 7)- _lhsOctxCollect =- ({-# LINE 810 "Transform.ag" #-}- if null ctx_- then Map.empty- else Map.singleton name_ ctx_- {-# LINE 3115 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 3120 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 3125 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 3130 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 3135 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 3140 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 3145 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 3150 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 3155 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 3160 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 3165 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 3170 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 3175 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 3180 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 3185 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 3190 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- Map.empty- {-# LINE 3195 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 3200 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3205 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 3210 "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 667, column 13)- _lhsOwrappers =- ({-# LINE 667 "Transform.ag" #-}- _setInontSet- {-# LINE 3257 "Transform.hs" #-})- -- use rule "Transform.ag"(line 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 3262 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 3267 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 3272 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 3277 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 3282 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 3287 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 3292 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _setIcollectedNames- {-# LINE 3297 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 3302 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 3307 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 3312 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 3317 "Transform.hs" #-})- -- use rule "Transform.ag"(line 800, column 34)- _lhsOctxCollect =- ({-# LINE 800 "Transform.ag" #-}- Map.empty- {-# LINE 3322 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 3327 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _setIerrors- {-# LINE 3332 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 3337 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- Map.empty- {-# LINE 3342 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 3347 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 3352 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 3357 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- Map.empty- {-# LINE 3362 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3367 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 3372 "Transform.hs" #-})- -- copy rule (down)- _setOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 3377 "Transform.hs" #-})- -- copy rule (down)- _setOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3382 "Transform.hs" #-})- -- copy rule (down)- _setOdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 3387 "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 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect- {-# LINE 3556 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- _hdIblocks `mapUnionWithPlusPlus` _tlIblocks- {-# LINE 3561 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- _hdIcollectedArounds ++ _tlIcollectedArounds- {-# LINE 3566 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- _hdIcollectedAugments ++ _tlIcollectedAugments- {-# LINE 3571 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap- {-# LINE 3576 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- _hdIcollectedFields ++ _tlIcollectedFields- {-# LINE 3581 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- _hdIcollectedInsts ++ _tlIcollectedInsts- {-# LINE 3586 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _hdIcollectedNames `Set.union` _tlIcollectedNames- {-# LINE 3591 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- _hdIcollectedRules ++ _tlIcollectedRules- {-# LINE 3596 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames- {-# LINE 3601 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- _hdIcollectedSigs ++ _tlIcollectedSigs- {-# LINE 3606 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- _hdIcollectedUniques ++ _tlIcollectedUniques- {-# LINE 3611 "Transform.hs" #-})- -- use rule "Transform.ag"(line 800, column 34)- _lhsOctxCollect =- ({-# LINE 800 "Transform.ag" #-}- _hdIctxCollect `mergeCtx` _tlIctxCollect- {-# LINE 3616 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- _hdIderivings `mergeDerivings` _tlIderivings- {-# LINE 3621 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 3626 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- _hdImoduleDecl `mplus` _tlImoduleDecl- {-# LINE 3631 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- _hdIparamsCollect `mergeParams` _tlIparamsCollect- {-# LINE 3636 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- _hdIpragmas . _tlIpragmas- {-# LINE 3641 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect- {-# LINE 3646 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- _hdItypeSyns ++ _tlItypeSyns- {-# LINE 3651 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- _hdIuseMap `merge` _tlIuseMap- {-# LINE 3656 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- _hdIwrappers `Set.union` _tlIwrappers- {-# LINE 3661 "Transform.hs" #-})- -- copy rule (up)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _tlIattrDecls- {-# LINE 3666 "Transform.hs" #-})- -- copy rule (up)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _tlIdefSets- {-# LINE 3671 "Transform.hs" #-})- -- copy rule (down)- _hdOallAttrDecls =- ({-# LINE 746 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 3676 "Transform.hs" #-})- -- copy rule (down)- _hdOallConstructors =- ({-# LINE 94 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 3681 "Transform.hs" #-})- -- copy rule (down)- _hdOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 3686 "Transform.hs" #-})- -- copy rule (down)- _hdOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3691 "Transform.hs" #-})- -- copy rule (down)- _hdOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3696 "Transform.hs" #-})- -- copy rule (down)- _hdOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 3701 "Transform.hs" #-})- -- copy rule (down)- _hdOdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 3706 "Transform.hs" #-})- -- copy rule (down)- _tlOallAttrDecls =- ({-# LINE 746 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 3711 "Transform.hs" #-})- -- copy rule (down)- _tlOallConstructors =- ({-# LINE 94 "Transform.ag" #-}- _lhsIallConstructors- {-# LINE 3716 "Transform.hs" #-})- -- copy rule (down)- _tlOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 3721 "Transform.hs" #-})- -- copy rule (down)- _tlOallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3726 "Transform.hs" #-})- -- copy rule (chain)- _tlOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _hdIattrDecls- {-# LINE 3731 "Transform.hs" #-})- -- copy rule (chain)- _tlOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _hdIdefSets- {-# LINE 3736 "Transform.hs" #-})- -- copy rule (down)- _tlOdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 3741 "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 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 3784 "Transform.hs" #-})- -- use rule "Transform.ag"(line 44, column 19)- _lhsOblocks =- ({-# LINE 44 "Transform.ag" #-}- Map.empty- {-# LINE 3789 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 3794 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 3799 "Transform.hs" #-})- -- use rule "Transform.ag"(line 92, column 48)- _lhsOcollectedConstructorsMap =- ({-# LINE 92 "Transform.ag" #-}- Map.empty- {-# LINE 3804 "Transform.hs" #-})- -- use rule "Transform.ag"(line 123, column 28)- _lhsOcollectedFields =- ({-# LINE 123 "Transform.ag" #-}- []- {-# LINE 3809 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 3814 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 3819 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 3824 "Transform.hs" #-})- -- use rule "Transform.ag"(line 83, column 50)- _lhsOcollectedSetNames =- ({-# LINE 83 "Transform.ag" #-}- Set.empty- {-# LINE 3829 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 3834 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 3839 "Transform.hs" #-})- -- use rule "Transform.ag"(line 800, column 34)- _lhsOctxCollect =- ({-# LINE 800 "Transform.ag" #-}- Map.empty- {-# LINE 3844 "Transform.hs" #-})- -- use rule "Transform.ag"(line 825, column 33)- _lhsOderivings =- ({-# LINE 825 "Transform.ag" #-}- Map.empty- {-# LINE 3849 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 3854 "Transform.hs" #-})- -- use rule "Transform.ag"(line 996, column 37)- _lhsOmoduleDecl =- ({-# LINE 996 "Transform.ag" #-}- mzero- {-# LINE 3859 "Transform.hs" #-})- -- use rule "Transform.ag"(line 777, column 37)- _lhsOparamsCollect =- ({-# LINE 777 "Transform.ag" #-}- Map.empty- {-# LINE 3864 "Transform.hs" #-})- -- use rule "Transform.ag"(line 673, column 34)- _lhsOpragmas =- ({-# LINE 673 "Transform.ag" #-}- id- {-# LINE 3869 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 3874 "Transform.hs" #-})- -- use rule "Transform.ag"(line 533, column 32)- _lhsOtypeSyns =- ({-# LINE 533 "Transform.ag" #-}- []- {-# LINE 3879 "Transform.hs" #-})- -- use rule "Transform.ag"(line 135, column 15)- _lhsOuseMap =- ({-# LINE 135 "Transform.ag" #-}- Map.empty- {-# LINE 3884 "Transform.hs" #-})- -- use rule "Transform.ag"(line 664, column 32)- _lhsOwrappers =- ({-# LINE 664 "Transform.ag" #-}- Set.empty- {-# LINE 3889 "Transform.hs" #-})- -- copy rule (chain)- _lhsOattrDecls =- ({-# LINE 134 "Transform.ag" #-}- _lhsIattrDecls- {-# LINE 3894 "Transform.hs" #-})- -- copy rule (chain)- _lhsOdefSets =- ({-# LINE 102 "Transform.ag" #-}- _lhsIdefSets- {-# LINE 3899 "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 610, column 16)- _lhsOnontSet =- ({-# LINE 610 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 3974 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 3979 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 3984 "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 616, column 16)- _lhsOnontSet =- ({-# LINE 616 "Transform.ag" #-}- Set.difference _set1InontSet _set2InontSet- {-# LINE 4012 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# LINE 4017 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 4022 "Transform.hs" #-})- -- copy rule (down)- _set1OallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4027 "Transform.hs" #-})- -- copy rule (down)- _set1OallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4032 "Transform.hs" #-})- -- copy rule (down)- _set1OdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4037 "Transform.hs" #-})- -- copy rule (down)- _set2OallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4042 "Transform.hs" #-})- -- copy rule (down)- _set2OallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4047 "Transform.hs" #-})- -- copy rule (down)- _set2OdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4052 "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 615, column 16)- _lhsOnontSet =- ({-# LINE 615 "Transform.ag" #-}- Set.intersection _set1InontSet _set2InontSet- {-# LINE 4084 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# LINE 4089 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 4094 "Transform.hs" #-})- -- copy rule (down)- _set1OallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4099 "Transform.hs" #-})- -- copy rule (down)- _set1OallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4104 "Transform.hs" #-})- -- copy rule (down)- _set1OdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4109 "Transform.hs" #-})- -- copy rule (down)- _set2OallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4114 "Transform.hs" #-})- -- copy rule (down)- _set2OallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4119 "Transform.hs" #-})- -- copy rule (down)- _set2OdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4124 "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 495, column 14)- _lhsOcollectedNames =- ({-# LINE 495 "Transform.ag" #-}- Set.singleton name_- {-# LINE 4143 "Transform.hs" #-})- -- "Transform.ag"(line 611, column 20)- __tup4 =- ({-# LINE 611 "Transform.ag" #-}- case Map.lookup name_ _lhsIdefinedSets of- Nothing -> (Set.empty, Seq.singleton (UndefNont name_))- Just set -> (set, Seq.empty)- {-# LINE 4150 "Transform.hs" #-})- -- "Transform.ag"(line 611, column 20)- (_nontSet,_) =- ({-# LINE 611 "Transform.ag" #-}- __tup4- {-# LINE 4155 "Transform.hs" #-})- -- "Transform.ag"(line 611, column 20)- (_,_errors) =- ({-# LINE 611 "Transform.ag" #-}- __tup4- {-# LINE 4160 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _errors- {-# LINE 4165 "Transform.hs" #-})- -- copy rule (from local)- _lhsOnontSet =- ({-# LINE 110 "Transform.ag" #-}- _nontSet- {-# LINE 4170 "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 617, column 16)- _lhsOnontSet =- ({-# LINE 617 "Transform.ag" #-}- let table = flattenDatas _lhsIallFields- in path table from_ to_- {-# LINE 4187 "Transform.hs" #-})- -- "Transform.ag"(line 619, column 16)- _lhsOerrors =- ({-# LINE 619 "Transform.ag" #-}- let check name | Set.member name _lhsIallNonterminals- = Seq.empty- | otherwise = Seq.singleton (UndefNont name)- in check from_ >< check to_- {-# LINE 4195 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- Set.empty- {-# LINE 4200 "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 614, column 16)- _lhsOnontSet =- ({-# LINE 614 "Transform.ag" #-}- Set.union _set1InontSet _set2InontSet- {-# LINE 4228 "Transform.hs" #-})- -- use rule "Transform.ag"(line 84, column 50)- _lhsOcollectedNames =- ({-# LINE 84 "Transform.ag" #-}- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# LINE 4233 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _set1Ierrors Seq.>< _set2Ierrors- {-# LINE 4238 "Transform.hs" #-})- -- copy rule (down)- _set1OallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4243 "Transform.hs" #-})- -- copy rule (down)- _set1OallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4248 "Transform.hs" #-})- -- copy rule (down)- _set1OdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4253 "Transform.hs" #-})- -- copy rule (down)- _set2OallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4258 "Transform.hs" #-})- -- copy rule (down)- _set2OallNonterminals =- ({-# LINE 86 "Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4263 "Transform.hs" #-})- -- copy rule (down)- _set2OdefinedSets =- ({-# LINE 105 "Transform.ag" #-}- _lhsIdefinedSets- {-# LINE 4268 "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 972, column 11)- _lhsOdefinedAttrs =- ({-# LINE 972 "Transform.ag" #-}- (field_, attr_) : _patIdefinedAttrs- {-# LINE 4358 "Transform.hs" #-})- -- "Transform.ag"(line 973, column 11)- _lhsOpatunder =- ({-# LINE 973 "Transform.ag" #-}- \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy- {-# LINE 4363 "Transform.hs" #-})- -- "Transform.ag"(line 974, column 11)- _lhsOdefinedInsts =- ({-# LINE 974 "Transform.ag" #-}- (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts- {-# LINE 4368 "Transform.hs" #-})- -- "Transform.ag"(line 989, column 16)- _lhsOstpos =- ({-# LINE 989 "Transform.ag" #-}- getPos field_- {-# LINE 4373 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Alias field_ attr_ _patIcopy _partsIcopy- {-# LINE 4378 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4383 "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 976, column 12)- _lhsOpatunder =- ({-# LINE 976 "Transform.ag" #-}- \us -> Constr name_ (_patsIpatunder us)- {-# LINE 4406 "Transform.hs" #-})- -- "Transform.ag"(line 987, column 16)- _lhsOstpos =- ({-# LINE 987 "Transform.ag" #-}- getPos name_- {-# LINE 4411 "Transform.hs" #-})- -- use rule "Transform.ag"(line 967, column 42)- _lhsOdefinedAttrs =- ({-# LINE 967 "Transform.ag" #-}- _patsIdefinedAttrs- {-# LINE 4416 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- _patsIdefinedInsts- {-# LINE 4421 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Constr name_ _patsIcopy- {-# LINE 4426 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4431 "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 978, column 17)- _lhsOpatunder =- ({-# LINE 978 "Transform.ag" #-}- \us -> Irrefutable (_patIpatunder us)- {-# LINE 4452 "Transform.hs" #-})- -- use rule "Transform.ag"(line 967, column 42)- _lhsOdefinedAttrs =- ({-# LINE 967 "Transform.ag" #-}- _patIdefinedAttrs- {-# LINE 4457 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- _patIdefinedInsts- {-# LINE 4462 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Irrefutable _patIcopy- {-# LINE 4467 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4472 "Transform.hs" #-})- -- copy rule (up)- _lhsOstpos =- ({-# LINE 984 "Transform.ag" #-}- _patIstpos- {-# LINE 4477 "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 977, column 13)- _lhsOpatunder =- ({-# LINE 977 "Transform.ag" #-}- \us -> Product pos_ (_patsIpatunder us)- {-# LINE 4498 "Transform.hs" #-})- -- "Transform.ag"(line 988, column 16)- _lhsOstpos =- ({-# LINE 988 "Transform.ag" #-}- pos_- {-# LINE 4503 "Transform.hs" #-})- -- use rule "Transform.ag"(line 967, column 42)- _lhsOdefinedAttrs =- ({-# LINE 967 "Transform.ag" #-}- _patsIdefinedAttrs- {-# LINE 4508 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- _patsIdefinedInsts- {-# LINE 4513 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Product pos_ _patsIcopy- {-# LINE 4518 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4523 "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 975, column 16)- _lhsOpatunder =- ({-# LINE 975 "Transform.ag" #-}- \us -> _copy- {-# LINE 4539 "Transform.hs" #-})- -- "Transform.ag"(line 990, column 16)- _lhsOstpos =- ({-# LINE 990 "Transform.ag" #-}- pos_- {-# LINE 4544 "Transform.hs" #-})- -- use rule "Transform.ag"(line 967, column 42)- _lhsOdefinedAttrs =- ({-# LINE 967 "Transform.ag" #-}- []- {-# LINE 4549 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- []- {-# LINE 4554 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- Underscore pos_- {-# LINE 4559 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4564 "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 982, column 10)- _lhsOpatunder =- ({-# LINE 982 "Transform.ag" #-}- \us -> (_hdIpatunder us) : (_tlIpatunder us)- {-# LINE 4621 "Transform.hs" #-})- -- use rule "Transform.ag"(line 967, column 42)- _lhsOdefinedAttrs =- ({-# LINE 967 "Transform.ag" #-}- _hdIdefinedAttrs ++ _tlIdefinedAttrs- {-# LINE 4626 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 4631 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- (:) _hdIcopy _tlIcopy- {-# LINE 4636 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4641 "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 981, column 9)- _lhsOpatunder =- ({-# LINE 981 "Transform.ag" #-}- \us -> []- {-# LINE 4657 "Transform.hs" #-})- -- use rule "Transform.ag"(line 967, column 42)- _lhsOdefinedAttrs =- ({-# LINE 967 "Transform.ag" #-}- []- {-# LINE 4662 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- []- {-# LINE 4667 "Transform.hs" #-})- -- self rule- _copy =- ({-# LINE 23 "./Patterns.ag" #-}- []- {-# LINE 4672 "Transform.hs" #-})- -- self rule- _lhsOcopy =- ({-# LINE 23 "./Patterns.ag" #-}- _copy- {-# LINE 4677 "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 721, column 7)- _pragmaNames =- ({-# LINE 721 "Transform.ag" #-}- Set.fromList _rulesIpragmaNamesCollect- {-# LINE 4757 "Transform.hs" #-})- -- "Transform.ag"(line 722, column 7)- _lhsOsemPragmasCollect =- ({-# LINE 722 "Transform.ag" #-}- foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4765 "Transform.hs" #-})- -- "Transform.ag"(line 750, column 7)- _attrOrders =- ({-# LINE 750 "Transform.ag" #-}- [ orderMapSingle nt con _rulesIorderDepsCollect- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4773 "Transform.hs" #-})- -- "Transform.ag"(line 756, column 7)- _lhsOattrOrderCollect =- ({-# LINE 756 "Transform.ag" #-}- foldr orderMapUnion Map.empty _attrOrders- {-# LINE 4778 "Transform.hs" #-})- -- "Transform.ag"(line 901, column 12)- _coninfo =- ({-# LINE 901 "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 4788 "Transform.hs" #-})- -- "Transform.ag"(line 908, column 12)- _lhsOerrors =- ({-# LINE 908 "Transform.ag" #-}- Seq.fromList- [ UndefAlt nt con- | (nt, conset, conkeys) <- _coninfo- , con <- Set.toList (Set.difference conset conkeys)- ]- {-# LINE 4797 "Transform.hs" #-})- -- "Transform.ag"(line 913, column 12)- _lhsOcollectedRules =- ({-# LINE 913 "Transform.ag" #-}- [ (nt,con,r)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- , r <- _rulesIruleInfos- ]- {-# LINE 4806 "Transform.hs" #-})- -- "Transform.ag"(line 919, column 12)- _lhsOcollectedSigs =- ({-# LINE 919 "Transform.ag" #-}- [ (nt,con,ts)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- , ts <- _rulesIsigInfos- ]- {-# LINE 4815 "Transform.hs" #-})- -- "Transform.ag"(line 926, column 12)- _lhsOcollectedInsts =- ({-# LINE 926 "Transform.ag" #-}- [ (nt,con,_rulesIdefinedInsts)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4823 "Transform.hs" #-})- -- "Transform.ag"(line 932, column 12)- _lhsOcollectedUniques =- ({-# LINE 932 "Transform.ag" #-}- [ (nt,con,_rulesIuniqueInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4831 "Transform.hs" #-})- -- "Transform.ag"(line 938, column 12)- _lhsOcollectedAugments =- ({-# LINE 938 "Transform.ag" #-}- [ (nt, con, _rulesIaugmentInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4839 "Transform.hs" #-})- -- "Transform.ag"(line 944, column 12)- _lhsOcollectedArounds =- ({-# LINE 944 "Transform.ag" #-}- [ (nt, con, _rulesIaroundInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 4847 "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 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect- {-# LINE 4939 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- _hdIcollectedArounds ++ _tlIcollectedArounds- {-# LINE 4944 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- _hdIcollectedAugments ++ _tlIcollectedAugments- {-# LINE 4949 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- _hdIcollectedInsts ++ _tlIcollectedInsts- {-# LINE 4954 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- _hdIcollectedRules ++ _tlIcollectedRules- {-# LINE 4959 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- _hdIcollectedSigs ++ _tlIcollectedSigs- {-# LINE 4964 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- _hdIcollectedUniques ++ _tlIcollectedUniques- {-# LINE 4969 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- _hdIerrors Seq.>< _tlIerrors- {-# LINE 4974 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect- {-# LINE 4979 "Transform.hs" #-})- -- copy rule (down)- _hdOallAttrDecls =- ({-# LINE 746 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 4984 "Transform.hs" #-})- -- copy rule (down)- _hdOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 4989 "Transform.hs" #-})- -- copy rule (down)- _hdOnts =- ({-# LINE 163 "Transform.ag" #-}- _lhsInts- {-# LINE 4994 "Transform.hs" #-})- -- copy rule (down)- _tlOallAttrDecls =- ({-# LINE 746 "Transform.ag" #-}- _lhsIallAttrDecls- {-# LINE 4999 "Transform.hs" #-})- -- copy rule (down)- _tlOallFields =- ({-# LINE 126 "Transform.ag" #-}- _lhsIallFields- {-# LINE 5004 "Transform.hs" #-})- -- copy rule (down)- _tlOnts =- ({-# LINE 163 "Transform.ag" #-}- _lhsInts- {-# LINE 5009 "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 745, column 55)- _lhsOattrOrderCollect =- ({-# LINE 745 "Transform.ag" #-}- Map.empty- {-# LINE 5033 "Transform.hs" #-})- -- use rule "Transform.ag"(line 153, column 32)- _lhsOcollectedArounds =- ({-# LINE 153 "Transform.ag" #-}- []- {-# LINE 5038 "Transform.hs" #-})- -- use rule "Transform.ag"(line 152, column 32)- _lhsOcollectedAugments =- ({-# LINE 152 "Transform.ag" #-}- []- {-# LINE 5043 "Transform.hs" #-})- -- use rule "Transform.ag"(line 150, column 32)- _lhsOcollectedInsts =- ({-# LINE 150 "Transform.ag" #-}- []- {-# LINE 5048 "Transform.hs" #-})- -- use rule "Transform.ag"(line 148, column 32)- _lhsOcollectedRules =- ({-# LINE 148 "Transform.ag" #-}- []- {-# LINE 5053 "Transform.hs" #-})- -- use rule "Transform.ag"(line 149, column 32)- _lhsOcollectedSigs =- ({-# LINE 149 "Transform.ag" #-}- []- {-# LINE 5058 "Transform.hs" #-})- -- use rule "Transform.ag"(line 151, column 32)- _lhsOcollectedUniques =- ({-# LINE 151 "Transform.ag" #-}- []- {-# LINE 5063 "Transform.hs" #-})- -- use rule "Transform.ag"(line 42, column 19)- _lhsOerrors =- ({-# LINE 42 "Transform.ag" #-}- Seq.empty- {-# LINE 5068 "Transform.hs" #-})- -- use rule "Transform.ag"(line 717, column 56)- _lhsOsemPragmasCollect =- ({-# LINE 717 "Transform.ag" #-}- Map.empty- {-# LINE 5073 "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 : {[Occurrence]}- child after : {[Occurrence]}- visit 0:- local dependency : _- alternative AugmentDef:- child ident : {Identifier}- child rhs : {Expression}- alternative Def:- child pos : {Pos}- child mbName : {Maybe Identifier}- child pattern : Pattern - child rhs : {Expression}- child owrt : {Bool}- alternative SemPragma:- child names : {[NontermIdent]}- alternative TypeDef:- child ident : {Identifier}- child tp : {Type}- alternative UniqueDef:- child ident : {Identifier}- child ref : {Identifier}--}--- cata-sem_SemDef :: SemDef ->- T_SemDef -sem_SemDef (AroundDef _ident _rhs ) =- (sem_SemDef_AroundDef _ident _rhs )-sem_SemDef (AttrOrderBefore _before _after ) =- (sem_SemDef_AttrOrderBefore _before _after )-sem_SemDef (AugmentDef _ident _rhs ) =- (sem_SemDef_AugmentDef _ident _rhs )-sem_SemDef (Def _pos _mbName _pattern _rhs _owrt ) =- (sem_SemDef_Def _pos _mbName (sem_Pattern _pattern ) _rhs _owrt )-sem_SemDef (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 963, column 17)- _lhsOaroundInfos =- ({-# LINE 963 "Transform.ag" #-}- [ (ident_, rhs_) ]- {-# LINE 5158 "Transform.hs" #-})- -- use rule "Transform.ag"(line 895, column 40)- _lhsOaugmentInfos =- ({-# LINE 895 "Transform.ag" #-}- []- {-# LINE 5163 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- []- {-# LINE 5168 "Transform.hs" #-})- -- use rule "Transform.ag"(line 758, column 44)- _lhsOorderDepsCollect =- ({-# LINE 758 "Transform.ag" #-}- Set.empty- {-# LINE 5173 "Transform.hs" #-})- -- use rule "Transform.ag"(line 727, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 727 "Transform.ag" #-}- []- {-# LINE 5178 "Transform.hs" #-})- -- use rule "Transform.ag"(line 892, column 40)- _lhsOruleInfos =- ({-# LINE 892 "Transform.ag" #-}- []- {-# LINE 5183 "Transform.hs" #-})- -- use rule "Transform.ag"(line 893, column 40)- _lhsOsigInfos =- ({-# LINE 893 "Transform.ag" #-}- []- {-# LINE 5188 "Transform.hs" #-})- -- use rule "Transform.ag"(line 894, column 40)- _lhsOuniqueInfos =- ({-# LINE 894 "Transform.ag" #-}- []- {-# LINE 5193 "Transform.hs" #-})- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_AttrOrderBefore :: ([Occurrence]) ->- ([Occurrence]) ->- T_SemDef -sem_SemDef_AttrOrderBefore before_ after_ =- (T_SemDef (let _lhsOorderDepsCollect :: (Set Dependency)- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOruleInfos :: ([RuleInfo])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- -- "Transform.ag"(line 762, column 7)- _dependency =- ({-# LINE 762 "Transform.ag" #-}- [ Dependency b a | b <- before_, a <- after_ ]- {-# LINE 5211 "Transform.hs" #-})- -- "Transform.ag"(line 763, column 7)- _lhsOorderDepsCollect =- ({-# LINE 763 "Transform.ag" #-}- Set.fromList _dependency- {-# LINE 5216 "Transform.hs" #-})- -- use rule "Transform.ag"(line 896, column 40)- _lhsOaroundInfos =- ({-# LINE 896 "Transform.ag" #-}- []- {-# LINE 5221 "Transform.hs" #-})- -- use rule "Transform.ag"(line 895, column 40)- _lhsOaugmentInfos =- ({-# LINE 895 "Transform.ag" #-}- []- {-# LINE 5226 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- []- {-# LINE 5231 "Transform.hs" #-})- -- use rule "Transform.ag"(line 727, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 727 "Transform.ag" #-}- []- {-# LINE 5236 "Transform.hs" #-})- -- use rule "Transform.ag"(line 892, column 40)- _lhsOruleInfos =- ({-# LINE 892 "Transform.ag" #-}- []- {-# LINE 5241 "Transform.hs" #-})- -- use rule "Transform.ag"(line 893, column 40)- _lhsOsigInfos =- ({-# LINE 893 "Transform.ag" #-}- []- {-# LINE 5246 "Transform.hs" #-})- -- use rule "Transform.ag"(line 894, column 40)- _lhsOuniqueInfos =- ({-# LINE 894 "Transform.ag" #-}- []- {-# LINE 5251 "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 960, column 17)- _lhsOaugmentInfos =- ({-# LINE 960 "Transform.ag" #-}- [ (ident_, rhs_) ]- {-# LINE 5269 "Transform.hs" #-})- -- use rule "Transform.ag"(line 896, column 40)- _lhsOaroundInfos =- ({-# LINE 896 "Transform.ag" #-}- []- {-# LINE 5274 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- []- {-# LINE 5279 "Transform.hs" #-})- -- use rule "Transform.ag"(line 758, column 44)- _lhsOorderDepsCollect =- ({-# LINE 758 "Transform.ag" #-}- Set.empty- {-# LINE 5284 "Transform.hs" #-})- -- use rule "Transform.ag"(line 727, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 727 "Transform.ag" #-}- []- {-# LINE 5289 "Transform.hs" #-})- -- use rule "Transform.ag"(line 892, column 40)- _lhsOruleInfos =- ({-# LINE 892 "Transform.ag" #-}- []- {-# LINE 5294 "Transform.hs" #-})- -- use rule "Transform.ag"(line 893, column 40)- _lhsOsigInfos =- ({-# LINE 893 "Transform.ag" #-}- []- {-# LINE 5299 "Transform.hs" #-})- -- use rule "Transform.ag"(line 894, column 40)- _lhsOuniqueInfos =- ({-# LINE 894 "Transform.ag" #-}- []- {-# LINE 5304 "Transform.hs" #-})- in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )-sem_SemDef_Def :: Pos ->- (Maybe Identifier) ->- T_Pattern ->- Expression ->- Bool ->- T_SemDef -sem_SemDef_Def pos_ mbName_ (T_Pattern pattern_ ) rhs_ owrt_ =- (T_SemDef (let _lhsOruleInfos :: ([RuleInfo])- _lhsOaroundInfos :: ([AroundInfo])- _lhsOaugmentInfos :: ([AugmentInfo])- _lhsOdefinedInsts :: ([Identifier])- _lhsOorderDepsCollect :: (Set Dependency)- _lhsOpragmaNamesCollect :: ([Identifier])- _lhsOsigInfos :: ([SigInfo])- _lhsOuniqueInfos :: ([UniqueInfo])- _patternIcopy :: Pattern- _patternIdefinedAttrs :: ([AttrName])- _patternIdefinedInsts :: ([Identifier])- _patternIpatunder :: ([AttrName]->Pattern)- _patternIstpos :: Pos- -- "Transform.ag"(line 951, column 10)- _lhsOruleInfos =- ({-# LINE 951 "Transform.ag" #-}- [ (mbName_, _patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos) ]- {-# LINE 5330 "Transform.hs" #-})- -- use rule "Transform.ag"(line 896, column 40)- _lhsOaroundInfos =- ({-# LINE 896 "Transform.ag" #-}- []- {-# LINE 5335 "Transform.hs" #-})- -- use rule "Transform.ag"(line 895, column 40)- _lhsOaugmentInfos =- ({-# LINE 895 "Transform.ag" #-}- []- {-# LINE 5340 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- _patternIdefinedInsts- {-# LINE 5345 "Transform.hs" #-})- -- use rule "Transform.ag"(line 758, column 44)- _lhsOorderDepsCollect =- ({-# LINE 758 "Transform.ag" #-}- Set.empty- {-# LINE 5350 "Transform.hs" #-})- -- use rule "Transform.ag"(line 727, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 727 "Transform.ag" #-}- []- {-# LINE 5355 "Transform.hs" #-})- -- use rule "Transform.ag"(line 893, column 40)- _lhsOsigInfos =- ({-# LINE 893 "Transform.ag" #-}- []- {-# LINE 5360 "Transform.hs" #-})- -- use rule "Transform.ag"(line 894, column 40)- _lhsOuniqueInfos =- ({-# LINE 894 "Transform.ag" #-}- []- {-# LINE 5365 "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 731, column 7)- _lhsOpragmaNamesCollect =- ({-# LINE 731 "Transform.ag" #-}- names_- {-# LINE 5384 "Transform.hs" #-})- -- use rule "Transform.ag"(line 896, column 40)- _lhsOaroundInfos =- ({-# LINE 896 "Transform.ag" #-}- []- {-# LINE 5389 "Transform.hs" #-})- -- use rule "Transform.ag"(line 895, column 40)- _lhsOaugmentInfos =- ({-# LINE 895 "Transform.ag" #-}- []- {-# LINE 5394 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- []- {-# LINE 5399 "Transform.hs" #-})- -- use rule "Transform.ag"(line 758, column 44)- _lhsOorderDepsCollect =- ({-# LINE 758 "Transform.ag" #-}- Set.empty- {-# LINE 5404 "Transform.hs" #-})- -- use rule "Transform.ag"(line 892, column 40)- _lhsOruleInfos =- ({-# LINE 892 "Transform.ag" #-}- []- {-# LINE 5409 "Transform.hs" #-})- -- use rule "Transform.ag"(line 893, column 40)- _lhsOsigInfos =- ({-# LINE 893 "Transform.ag" #-}- []- {-# LINE 5414 "Transform.hs" #-})- -- use rule "Transform.ag"(line 894, column 40)- _lhsOuniqueInfos =- ({-# LINE 894 "Transform.ag" #-}- []- {-# LINE 5419 "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 954, column 14)- _lhsOsigInfos =- ({-# LINE 954 "Transform.ag" #-}- [ (ident_, tp_) ]- {-# LINE 5437 "Transform.hs" #-})- -- use rule "Transform.ag"(line 896, column 40)- _lhsOaroundInfos =- ({-# LINE 896 "Transform.ag" #-}- []- {-# LINE 5442 "Transform.hs" #-})- -- use rule "Transform.ag"(line 895, column 40)- _lhsOaugmentInfos =- ({-# LINE 895 "Transform.ag" #-}- []- {-# LINE 5447 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- []- {-# LINE 5452 "Transform.hs" #-})- -- use rule "Transform.ag"(line 758, column 44)- _lhsOorderDepsCollect =- ({-# LINE 758 "Transform.ag" #-}- Set.empty- {-# LINE 5457 "Transform.hs" #-})- -- use rule "Transform.ag"(line 727, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 727 "Transform.ag" #-}- []- {-# LINE 5462 "Transform.hs" #-})- -- use rule "Transform.ag"(line 892, column 40)- _lhsOruleInfos =- ({-# LINE 892 "Transform.ag" #-}- []- {-# LINE 5467 "Transform.hs" #-})- -- use rule "Transform.ag"(line 894, column 40)- _lhsOuniqueInfos =- ({-# LINE 894 "Transform.ag" #-}- []- {-# LINE 5472 "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 957, column 16)- _lhsOuniqueInfos =- ({-# LINE 957 "Transform.ag" #-}- [ (ident_, ref_) ]- {-# LINE 5490 "Transform.hs" #-})- -- use rule "Transform.ag"(line 896, column 40)- _lhsOaroundInfos =- ({-# LINE 896 "Transform.ag" #-}- []- {-# LINE 5495 "Transform.hs" #-})- -- use rule "Transform.ag"(line 895, column 40)- _lhsOaugmentInfos =- ({-# LINE 895 "Transform.ag" #-}- []- {-# LINE 5500 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- []- {-# LINE 5505 "Transform.hs" #-})- -- use rule "Transform.ag"(line 758, column 44)- _lhsOorderDepsCollect =- ({-# LINE 758 "Transform.ag" #-}- Set.empty- {-# LINE 5510 "Transform.hs" #-})- -- use rule "Transform.ag"(line 727, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 727 "Transform.ag" #-}- []- {-# LINE 5515 "Transform.hs" #-})- -- use rule "Transform.ag"(line 892, column 40)- _lhsOruleInfos =- ({-# LINE 892 "Transform.ag" #-}- []- {-# LINE 5520 "Transform.hs" #-})- -- use rule "Transform.ag"(line 893, column 40)- _lhsOsigInfos =- ({-# LINE 893 "Transform.ag" #-}- []- {-# LINE 5525 "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 896, column 40)- _lhsOaroundInfos =- ({-# LINE 896 "Transform.ag" #-}- _hdIaroundInfos ++ _tlIaroundInfos- {-# LINE 5593 "Transform.hs" #-})- -- use rule "Transform.ag"(line 895, column 40)- _lhsOaugmentInfos =- ({-# LINE 895 "Transform.ag" #-}- _hdIaugmentInfos ++ _tlIaugmentInfos- {-# LINE 5598 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# LINE 5603 "Transform.hs" #-})- -- use rule "Transform.ag"(line 758, column 44)- _lhsOorderDepsCollect =- ({-# LINE 758 "Transform.ag" #-}- _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect- {-# LINE 5608 "Transform.hs" #-})- -- use rule "Transform.ag"(line 727, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 727 "Transform.ag" #-}- _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect- {-# LINE 5613 "Transform.hs" #-})- -- use rule "Transform.ag"(line 892, column 40)- _lhsOruleInfos =- ({-# LINE 892 "Transform.ag" #-}- _hdIruleInfos ++ _tlIruleInfos- {-# LINE 5618 "Transform.hs" #-})- -- use rule "Transform.ag"(line 893, column 40)- _lhsOsigInfos =- ({-# LINE 893 "Transform.ag" #-}- _hdIsigInfos ++ _tlIsigInfos- {-# LINE 5623 "Transform.hs" #-})- -- use rule "Transform.ag"(line 894, column 40)- _lhsOuniqueInfos =- ({-# LINE 894 "Transform.ag" #-}- _hdIuniqueInfos ++ _tlIuniqueInfos- {-# LINE 5628 "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 896, column 40)- _lhsOaroundInfos =- ({-# LINE 896 "Transform.ag" #-}- []- {-# LINE 5648 "Transform.hs" #-})- -- use rule "Transform.ag"(line 895, column 40)- _lhsOaugmentInfos =- ({-# LINE 895 "Transform.ag" #-}- []- {-# LINE 5653 "Transform.hs" #-})- -- use rule "Transform.ag"(line 966, column 55)- _lhsOdefinedInsts =- ({-# LINE 966 "Transform.ag" #-}- []- {-# LINE 5658 "Transform.hs" #-})- -- use rule "Transform.ag"(line 758, column 44)- _lhsOorderDepsCollect =- ({-# LINE 758 "Transform.ag" #-}- Set.empty- {-# LINE 5663 "Transform.hs" #-})- -- use rule "Transform.ag"(line 727, column 46)- _lhsOpragmaNamesCollect =- ({-# LINE 727 "Transform.ag" #-}- []- {-# LINE 5668 "Transform.hs" #-})- -- use rule "Transform.ag"(line 892, column 40)- _lhsOruleInfos =- ({-# LINE 892 "Transform.ag" #-}- []- {-# LINE 5673 "Transform.hs" #-})- -- use rule "Transform.ag"(line 893, column 40)- _lhsOsigInfos =- ({-# LINE 893 "Transform.ag" #-}- []- {-# LINE 5678 "Transform.hs" #-})- -- use rule "Transform.ag"(line 894, column 40)- _lhsOuniqueInfos =- ({-# LINE 894 "Transform.ag" #-}- []- {-# LINE 5683 "Transform.hs" #-})+-- UUAGC 0.9.26 (Transform.ag)+module Transform where+{-# LINE 8 "Transform.ag" #-}++import Control.Monad(mplus,mzero)+import List (partition, elem, nub,intersperse)+import Data.Maybe+import qualified Data.Map as Map+import Data.Map (Map)+import Data.Set as Set (Set, member, union, toList, fromList, empty, singleton, member, unions, size, fold, intersection, difference, insert)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq, empty, (><),fromList)+import Data.Foldable(toList)+import UU.Scanner.Position(noPos)++import ConcreteSyntax+import AbstractSyntax+import ErrorMessages+import Patterns (Patterns(..),Pattern(..))+import Expression (Expression(..))+import HsToken++import Options+import CommonTypes+{-# LINE 28 "../src-derived/Transform.hs" #-}++{-# LINE 2 "./ConcreteSyntax.ag" #-}++import UU.Scanner.Position (Pos)+import Patterns (Pattern)+import Expression (Expression)+import CommonTypes+{-# LINE 36 "../src-derived/Transform.hs" #-}++{-# LINE 2 "./Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 43 "../src-derived/Transform.hs" #-}+{-# LINE 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 = (Maybe Identifier, [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 321 "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 (mbNm, pat,exp,as,owrt,str) ((r1,e1),m1) + = let (e2,m2,u2,b2) = foldr (checkDefi owrt) (e1,m1,[],[]) as+ in ( (Rule mbNm (pat u2) exp owrt str True : r1, e2), m2)++ checkDefi :: Bool -> AttrName -> AccumDefiCheck -> AccumDefiCheck+ checkDefi owrt fa@(field,attr) (e,m,u,bs)+ = case lookup field fieldmap+ of Just (NT tp _) -> + let tp' = maybe tp id (deforestedNt tp)+ in if field == _LOC || field == _INST || field == _FIRST || field == _LAST+ || hasAttrib (if getName field==getName _LHS then snd else fst) tp' attr+ then case Map.lookupIndex fa m of+ Just ix -> let ((_,attr2),b) = Map.elemAt ix m+ in if b && not (fa `elem` bs)+ then ( e, Map.insert fa owrt m, fa:u, fa:bs)+ else (((Seq.<|)) (DupRule nt con field attr2 attr) e, m, fa:u, bs)+ Nothing -> ( e, Map.insert fa owrt m, u, fa:bs)+ else (((Seq.<|)) (SuperfluousRule nt con field attr) e, m, fa:u, bs)+ _ -> (((Seq.<|)) (UndefChild nt con field) e, m, fa:u, bs )++ in fst (foldr checkRule (([],Seq.empty),Map.empty) rs)++checkRuleNames :: NontermIdent -> ConstructorIdent -> [RuleInfo] -> Seq Error+checkRuleNames nt con+ = fst . foldr checkRule (Seq.empty, Set.empty)+ where+ checkRule (Just nm,_,_,_,_,_) (errs, nms)+ | nm `Set.member` nms = (DupRuleName nt con nm Seq.<| errs, nms)+ | otherwise = (errs, Set.insert nm nms)+ checkRule (Nothing,_,_,_,_,_) inp = inp++checkSigs :: NontermIdent -> ConstructorIdent -> [SigInfo] -> SigsAndErrors+checkSigs nt con sis + = let checkSig (ide,typ) (sigs,errs)+ = if ide `elem` map (\(TypeSig n t)-> n) sigs+ then (sigs, ((Seq.<|)) (DupSig nt con ide) errs)+ -- else if not (ide `elem` locattrdefs)+ -- then (sigs, ((Seq.<|)) (SupSig nt con ide) errs)+ else (TypeSig ide typ:sigs, errs)+ in foldr checkSig ([],Seq.empty) sis++checkInsts :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [SigInfo]) -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [Identifier] -> InstsAndErrors+checkInsts allNts sigMap fieldMap nt con+ = foldr (\inst (insts, errs) ->+ maybe (insts, Seq.singleton (MissingInstSig nt con inst) >< errs)+ (\info@(k, NT nm _) ->+ case findInst k insts of+ Just k' -> (insts, Seq.singleton (DupChild nt con k k') >< errs)+ Nothing -> case nm `Set.member` allNts of+ True -> (info : insts, errs)+ False | take 2 (getName nm) == "T_" -> let nm' = Ident (drop 2 (getName nm)) (getPos nm)+ in case nm' `Set.member` allNts of+ True -> (info : insts, errs)+ False -> (insts, Seq.singleton (UndefNont nm') >< errs)+ | otherwise -> (insts, Seq.singleton (UndefNont nm) >< errs)+ ) + $ findSig inst+ ) ([], Seq.empty)+ where+ sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt sigMap)+ + findSig name+ = do tp@(NT _ _) <- lookup name sigs+ return (name, tp)+ + findInst _ [] = Nothing+ findInst k ((k', _): r)+ | k == k' = Just k'+ | otherwise = findInst k r++checkUniques :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [UniqueInfo] -> UniquesAndErrors+checkUniques allAttrs nt con uniques+ = let checkUnique (ident,ref) (us,errs)+ = if ident `Map.member` us+ then (us, ((Seq.<|)) (DupUnique nt con ident) errs)+ else if Map.member ref inhs && Map.member ref syns+ then (Map.insert ident ref us, errs)+ else (us, ((Seq.<|)) (MissingUnique nt ref) errs)++ (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs+ in foldr checkUnique (Map.empty, Seq.empty) uniques++checkAugments :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [AugmentInfo] -> AugmentsAndErrors+checkAugments allAttrs nt con augments+ = let checkAugment (ident,expr) (as,errs)+ = if ident `Map.member` as+ then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)+ else if Map.member ident syns+ then (Map.insert ident [expr] as, errs)+ else (as, ((Seq.<|)) (MissingSyn nt ident) errs)++ (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs+ in foldr checkAugment (Map.empty, Seq.empty) augments++checkArounds :: Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> NontermIdent -> ConstructorIdent -> [AroundInfo] -> AroundsAndErrors+checkArounds fieldMap nt con arounds+ = let checkAround (ident,expr) (as,errs)+ = if ident `Map.member` as+ then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)+ else case lookup ident fields of+ Just (NT _ _) -> (Map.insert ident [expr] as, errs)+ _ -> (as, ((Seq.<|)) (UndefChild nt con ident) errs)+ fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)+ in foldr checkAround (Map.empty, Seq.empty) arounds++unionunionplusplus = Map.unionWith (Map.unionWith (++))+{-# LINE 243 "../src-derived/Transform.hs" #-}++{-# LINE 455 "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 Nothing pat rhs False "-- generated by the unique rule mechanism." False+ attr fld a = Alias fld a (Underscore noPos) []+ gencase nm outp+ = h ("case " ++ uniqueDispenser opts ++ " __cont of { (__cont, " ++ getName nm ++ ") -> ") ++ outp ++ h "}"+ h s = [HsToken s noPos]+ finalout us = h ("(__cont, " ++ concat (intersperse "," (map getName us)) ++ ")")+ wrap ref inp = h "case " ++ [AGField _LHS ref noPos Nothing] ++ h " of { __cont | __cont `seq` True -> " ++ inp ++ h "}"+{-# LINE 270 "../src-derived/Transform.hs" #-}++{-# LINE 625 "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 295 "../src-derived/Transform.hs" #-}++{-# LINE 733 "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 304 "../src-derived/Transform.hs" #-}++{-# LINE 765 "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 313 "../src-derived/Transform.hs" #-}++{-# LINE 791 "Transform.ag" #-}++mergeParams :: ParamMap -> ParamMap -> ParamMap+mergeParams = Map.unionWith (++)+{-# LINE 319 "../src-derived/Transform.hs" #-}++{-# LINE 814 "Transform.ag" #-}++mergeCtx :: ContextMap -> ContextMap -> ContextMap+mergeCtx+ = Map.unionWith nubconcat+ where nubconcat a b = nub (a ++ b)+{-# LINE 327 "../src-derived/Transform.hs" #-}++{-# LINE 827 "Transform.ag" #-}++mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)+{-# LINE 332 "../src-derived/Transform.hs" #-}++{-# LINE 838 "Transform.ag" #-}++merge x y = foldr f y (Map.toList x)+ where f ~(k,v) m = Map.insertWith (Map.union) k v m+{-# LINE 338 "../src-derived/Transform.hs" #-}++{-# LINE 865 "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 348 "../src-derived/Transform.hs" #-}++{-# LINE 876 "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 354 "../src-derived/Transform.hs" #-}++{-# LINE 1006 "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 363 "../src-derived/Transform.hs" #-}++{-# LINE 1013 "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)++ -- important: keep order of children+ cldrn = map child (flds ++ filter (not . existsAsField) insts)+ child (nm, tp) =+ let tpI = if existsAsInst nm+ then fromJust $ lookup nm insts+ else tp+ (inh,syn) = case tpI of+ NT nt _ -> let nt' = maybe nt id (deforestedNt nt)+ in Map.findWithDefault (Map.empty,Map.empty) nt' attrs+ _ -> (Map.empty,Map.empty)+ virt = if existsAsInst nm+ then case lookup nm flds of+ Just tp' -> Just (Just tp')+ Nothing -> Just Nothing+ else Nothing+ in Child nm tpI inh syn virt+ existsAsInst nm = maybe False (const True) (lookup nm insts)+ existsAsField (nm,_) = maybe False (const True) (lookup nm flds)+ 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 420 "../src-derived/Transform.hs" #-}++{-# LINE 1069 "Transform.ag" #-}++mapUnionWithSetUnion = Map.unionWith Set.union+mapUnionWithPlusPlus = Map.unionWith (++)+{-# LINE 426 "../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 allNamesErrs : _+ 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 errs10 : _+ 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 555 "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 561 "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 567 "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 573 "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 582 "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 588 "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 594 "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 600 "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 606 "Transform.hs" #-})+ -- "Transform.ag"(line 268, column 10)+ _augmentSigs =+ ({-# LINE 268 "Transform.ag" #-}+ let gen mp = []+ in Map.map (Map.map gen) _allAugments+ {-# LINE 612 "Transform.hs" #-})+ -- "Transform.ag"(line 271, column 10)+ _allRulesErrs =+ ({-# LINE 271 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs )) _allRules+ {-# LINE 617 "Transform.hs" #-})+ -- "Transform.ag"(line 272, column 10)+ _allNamesErrs =+ ({-# LINE 272 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . checkRuleNames) _allRules+ {-# LINE 622 "Transform.hs" #-})+ -- "Transform.ag"(line 273, column 10)+ _allSigsErrs =+ ({-# LINE 273 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkSigs )) _allSigs+ {-# LINE 627 "Transform.hs" #-})+ -- "Transform.ag"(line 274, column 10)+ _allInstsErrs =+ ({-# LINE 274 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals _allSigs _allFields )) _allInsts+ {-# LINE 632 "Transform.hs" #-})+ -- "Transform.ag"(line 275, column 10)+ _allUniquesErrs =+ ({-# LINE 275 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls )) _allUniques+ {-# LINE 637 "Transform.hs" #-})+ -- "Transform.ag"(line 276, column 10)+ _allAugmentErrs =+ ({-# LINE 276 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls )) _allAugments+ {-# LINE 642 "Transform.hs" #-})+ -- "Transform.ag"(line 277, column 10)+ _allAroundsErrs =+ ({-# LINE 277 "Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields )) _allArounds+ {-# LINE 647 "Transform.hs" #-})+ -- "Transform.ag"(line 279, column 10)+ _checkedRulesPre =+ ({-# LINE 279 "Transform.ag" #-}+ Map.map (Map.map fst) _allRulesErrs+ {-# LINE 652 "Transform.hs" #-})+ -- "Transform.ag"(line 280, column 10)+ _checkedSigs =+ ({-# LINE 280 "Transform.ag" #-}+ Map.map (Map.map fst) _allSigsErrs `unionunionplusplus` _augmentSigs+ {-# LINE 657 "Transform.hs" #-})+ -- "Transform.ag"(line 281, column 10)+ _checkedInsts =+ ({-# LINE 281 "Transform.ag" #-}+ Map.map (Map.map fst) _allInstsErrs+ {-# LINE 662 "Transform.hs" #-})+ -- "Transform.ag"(line 282, column 10)+ _checkedUniques =+ ({-# LINE 282 "Transform.ag" #-}+ Map.map (Map.map fst) _allUniquesErrs+ {-# LINE 667 "Transform.hs" #-})+ -- "Transform.ag"(line 283, column 10)+ _checkedAugments =+ ({-# LINE 283 "Transform.ag" #-}+ Map.map (Map.map fst) _allAugmentErrs+ {-# LINE 672 "Transform.hs" #-})+ -- "Transform.ag"(line 284, column 10)+ _checkedArounds =+ ({-# LINE 284 "Transform.ag" #-}+ Map.map (Map.map fst) _allAroundsErrs+ {-# LINE 677 "Transform.hs" #-})+ -- "Transform.ag"(line 285, column 10)+ _checkedRules =+ ({-# LINE 285 "Transform.ag" #-}+ Map.unionWith (Map.unionWith (++)) _checkedRulesPre (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allFields _allAttrDecls )) _checkedUniques )+ {-# LINE 682 "Transform.hs" #-})+ -- "Transform.ag"(line 287, column 10)+ _errs1 =+ ({-# LINE 287 "Transform.ag" #-}+ let f = checkForDuplicates (DupSynonym)+ in Seq.fromList . f . map fst $ _elemsItypeSyns+ {-# LINE 688 "Transform.hs" #-})+ -- "Transform.ag"(line 290, column 10)+ _errs2 =+ ({-# LINE 290 "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 695 "Transform.hs" #-})+ -- "Transform.ag"(line 294, column 10)+ _errs3 =+ ({-# LINE 294 "Transform.ag" #-}+ let f (nt,cons) = checkForDuplicates (DupAlt nt) cons+ in Seq.empty+ {-# LINE 701 "Transform.hs" #-})+ -- "Transform.ag"(line 298, column 10)+ _errs4 =+ ({-# LINE 298 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allRulesErrs+ {-# LINE 707 "Transform.hs" #-})+ -- "Transform.ag"(line 301, column 10)+ _errs5 =+ ({-# LINE 301 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allSigsErrs+ {-# LINE 713 "Transform.hs" #-})+ -- "Transform.ag"(line 304, column 10)+ _errs6 =+ ({-# LINE 304 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allInstsErrs+ {-# LINE 719 "Transform.hs" #-})+ -- "Transform.ag"(line 307, column 10)+ _errs7 =+ ({-# LINE 307 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allUniquesErrs+ {-# LINE 725 "Transform.hs" #-})+ -- "Transform.ag"(line 310, column 10)+ _errs8 =+ ({-# LINE 310 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allAugmentErrs+ {-# LINE 731 "Transform.hs" #-})+ -- "Transform.ag"(line 313, column 10)+ _errs9 =+ ({-# LINE 313 "Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allAroundsErrs+ {-# LINE 737 "Transform.hs" #-})+ -- "Transform.ag"(line 316, column 10)+ _errs10 =+ ({-# LINE 316 "Transform.ag" #-}+ let f m s = Map.fold ((><)) s m+ in Map.fold f Seq.empty _allNamesErrs+ {-# LINE 743 "Transform.hs" #-})+ -- "Transform.ag"(line 319, column 10)+ _lhsOerrors =+ ({-# LINE 319 "Transform.ag" #-}+ _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9 >< _errs10+ {-# LINE 748 "Transform.hs" #-})+ -- "Transform.ag"(line 498, column 10)+ _allNonterminals =+ ({-# LINE 498 "Transform.ag" #-}+ _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames+ {-# LINE 753 "Transform.hs" #-})+ -- "Transform.ag"(line 518, column 8)+ _elemsOallConstructors =+ ({-# LINE 518 "Transform.ag" #-}+ _elemsIcollectedConstructorsMap+ {-# LINE 758 "Transform.hs" #-})+ -- "Transform.ag"(line 591, column 8)+ _elemsOdefSets =+ ({-# LINE 591 "Transform.ag" #-}+ Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals ))+ {-# LINE 763 "Transform.hs" #-})+ -- "Transform.ag"(line 592, column 8)+ _elemsOdefinedSets =+ ({-# LINE 592 "Transform.ag" #-}+ Map.map fst _elemsIdefSets+ {-# LINE 768 "Transform.hs" #-})+ -- "Transform.ag"(line 844, column 8)+ _elemsOattrDecls =+ ({-# LINE 844 "Transform.ag" #-}+ Map.empty+ {-# LINE 773 "Transform.hs" #-})+ -- "Transform.ag"(line 883, column 9)+ _allAttrDecls =+ ({-# LINE 883 "Transform.ag" #-}+ if withSelf _lhsIoptions+ then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals )+ else _elemsIattrDecls+ {-# LINE 780 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ _elemsIblocks+ {-# LINE 785 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ _elemsImoduleDecl+ {-# LINE 790 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ _elemsIpragmas+ {-# LINE 795 "Transform.hs" #-})+ -- copy rule (from local)+ _elemsOallAttrDecls =+ ({-# LINE 746 "Transform.ag" #-}+ _allAttrDecls+ {-# LINE 800 "Transform.hs" #-})+ -- copy rule (from local)+ _elemsOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _allFields+ {-# LINE 805 "Transform.hs" #-})+ -- copy rule (from local)+ _elemsOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _allNonterminals+ {-# LINE 810 "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 873 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 91, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 91 "Transform.ag" #-}+ _namesIcollectedConstructorNames+ {-# LINE 878 "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 940 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# LINE 945 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallConstructors =+ ({-# LINE 94 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 950 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 955 "Transform.hs" #-})+ -- copy rule (down)+ _hdOnts =+ ({-# LINE 163 "Transform.ag" #-}+ _lhsInts+ {-# LINE 960 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallConstructors =+ ({-# LINE 94 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 965 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 970 "Transform.hs" #-})+ -- copy rule (down)+ _tlOnts =+ ({-# LINE 163 "Transform.ag" #-}+ _lhsInts+ {-# LINE 975 "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 992 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 997 "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 852, column 15)+ __tup1 =+ ({-# LINE 852 "Transform.ag" #-}+ checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls+ {-# LINE 1063 "Transform.hs" #-})+ -- "Transform.ag"(line 852, column 15)+ (_attrDecls,_) =+ ({-# LINE 852 "Transform.ag" #-}+ __tup1+ {-# LINE 1068 "Transform.hs" #-})+ -- "Transform.ag"(line 852, column 15)+ (_,_errors) =+ ({-# LINE 852 "Transform.ag" #-}+ __tup1+ {-# LINE 1073 "Transform.hs" #-})+ -- "Transform.ag"(line 854, column 15)+ __tup2 =+ ({-# LINE 854 "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 1085 "Transform.hs" #-})+ -- "Transform.ag"(line 854, column 15)+ (_inherited,_,_) =+ ({-# LINE 854 "Transform.ag" #-}+ __tup2+ {-# LINE 1090 "Transform.hs" #-})+ -- "Transform.ag"(line 854, column 15)+ (_,_synthesized,_) =+ ({-# LINE 854 "Transform.ag" #-}+ __tup2+ {-# LINE 1095 "Transform.hs" #-})+ -- "Transform.ag"(line 854, column 15)+ (_,_,_useMap) =+ ({-# LINE 854 "Transform.ag" #-}+ __tup2+ {-# LINE 1100 "Transform.hs" #-})+ -- "Transform.ag"(line 862, column 11)+ _lhsOuseMap =+ ({-# LINE 862 "Transform.ag" #-}+ Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))+ {-# LINE 1105 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _errors+ {-# LINE 1110 "Transform.hs" #-})+ -- copy rule (from local)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _attrDecls+ {-# LINE 1115 "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 658, column 17)+ _lhsOconstructors =+ ({-# LINE 658 "Transform.ag" #-}+ \ds -> ds+ {-# LINE 1166 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 91, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 91 "Transform.ag" #-}+ Set.empty+ {-# LINE 1171 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 1176 "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 657, column 17)+ _lhsOconstructors =+ ({-# LINE 657 "Transform.ag" #-}+ \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds+ {-# LINE 1195 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 91, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 91 "Transform.ag" #-}+ _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+ {-# LINE 1200 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 1205 "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 506, column 11)+ _lhsOcollectedConstructorNames =+ ({-# LINE 506 "Transform.ag" #-}+ Set.singleton name_+ {-# LINE 1221 "Transform.hs" #-})+ -- "Transform.ag"(line 655, column 17)+ _lhsOconstructors =+ ({-# LINE 655 "Transform.ag" #-}+ \ds -> Set.singleton name_+ {-# LINE 1226 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 1231 "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 656, column 17)+ _lhsOconstructors =+ ({-# LINE 656 "Transform.ag" #-}+ \ds -> _set1Iconstructors ds `Set.union` _set2Iconstructors ds+ {-# LINE 1250 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 91, column 62)+ _lhsOcollectedConstructorNames =+ ({-# LINE 91 "Transform.ag" #-}+ _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+ {-# LINE 1255 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 1260 "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 804, column 7)+ _lhsOctxCollect =+ ({-# LINE 804 "Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1459 "Transform.hs" #-})+ -- "Transform.ag"(line 848, column 10)+ _attrsOnts =+ ({-# LINE 848 "Transform.ag" #-}+ _namesInontSet+ {-# LINE 1464 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 1469 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 1474 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 1479 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 1484 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 1489 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 1494 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 1499 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _namesIcollectedNames+ {-# LINE 1504 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 1509 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 1514 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 1519 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 1524 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 1529 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _namesIerrors Seq.>< _attrsIerrors+ {-# LINE 1534 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 1539 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ Map.empty+ {-# LINE 1544 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 1549 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 1554 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 1559 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ _attrsIuseMap+ {-# LINE 1564 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 1569 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _attrsIattrDecls+ {-# LINE 1574 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 1579 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 1584 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1589 "Transform.hs" #-})+ -- copy rule (down)+ _namesOdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 1594 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 1599 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1604 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 1609 "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 1677 "Transform.hs" #-})+ -- "Transform.ag"(line 512, column 11)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 512 "Transform.ag" #-}+ Map.fromList+ [ (n, _altsIcollectedConstructorNames)+ | n <- Set.toList _namesInontSet+ ]+ {-# LINE 1685 "Transform.hs" #-})+ -- "Transform.ag"(line 781, column 7)+ _lhsOparamsCollect =+ ({-# LINE 781 "Transform.ag" #-}+ if null params_+ then Map.empty+ else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1692 "Transform.hs" #-})+ -- "Transform.ag"(line 804, column 7)+ _lhsOctxCollect =+ ({-# LINE 804 "Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1699 "Transform.hs" #-})+ -- "Transform.ag"(line 847, column 10)+ _attrsOnts =+ ({-# LINE 847 "Transform.ag" #-}+ _namesInontSet+ {-# LINE 1704 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 1709 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 1714 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 1719 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 1724 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ _altsIcollectedFields+ {-# LINE 1729 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 1734 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _namesIcollectedNames+ {-# LINE 1739 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 1744 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 1749 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 1754 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 1759 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 1764 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _namesIerrors Seq.>< _attrsIerrors+ {-# LINE 1769 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 1774 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 1779 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 1784 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 1789 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ _attrsIuseMap+ {-# LINE 1794 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 1799 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _attrsIattrDecls+ {-# LINE 1804 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 1809 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 1814 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1819 "Transform.hs" #-})+ -- copy rule (down)+ _namesOdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 1824 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 1829 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1834 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 1839 "Transform.hs" #-})+ -- copy rule (down)+ _altsOallConstructors =+ ({-# LINE 94 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 1844 "Transform.hs" #-})+ -- copy rule (down)+ _altsOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 1849 "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 832, column 14)+ _lhsOderivings =+ ({-# LINE 832 "Transform.ag" #-}+ Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]+ {-# LINE 1903 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 1908 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 1913 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 1918 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 1923 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 1928 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 1933 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 1938 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 1943 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 1948 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 1953 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 1958 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 1963 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 800, column 34)+ _lhsOctxCollect =+ ({-# LINE 800 "Transform.ag" #-}+ Map.empty+ {-# LINE 1968 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _setIerrors+ {-# LINE 1973 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 1978 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ Map.empty+ {-# LINE 1983 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 1988 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 1993 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 1998 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ Map.empty+ {-# LINE 2003 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 2008 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2013 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2018 "Transform.hs" #-})+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2023 "Transform.hs" #-})+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2028 "Transform.hs" #-})+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 2033 "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 1000, column 7)+ _lhsOmoduleDecl =+ ({-# LINE 1000 "Transform.ag" #-}+ Just (name_, exports_, imports_)+ {-# LINE 2078 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 2083 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 2088 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 2093 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 2098 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 2103 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 2108 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 2113 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 2118 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 2123 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 2128 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 2133 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 2138 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 800, column 34)+ _lhsOctxCollect =+ ({-# LINE 800 "Transform.ag" #-}+ Map.empty+ {-# LINE 2143 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 2148 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 2153 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ Map.empty+ {-# LINE 2158 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 2163 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 2168 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 2173 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ Map.empty+ {-# LINE 2178 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 2183 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2188 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2193 "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 676, column 13)+ _lhsOpragmas =+ ({-# LINE 676 "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 2273 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 2278 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 2283 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 2288 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 2293 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 2298 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 2303 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 2308 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 2313 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 2318 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 2323 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 2328 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 2333 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 800, column 34)+ _lhsOctxCollect =+ ({-# LINE 800 "Transform.ag" #-}+ Map.empty+ {-# LINE 2338 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 2343 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 2348 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 2353 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ Map.empty+ {-# LINE 2358 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 2363 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 2368 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ Map.empty+ {-# LINE 2373 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 2378 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2383 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2388 "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 2457 "Transform.hs" #-})+ -- "Transform.ag"(line 804, column 7)+ _lhsOctxCollect =+ ({-# LINE 804 "Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 2464 "Transform.hs" #-})+ -- "Transform.ag"(line 849, column 10)+ _attrsOnts =+ ({-# LINE 849 "Transform.ag" #-}+ _namesInontSet+ {-# LINE 2469 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ _altsIattrOrderCollect+ {-# LINE 2474 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 2479 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ _altsIcollectedArounds+ {-# LINE 2484 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ _altsIcollectedAugments+ {-# LINE 2489 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 2494 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 2499 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ _altsIcollectedInsts+ {-# LINE 2504 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _namesIcollectedNames+ {-# LINE 2509 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ _altsIcollectedRules+ {-# LINE 2514 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 2519 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ _altsIcollectedSigs+ {-# LINE 2524 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ _altsIcollectedUniques+ {-# LINE 2529 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 2534 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors+ {-# LINE 2539 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 2544 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ Map.empty+ {-# LINE 2549 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 2554 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ _altsIsemPragmasCollect+ {-# LINE 2559 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 2564 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ _attrsIuseMap+ {-# LINE 2569 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 2574 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _attrsIattrDecls+ {-# LINE 2579 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 2584 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2589 "Transform.hs" #-})+ -- copy rule (down)+ _namesOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2594 "Transform.hs" #-})+ -- copy rule (down)+ _namesOdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 2599 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2604 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2609 "Transform.hs" #-})+ -- copy rule (down)+ _attrsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2614 "Transform.hs" #-})+ -- copy rule (down)+ _altsOallAttrDecls =+ ({-# LINE 746 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 2619 "Transform.hs" #-})+ -- copy rule (down)+ _altsOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2624 "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 489, column 10)+ _lhsOcollectedSetNames =+ ({-# LINE 489 "Transform.ag" #-}+ Set.singleton name_+ {-# LINE 2678 "Transform.hs" #-})+ -- "Transform.ag"(line 596, column 13)+ __tup3 =+ ({-# LINE 596 "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 2692 "Transform.hs" #-})+ -- "Transform.ag"(line 596, column 13)+ (_defSets2,_) =+ ({-# LINE 596 "Transform.ag" #-}+ __tup3+ {-# LINE 2697 "Transform.hs" #-})+ -- "Transform.ag"(line 596, column 13)+ (_,_errs) =+ ({-# LINE 596 "Transform.ag" #-}+ __tup3+ {-# LINE 2702 "Transform.hs" #-})+ -- "Transform.ag"(line 606, column 9)+ _lhsOdefSets =+ ({-# LINE 606 "Transform.ag" #-}+ _defSets2+ {-# LINE 2707 "Transform.hs" #-})+ -- "Transform.ag"(line 606, column 9)+ _lhsOerrors =+ ({-# LINE 607 "Transform.ag" #-}+ _errs >< _setIerrors+ {-# LINE 2712 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 2717 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 2722 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 2727 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 2732 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 2737 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 2742 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 2747 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 2752 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 2757 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 2762 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 2767 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 800, column 34)+ _lhsOctxCollect =+ ({-# LINE 800 "Transform.ag" #-}+ Map.empty+ {-# LINE 2772 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 2777 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 2782 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ Map.empty+ {-# LINE 2787 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 2792 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 2797 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 2802 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ Map.empty+ {-# LINE 2807 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 2812 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 2817 "Transform.hs" #-})+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 2822 "Transform.hs" #-})+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 2827 "Transform.hs" #-})+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 2832 "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 2884 "Transform.hs" #-})+ -- "Transform.ag"(line 184, column 10)+ _blockValue =+ ({-# LINE 184 "Transform.ag" #-}+ [(lines_, pos_)]+ {-# LINE 2889 "Transform.hs" #-})+ -- "Transform.ag"(line 185, column 10)+ _lhsOblocks =+ ({-# LINE 185 "Transform.ag" #-}+ Map.singleton _blockInfo _blockValue+ {-# LINE 2894 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 2899 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 2904 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 2909 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 2914 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 2919 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 2924 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 2929 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 2934 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 2939 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 2944 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 2949 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 800, column 34)+ _lhsOctxCollect =+ ({-# LINE 800 "Transform.ag" #-}+ Map.empty+ {-# LINE 2954 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 2959 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 2964 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 2969 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ Map.empty+ {-# LINE 2974 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 2979 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 2984 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 2989 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ Map.empty+ {-# LINE 2994 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 2999 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3004 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3009 "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 3053 "Transform.hs" #-})+ -- "Transform.ag"(line 492, column 11)+ _lhsOcollectedNames =+ ({-# LINE 492 "Transform.ag" #-}+ Set.singleton name_+ {-# LINE 3058 "Transform.hs" #-})+ -- "Transform.ag"(line 546, column 11)+ _expanded =+ ({-# LINE 546 "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 3091 "Transform.hs" #-})+ -- "Transform.ag"(line 575, column 11)+ _argType =+ ({-# LINE 575 "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 3102 "Transform.hs" #-})+ -- "Transform.ag"(line 582, column 11)+ _lhsOtypeSyns =+ ({-# LINE 582 "Transform.ag" #-}+ [(name_,_argType)]+ {-# LINE 3107 "Transform.hs" #-})+ -- "Transform.ag"(line 787, column 7)+ _lhsOparamsCollect =+ ({-# LINE 787 "Transform.ag" #-}+ if null params_+ then Map.empty+ else Map.singleton name_ params_+ {-# LINE 3114 "Transform.hs" #-})+ -- "Transform.ag"(line 810, column 7)+ _lhsOctxCollect =+ ({-# LINE 810 "Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.singleton name_ ctx_+ {-# LINE 3121 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 3126 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 3131 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 3136 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 3141 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 3146 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 3151 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 3156 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 3161 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 3166 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 3171 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 3176 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 3181 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 3186 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 3191 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 3196 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ Map.empty+ {-# LINE 3201 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 3206 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3211 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3216 "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 667, column 13)+ _lhsOwrappers =+ ({-# LINE 667 "Transform.ag" #-}+ _setInontSet+ {-# LINE 3263 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 3268 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 3273 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 3278 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 3283 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 3288 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 3293 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 3298 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _setIcollectedNames+ {-# LINE 3303 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 3308 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 3313 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 3318 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 3323 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 800, column 34)+ _lhsOctxCollect =+ ({-# LINE 800 "Transform.ag" #-}+ Map.empty+ {-# LINE 3328 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 3333 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _setIerrors+ {-# LINE 3338 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 3343 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ Map.empty+ {-# LINE 3348 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 3353 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 3358 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 3363 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ Map.empty+ {-# LINE 3368 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3373 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3378 "Transform.hs" #-})+ -- copy rule (down)+ _setOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3383 "Transform.hs" #-})+ -- copy rule (down)+ _setOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3388 "Transform.hs" #-})+ -- copy rule (down)+ _setOdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 3393 "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 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+ {-# LINE 3562 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ _hdIblocks `mapUnionWithPlusPlus` _tlIblocks+ {-# LINE 3567 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ _hdIcollectedArounds ++ _tlIcollectedArounds+ {-# LINE 3572 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ _hdIcollectedAugments ++ _tlIcollectedAugments+ {-# LINE 3577 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap+ {-# LINE 3582 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# LINE 3587 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ _hdIcollectedInsts ++ _tlIcollectedInsts+ {-# LINE 3592 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _hdIcollectedNames `Set.union` _tlIcollectedNames+ {-# LINE 3597 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ _hdIcollectedRules ++ _tlIcollectedRules+ {-# LINE 3602 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames+ {-# LINE 3607 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ _hdIcollectedSigs ++ _tlIcollectedSigs+ {-# LINE 3612 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ _hdIcollectedUniques ++ _tlIcollectedUniques+ {-# LINE 3617 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 800, column 34)+ _lhsOctxCollect =+ ({-# LINE 800 "Transform.ag" #-}+ _hdIctxCollect `mergeCtx` _tlIctxCollect+ {-# LINE 3622 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ _hdIderivings `mergeDerivings` _tlIderivings+ {-# LINE 3627 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 3632 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ _hdImoduleDecl `mplus` _tlImoduleDecl+ {-# LINE 3637 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ _hdIparamsCollect `mergeParams` _tlIparamsCollect+ {-# LINE 3642 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ _hdIpragmas . _tlIpragmas+ {-# LINE 3647 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+ {-# LINE 3652 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ _hdItypeSyns ++ _tlItypeSyns+ {-# LINE 3657 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ _hdIuseMap `merge` _tlIuseMap+ {-# LINE 3662 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ _hdIwrappers `Set.union` _tlIwrappers+ {-# LINE 3667 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _tlIattrDecls+ {-# LINE 3672 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _tlIdefSets+ {-# LINE 3677 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallAttrDecls =+ ({-# LINE 746 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 3682 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallConstructors =+ ({-# LINE 94 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 3687 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3692 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3697 "Transform.hs" #-})+ -- copy rule (down)+ _hdOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3702 "Transform.hs" #-})+ -- copy rule (down)+ _hdOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3707 "Transform.hs" #-})+ -- copy rule (down)+ _hdOdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 3712 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallAttrDecls =+ ({-# LINE 746 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 3717 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallConstructors =+ ({-# LINE 94 "Transform.ag" #-}+ _lhsIallConstructors+ {-# LINE 3722 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 3727 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3732 "Transform.hs" #-})+ -- copy rule (chain)+ _tlOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _hdIattrDecls+ {-# LINE 3737 "Transform.hs" #-})+ -- copy rule (chain)+ _tlOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _hdIdefSets+ {-# LINE 3742 "Transform.hs" #-})+ -- copy rule (down)+ _tlOdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 3747 "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 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 3790 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 44, column 19)+ _lhsOblocks =+ ({-# LINE 44 "Transform.ag" #-}+ Map.empty+ {-# LINE 3795 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 3800 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 3805 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 92, column 48)+ _lhsOcollectedConstructorsMap =+ ({-# LINE 92 "Transform.ag" #-}+ Map.empty+ {-# LINE 3810 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 123, column 28)+ _lhsOcollectedFields =+ ({-# LINE 123 "Transform.ag" #-}+ []+ {-# LINE 3815 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 3820 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 3825 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 3830 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 83, column 50)+ _lhsOcollectedSetNames =+ ({-# LINE 83 "Transform.ag" #-}+ Set.empty+ {-# LINE 3835 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 3840 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 3845 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 800, column 34)+ _lhsOctxCollect =+ ({-# LINE 800 "Transform.ag" #-}+ Map.empty+ {-# LINE 3850 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 825, column 33)+ _lhsOderivings =+ ({-# LINE 825 "Transform.ag" #-}+ Map.empty+ {-# LINE 3855 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 3860 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 996, column 37)+ _lhsOmoduleDecl =+ ({-# LINE 996 "Transform.ag" #-}+ mzero+ {-# LINE 3865 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 777, column 37)+ _lhsOparamsCollect =+ ({-# LINE 777 "Transform.ag" #-}+ Map.empty+ {-# LINE 3870 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 673, column 34)+ _lhsOpragmas =+ ({-# LINE 673 "Transform.ag" #-}+ id+ {-# LINE 3875 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 3880 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 533, column 32)+ _lhsOtypeSyns =+ ({-# LINE 533 "Transform.ag" #-}+ []+ {-# LINE 3885 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 135, column 15)+ _lhsOuseMap =+ ({-# LINE 135 "Transform.ag" #-}+ Map.empty+ {-# LINE 3890 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 664, column 32)+ _lhsOwrappers =+ ({-# LINE 664 "Transform.ag" #-}+ Set.empty+ {-# LINE 3895 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOattrDecls =+ ({-# LINE 134 "Transform.ag" #-}+ _lhsIattrDecls+ {-# LINE 3900 "Transform.hs" #-})+ -- copy rule (chain)+ _lhsOdefSets =+ ({-# LINE 102 "Transform.ag" #-}+ _lhsIdefSets+ {-# LINE 3905 "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 610, column 16)+ _lhsOnontSet =+ ({-# LINE 610 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 3980 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 3985 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 3990 "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 616, column 16)+ _lhsOnontSet =+ ({-# LINE 616 "Transform.ag" #-}+ Set.difference _set1InontSet _set2InontSet+ {-# LINE 4018 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# LINE 4023 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 4028 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4033 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4038 "Transform.hs" #-})+ -- copy rule (down)+ _set1OdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4043 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4048 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4053 "Transform.hs" #-})+ -- copy rule (down)+ _set2OdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4058 "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 615, column 16)+ _lhsOnontSet =+ ({-# LINE 615 "Transform.ag" #-}+ Set.intersection _set1InontSet _set2InontSet+ {-# LINE 4090 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# LINE 4095 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 4100 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4105 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4110 "Transform.hs" #-})+ -- copy rule (down)+ _set1OdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4115 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4120 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4125 "Transform.hs" #-})+ -- copy rule (down)+ _set2OdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4130 "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 495, column 14)+ _lhsOcollectedNames =+ ({-# LINE 495 "Transform.ag" #-}+ Set.singleton name_+ {-# LINE 4149 "Transform.hs" #-})+ -- "Transform.ag"(line 611, column 20)+ __tup4 =+ ({-# LINE 611 "Transform.ag" #-}+ case Map.lookup name_ _lhsIdefinedSets of+ Nothing -> (Set.empty, Seq.singleton (UndefNont name_))+ Just set -> (set, Seq.empty)+ {-# LINE 4156 "Transform.hs" #-})+ -- "Transform.ag"(line 611, column 20)+ (_nontSet,_) =+ ({-# LINE 611 "Transform.ag" #-}+ __tup4+ {-# LINE 4161 "Transform.hs" #-})+ -- "Transform.ag"(line 611, column 20)+ (_,_errors) =+ ({-# LINE 611 "Transform.ag" #-}+ __tup4+ {-# LINE 4166 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _errors+ {-# LINE 4171 "Transform.hs" #-})+ -- copy rule (from local)+ _lhsOnontSet =+ ({-# LINE 110 "Transform.ag" #-}+ _nontSet+ {-# LINE 4176 "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 617, column 16)+ _lhsOnontSet =+ ({-# LINE 617 "Transform.ag" #-}+ let table = flattenDatas _lhsIallFields+ in path table from_ to_+ {-# LINE 4193 "Transform.hs" #-})+ -- "Transform.ag"(line 619, column 16)+ _lhsOerrors =+ ({-# LINE 619 "Transform.ag" #-}+ let check name | Set.member name _lhsIallNonterminals+ = Seq.empty+ | otherwise = Seq.singleton (UndefNont name)+ in check from_ >< check to_+ {-# LINE 4201 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ Set.empty+ {-# LINE 4206 "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 614, column 16)+ _lhsOnontSet =+ ({-# LINE 614 "Transform.ag" #-}+ Set.union _set1InontSet _set2InontSet+ {-# LINE 4234 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 84, column 50)+ _lhsOcollectedNames =+ ({-# LINE 84 "Transform.ag" #-}+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# LINE 4239 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _set1Ierrors Seq.>< _set2Ierrors+ {-# LINE 4244 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4249 "Transform.hs" #-})+ -- copy rule (down)+ _set1OallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4254 "Transform.hs" #-})+ -- copy rule (down)+ _set1OdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4259 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4264 "Transform.hs" #-})+ -- copy rule (down)+ _set2OallNonterminals =+ ({-# LINE 86 "Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4269 "Transform.hs" #-})+ -- copy rule (down)+ _set2OdefinedSets =+ ({-# LINE 105 "Transform.ag" #-}+ _lhsIdefinedSets+ {-# LINE 4274 "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 972, column 11)+ _lhsOdefinedAttrs =+ ({-# LINE 972 "Transform.ag" #-}+ (field_, attr_) : _patIdefinedAttrs+ {-# LINE 4364 "Transform.hs" #-})+ -- "Transform.ag"(line 973, column 11)+ _lhsOpatunder =+ ({-# LINE 973 "Transform.ag" #-}+ \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy+ {-# LINE 4369 "Transform.hs" #-})+ -- "Transform.ag"(line 974, column 11)+ _lhsOdefinedInsts =+ ({-# LINE 974 "Transform.ag" #-}+ (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts+ {-# LINE 4374 "Transform.hs" #-})+ -- "Transform.ag"(line 989, column 16)+ _lhsOstpos =+ ({-# LINE 989 "Transform.ag" #-}+ getPos field_+ {-# LINE 4379 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Alias field_ attr_ _patIcopy _partsIcopy+ {-# LINE 4384 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4389 "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 976, column 12)+ _lhsOpatunder =+ ({-# LINE 976 "Transform.ag" #-}+ \us -> Constr name_ (_patsIpatunder us)+ {-# LINE 4412 "Transform.hs" #-})+ -- "Transform.ag"(line 987, column 16)+ _lhsOstpos =+ ({-# LINE 987 "Transform.ag" #-}+ getPos name_+ {-# LINE 4417 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 967, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 967 "Transform.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 4422 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ _patsIdefinedInsts+ {-# LINE 4427 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Constr name_ _patsIcopy+ {-# LINE 4432 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4437 "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 978, column 17)+ _lhsOpatunder =+ ({-# LINE 978 "Transform.ag" #-}+ \us -> Irrefutable (_patIpatunder us)+ {-# LINE 4458 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 967, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 967 "Transform.ag" #-}+ _patIdefinedAttrs+ {-# LINE 4463 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ _patIdefinedInsts+ {-# LINE 4468 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Irrefutable _patIcopy+ {-# LINE 4473 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4478 "Transform.hs" #-})+ -- copy rule (up)+ _lhsOstpos =+ ({-# LINE 984 "Transform.ag" #-}+ _patIstpos+ {-# LINE 4483 "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 977, column 13)+ _lhsOpatunder =+ ({-# LINE 977 "Transform.ag" #-}+ \us -> Product pos_ (_patsIpatunder us)+ {-# LINE 4504 "Transform.hs" #-})+ -- "Transform.ag"(line 988, column 16)+ _lhsOstpos =+ ({-# LINE 988 "Transform.ag" #-}+ pos_+ {-# LINE 4509 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 967, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 967 "Transform.ag" #-}+ _patsIdefinedAttrs+ {-# LINE 4514 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ _patsIdefinedInsts+ {-# LINE 4519 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Product pos_ _patsIcopy+ {-# LINE 4524 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4529 "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 975, column 16)+ _lhsOpatunder =+ ({-# LINE 975 "Transform.ag" #-}+ \us -> _copy+ {-# LINE 4545 "Transform.hs" #-})+ -- "Transform.ag"(line 990, column 16)+ _lhsOstpos =+ ({-# LINE 990 "Transform.ag" #-}+ pos_+ {-# LINE 4550 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 967, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 967 "Transform.ag" #-}+ []+ {-# LINE 4555 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ []+ {-# LINE 4560 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ Underscore pos_+ {-# LINE 4565 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4570 "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 982, column 10)+ _lhsOpatunder =+ ({-# LINE 982 "Transform.ag" #-}+ \us -> (_hdIpatunder us) : (_tlIpatunder us)+ {-# LINE 4627 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 967, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 967 "Transform.ag" #-}+ _hdIdefinedAttrs ++ _tlIdefinedAttrs+ {-# LINE 4632 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 4637 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ (:) _hdIcopy _tlIcopy+ {-# LINE 4642 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4647 "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 981, column 9)+ _lhsOpatunder =+ ({-# LINE 981 "Transform.ag" #-}+ \us -> []+ {-# LINE 4663 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 967, column 42)+ _lhsOdefinedAttrs =+ ({-# LINE 967 "Transform.ag" #-}+ []+ {-# LINE 4668 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ []+ {-# LINE 4673 "Transform.hs" #-})+ -- self rule+ _copy =+ ({-# LINE 23 "./Patterns.ag" #-}+ []+ {-# LINE 4678 "Transform.hs" #-})+ -- self rule+ _lhsOcopy =+ ({-# LINE 23 "./Patterns.ag" #-}+ _copy+ {-# LINE 4683 "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 721, column 7)+ _pragmaNames =+ ({-# LINE 721 "Transform.ag" #-}+ Set.fromList _rulesIpragmaNamesCollect+ {-# LINE 4763 "Transform.hs" #-})+ -- "Transform.ag"(line 722, column 7)+ _lhsOsemPragmasCollect =+ ({-# LINE 722 "Transform.ag" #-}+ foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4771 "Transform.hs" #-})+ -- "Transform.ag"(line 750, column 7)+ _attrOrders =+ ({-# LINE 750 "Transform.ag" #-}+ [ orderMapSingle nt con _rulesIorderDepsCollect+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4779 "Transform.hs" #-})+ -- "Transform.ag"(line 756, column 7)+ _lhsOattrOrderCollect =+ ({-# LINE 756 "Transform.ag" #-}+ foldr orderMapUnion Map.empty _attrOrders+ {-# LINE 4784 "Transform.hs" #-})+ -- "Transform.ag"(line 901, column 12)+ _coninfo =+ ({-# LINE 901 "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 4794 "Transform.hs" #-})+ -- "Transform.ag"(line 908, column 12)+ _lhsOerrors =+ ({-# LINE 908 "Transform.ag" #-}+ Seq.fromList+ [ UndefAlt nt con+ | (nt, conset, conkeys) <- _coninfo+ , con <- Set.toList (Set.difference conset conkeys)+ ]+ {-# LINE 4803 "Transform.hs" #-})+ -- "Transform.ag"(line 913, column 12)+ _lhsOcollectedRules =+ ({-# LINE 913 "Transform.ag" #-}+ [ (nt,con,r)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ , r <- _rulesIruleInfos+ ]+ {-# LINE 4812 "Transform.hs" #-})+ -- "Transform.ag"(line 919, column 12)+ _lhsOcollectedSigs =+ ({-# LINE 919 "Transform.ag" #-}+ [ (nt,con,ts)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ , ts <- _rulesIsigInfos+ ]+ {-# LINE 4821 "Transform.hs" #-})+ -- "Transform.ag"(line 926, column 12)+ _lhsOcollectedInsts =+ ({-# LINE 926 "Transform.ag" #-}+ [ (nt,con,_rulesIdefinedInsts)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4829 "Transform.hs" #-})+ -- "Transform.ag"(line 932, column 12)+ _lhsOcollectedUniques =+ ({-# LINE 932 "Transform.ag" #-}+ [ (nt,con,_rulesIuniqueInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4837 "Transform.hs" #-})+ -- "Transform.ag"(line 938, column 12)+ _lhsOcollectedAugments =+ ({-# LINE 938 "Transform.ag" #-}+ [ (nt, con, _rulesIaugmentInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4845 "Transform.hs" #-})+ -- "Transform.ag"(line 944, column 12)+ _lhsOcollectedArounds =+ ({-# LINE 944 "Transform.ag" #-}+ [ (nt, con, _rulesIaroundInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 4853 "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 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+ {-# LINE 4945 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ _hdIcollectedArounds ++ _tlIcollectedArounds+ {-# LINE 4950 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ _hdIcollectedAugments ++ _tlIcollectedAugments+ {-# LINE 4955 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ _hdIcollectedInsts ++ _tlIcollectedInsts+ {-# LINE 4960 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ _hdIcollectedRules ++ _tlIcollectedRules+ {-# LINE 4965 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ _hdIcollectedSigs ++ _tlIcollectedSigs+ {-# LINE 4970 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ _hdIcollectedUniques ++ _tlIcollectedUniques+ {-# LINE 4975 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ _hdIerrors Seq.>< _tlIerrors+ {-# LINE 4980 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+ {-# LINE 4985 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallAttrDecls =+ ({-# LINE 746 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 4990 "Transform.hs" #-})+ -- copy rule (down)+ _hdOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 4995 "Transform.hs" #-})+ -- copy rule (down)+ _hdOnts =+ ({-# LINE 163 "Transform.ag" #-}+ _lhsInts+ {-# LINE 5000 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallAttrDecls =+ ({-# LINE 746 "Transform.ag" #-}+ _lhsIallAttrDecls+ {-# LINE 5005 "Transform.hs" #-})+ -- copy rule (down)+ _tlOallFields =+ ({-# LINE 126 "Transform.ag" #-}+ _lhsIallFields+ {-# LINE 5010 "Transform.hs" #-})+ -- copy rule (down)+ _tlOnts =+ ({-# LINE 163 "Transform.ag" #-}+ _lhsInts+ {-# LINE 5015 "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 745, column 55)+ _lhsOattrOrderCollect =+ ({-# LINE 745 "Transform.ag" #-}+ Map.empty+ {-# LINE 5039 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 153, column 32)+ _lhsOcollectedArounds =+ ({-# LINE 153 "Transform.ag" #-}+ []+ {-# LINE 5044 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 152, column 32)+ _lhsOcollectedAugments =+ ({-# LINE 152 "Transform.ag" #-}+ []+ {-# LINE 5049 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 150, column 32)+ _lhsOcollectedInsts =+ ({-# LINE 150 "Transform.ag" #-}+ []+ {-# LINE 5054 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 148, column 32)+ _lhsOcollectedRules =+ ({-# LINE 148 "Transform.ag" #-}+ []+ {-# LINE 5059 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 149, column 32)+ _lhsOcollectedSigs =+ ({-# LINE 149 "Transform.ag" #-}+ []+ {-# LINE 5064 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 151, column 32)+ _lhsOcollectedUniques =+ ({-# LINE 151 "Transform.ag" #-}+ []+ {-# LINE 5069 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 42, column 19)+ _lhsOerrors =+ ({-# LINE 42 "Transform.ag" #-}+ Seq.empty+ {-# LINE 5074 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 717, column 56)+ _lhsOsemPragmasCollect =+ ({-# LINE 717 "Transform.ag" #-}+ Map.empty+ {-# LINE 5079 "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 : {[Occurrence]}+ child after : {[Occurrence]}+ visit 0:+ local dependency : _+ alternative AugmentDef:+ child ident : {Identifier}+ child rhs : {Expression}+ alternative Def:+ child pos : {Pos}+ child mbName : {Maybe Identifier}+ child pattern : Pattern + child rhs : {Expression}+ child owrt : {Bool}+ alternative SemPragma:+ child names : {[NontermIdent]}+ alternative TypeDef:+ child ident : {Identifier}+ child tp : {Type}+ alternative UniqueDef:+ child ident : {Identifier}+ child ref : {Identifier}+-}+-- cata+sem_SemDef :: SemDef ->+ T_SemDef +sem_SemDef (AroundDef _ident _rhs ) =+ (sem_SemDef_AroundDef _ident _rhs )+sem_SemDef (AttrOrderBefore _before _after ) =+ (sem_SemDef_AttrOrderBefore _before _after )+sem_SemDef (AugmentDef _ident _rhs ) =+ (sem_SemDef_AugmentDef _ident _rhs )+sem_SemDef (Def _pos _mbName _pattern _rhs _owrt ) =+ (sem_SemDef_Def _pos _mbName (sem_Pattern _pattern ) _rhs _owrt )+sem_SemDef (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 963, column 17)+ _lhsOaroundInfos =+ ({-# LINE 963 "Transform.ag" #-}+ [ (ident_, rhs_) ]+ {-# LINE 5164 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 895, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 895 "Transform.ag" #-}+ []+ {-# LINE 5169 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ []+ {-# LINE 5174 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 758, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 758 "Transform.ag" #-}+ Set.empty+ {-# LINE 5179 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 727, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 727 "Transform.ag" #-}+ []+ {-# LINE 5184 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 892, column 40)+ _lhsOruleInfos =+ ({-# LINE 892 "Transform.ag" #-}+ []+ {-# LINE 5189 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 893, column 40)+ _lhsOsigInfos =+ ({-# LINE 893 "Transform.ag" #-}+ []+ {-# LINE 5194 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 894, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 894 "Transform.ag" #-}+ []+ {-# LINE 5199 "Transform.hs" #-})+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_AttrOrderBefore :: ([Occurrence]) ->+ ([Occurrence]) ->+ T_SemDef +sem_SemDef_AttrOrderBefore before_ after_ =+ (T_SemDef (let _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOruleInfos :: ([RuleInfo])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ -- "Transform.ag"(line 762, column 7)+ _dependency =+ ({-# LINE 762 "Transform.ag" #-}+ [ Dependency b a | b <- before_, a <- after_ ]+ {-# LINE 5217 "Transform.hs" #-})+ -- "Transform.ag"(line 763, column 7)+ _lhsOorderDepsCollect =+ ({-# LINE 763 "Transform.ag" #-}+ Set.fromList _dependency+ {-# LINE 5222 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 896, column 40)+ _lhsOaroundInfos =+ ({-# LINE 896 "Transform.ag" #-}+ []+ {-# LINE 5227 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 895, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 895 "Transform.ag" #-}+ []+ {-# LINE 5232 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ []+ {-# LINE 5237 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 727, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 727 "Transform.ag" #-}+ []+ {-# LINE 5242 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 892, column 40)+ _lhsOruleInfos =+ ({-# LINE 892 "Transform.ag" #-}+ []+ {-# LINE 5247 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 893, column 40)+ _lhsOsigInfos =+ ({-# LINE 893 "Transform.ag" #-}+ []+ {-# LINE 5252 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 894, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 894 "Transform.ag" #-}+ []+ {-# LINE 5257 "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 960, column 17)+ _lhsOaugmentInfos =+ ({-# LINE 960 "Transform.ag" #-}+ [ (ident_, rhs_) ]+ {-# LINE 5275 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 896, column 40)+ _lhsOaroundInfos =+ ({-# LINE 896 "Transform.ag" #-}+ []+ {-# LINE 5280 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ []+ {-# LINE 5285 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 758, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 758 "Transform.ag" #-}+ Set.empty+ {-# LINE 5290 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 727, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 727 "Transform.ag" #-}+ []+ {-# LINE 5295 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 892, column 40)+ _lhsOruleInfos =+ ({-# LINE 892 "Transform.ag" #-}+ []+ {-# LINE 5300 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 893, column 40)+ _lhsOsigInfos =+ ({-# LINE 893 "Transform.ag" #-}+ []+ {-# LINE 5305 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 894, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 894 "Transform.ag" #-}+ []+ {-# LINE 5310 "Transform.hs" #-})+ in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )+sem_SemDef_Def :: Pos ->+ (Maybe Identifier) ->+ T_Pattern ->+ Expression ->+ Bool ->+ T_SemDef +sem_SemDef_Def pos_ mbName_ (T_Pattern pattern_ ) rhs_ owrt_ =+ (T_SemDef (let _lhsOruleInfos :: ([RuleInfo])+ _lhsOaroundInfos :: ([AroundInfo])+ _lhsOaugmentInfos :: ([AugmentInfo])+ _lhsOdefinedInsts :: ([Identifier])+ _lhsOorderDepsCollect :: (Set Dependency)+ _lhsOpragmaNamesCollect :: ([Identifier])+ _lhsOsigInfos :: ([SigInfo])+ _lhsOuniqueInfos :: ([UniqueInfo])+ _patternIcopy :: Pattern + _patternIdefinedAttrs :: ([AttrName])+ _patternIdefinedInsts :: ([Identifier])+ _patternIpatunder :: ([AttrName]->Pattern)+ _patternIstpos :: Pos+ -- "Transform.ag"(line 951, column 10)+ _lhsOruleInfos =+ ({-# LINE 951 "Transform.ag" #-}+ [ (mbName_, _patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos) ]+ {-# LINE 5336 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 896, column 40)+ _lhsOaroundInfos =+ ({-# LINE 896 "Transform.ag" #-}+ []+ {-# LINE 5341 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 895, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 895 "Transform.ag" #-}+ []+ {-# LINE 5346 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ _patternIdefinedInsts+ {-# LINE 5351 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 758, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 758 "Transform.ag" #-}+ Set.empty+ {-# LINE 5356 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 727, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 727 "Transform.ag" #-}+ []+ {-# LINE 5361 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 893, column 40)+ _lhsOsigInfos =+ ({-# LINE 893 "Transform.ag" #-}+ []+ {-# LINE 5366 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 894, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 894 "Transform.ag" #-}+ []+ {-# LINE 5371 "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 731, column 7)+ _lhsOpragmaNamesCollect =+ ({-# LINE 731 "Transform.ag" #-}+ names_+ {-# LINE 5390 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 896, column 40)+ _lhsOaroundInfos =+ ({-# LINE 896 "Transform.ag" #-}+ []+ {-# LINE 5395 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 895, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 895 "Transform.ag" #-}+ []+ {-# LINE 5400 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ []+ {-# LINE 5405 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 758, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 758 "Transform.ag" #-}+ Set.empty+ {-# LINE 5410 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 892, column 40)+ _lhsOruleInfos =+ ({-# LINE 892 "Transform.ag" #-}+ []+ {-# LINE 5415 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 893, column 40)+ _lhsOsigInfos =+ ({-# LINE 893 "Transform.ag" #-}+ []+ {-# LINE 5420 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 894, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 894 "Transform.ag" #-}+ []+ {-# LINE 5425 "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 954, column 14)+ _lhsOsigInfos =+ ({-# LINE 954 "Transform.ag" #-}+ [ (ident_, tp_) ]+ {-# LINE 5443 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 896, column 40)+ _lhsOaroundInfos =+ ({-# LINE 896 "Transform.ag" #-}+ []+ {-# LINE 5448 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 895, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 895 "Transform.ag" #-}+ []+ {-# LINE 5453 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ []+ {-# LINE 5458 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 758, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 758 "Transform.ag" #-}+ Set.empty+ {-# LINE 5463 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 727, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 727 "Transform.ag" #-}+ []+ {-# LINE 5468 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 892, column 40)+ _lhsOruleInfos =+ ({-# LINE 892 "Transform.ag" #-}+ []+ {-# LINE 5473 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 894, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 894 "Transform.ag" #-}+ []+ {-# LINE 5478 "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 957, column 16)+ _lhsOuniqueInfos =+ ({-# LINE 957 "Transform.ag" #-}+ [ (ident_, ref_) ]+ {-# LINE 5496 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 896, column 40)+ _lhsOaroundInfos =+ ({-# LINE 896 "Transform.ag" #-}+ []+ {-# LINE 5501 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 895, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 895 "Transform.ag" #-}+ []+ {-# LINE 5506 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ []+ {-# LINE 5511 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 758, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 758 "Transform.ag" #-}+ Set.empty+ {-# LINE 5516 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 727, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 727 "Transform.ag" #-}+ []+ {-# LINE 5521 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 892, column 40)+ _lhsOruleInfos =+ ({-# LINE 892 "Transform.ag" #-}+ []+ {-# LINE 5526 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 893, column 40)+ _lhsOsigInfos =+ ({-# LINE 893 "Transform.ag" #-}+ []+ {-# LINE 5531 "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 896, column 40)+ _lhsOaroundInfos =+ ({-# LINE 896 "Transform.ag" #-}+ _hdIaroundInfos ++ _tlIaroundInfos+ {-# LINE 5599 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 895, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 895 "Transform.ag" #-}+ _hdIaugmentInfos ++ _tlIaugmentInfos+ {-# LINE 5604 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# LINE 5609 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 758, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 758 "Transform.ag" #-}+ _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect+ {-# LINE 5614 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 727, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 727 "Transform.ag" #-}+ _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect+ {-# LINE 5619 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 892, column 40)+ _lhsOruleInfos =+ ({-# LINE 892 "Transform.ag" #-}+ _hdIruleInfos ++ _tlIruleInfos+ {-# LINE 5624 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 893, column 40)+ _lhsOsigInfos =+ ({-# LINE 893 "Transform.ag" #-}+ _hdIsigInfos ++ _tlIsigInfos+ {-# LINE 5629 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 894, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 894 "Transform.ag" #-}+ _hdIuniqueInfos ++ _tlIuniqueInfos+ {-# LINE 5634 "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 896, column 40)+ _lhsOaroundInfos =+ ({-# LINE 896 "Transform.ag" #-}+ []+ {-# LINE 5654 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 895, column 40)+ _lhsOaugmentInfos =+ ({-# LINE 895 "Transform.ag" #-}+ []+ {-# LINE 5659 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 966, column 55)+ _lhsOdefinedInsts =+ ({-# LINE 966 "Transform.ag" #-}+ []+ {-# LINE 5664 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 758, column 44)+ _lhsOorderDepsCollect =+ ({-# LINE 758 "Transform.ag" #-}+ Set.empty+ {-# LINE 5669 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 727, column 46)+ _lhsOpragmaNamesCollect =+ ({-# LINE 727 "Transform.ag" #-}+ []+ {-# LINE 5674 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 892, column 40)+ _lhsOruleInfos =+ ({-# LINE 892 "Transform.ag" #-}+ []+ {-# LINE 5679 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 893, column 40)+ _lhsOsigInfos =+ ({-# LINE 893 "Transform.ag" #-}+ []+ {-# LINE 5684 "Transform.hs" #-})+ -- use rule "Transform.ag"(line 894, column 40)+ _lhsOuniqueInfos =+ ({-# LINE 894 "Transform.ag" #-}+ []+ {-# LINE 5689 "Transform.hs" #-}) in ( _lhsOaroundInfos,_lhsOaugmentInfos,_lhsOdefinedInsts,_lhsOorderDepsCollect,_lhsOpragmaNamesCollect,_lhsOruleInfos,_lhsOsigInfos,_lhsOuniqueInfos)) )
src-derived/Visage.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (Visage.ag)+-- UUAGC 0.9.24 (Visage.ag) module Visage where {-# LINE 6 "Visage.ag" #-} @@ -173,7 +173,7 @@ -- semantic domain newtype T_VisageChildren = T_VisageChildren (( ([ATerm]))) data Inh_VisageChildren = Inh_VisageChildren {}-data Syn_VisageChildren = Syn_VisageChildren {aterms_Syn_VisageChildren :: [ATerm]}+data Syn_VisageChildren = Syn_VisageChildren {aterms_Syn_VisageChildren :: ([ATerm])} wrap_VisageChildren :: T_VisageChildren -> Inh_VisageChildren -> Syn_VisageChildren @@ -309,7 +309,7 @@ -- semantic domain newtype T_VisageNonterminals = T_VisageNonterminals (( ([ATerm]))) data Inh_VisageNonterminals = Inh_VisageNonterminals {}-data Syn_VisageNonterminals = Syn_VisageNonterminals {aterms_Syn_VisageNonterminals :: [ATerm]}+data Syn_VisageNonterminals = Syn_VisageNonterminals {aterms_Syn_VisageNonterminals :: ([ATerm])} wrap_VisageNonterminals :: T_VisageNonterminals -> Inh_VisageNonterminals -> Syn_VisageNonterminals @@ -477,7 +477,7 @@ -- semantic domain newtype T_VisagePatterns = T_VisagePatterns (( ([ATerm]))) data Inh_VisagePatterns = Inh_VisagePatterns {}-data Syn_VisagePatterns = Syn_VisagePatterns {aterms_Syn_VisagePatterns :: [ATerm]}+data Syn_VisagePatterns = Syn_VisagePatterns {aterms_Syn_VisagePatterns :: ([ATerm])} wrap_VisagePatterns :: T_VisagePatterns -> Inh_VisagePatterns -> Syn_VisagePatterns @@ -594,7 +594,7 @@ -- semantic domain newtype T_VisageProductions = T_VisageProductions (( ([ATerm]))) data Inh_VisageProductions = Inh_VisageProductions {}-data Syn_VisageProductions = Syn_VisageProductions {aterms_Syn_VisageProductions :: [ATerm]}+data Syn_VisageProductions = Syn_VisageProductions {aterms_Syn_VisageProductions :: ([ATerm])} wrap_VisageProductions :: T_VisageProductions -> Inh_VisageProductions -> Syn_VisageProductions @@ -704,7 +704,7 @@ newtype T_VisageRules = T_VisageRules (Bool -> ( ([ATerm]))) data Inh_VisageRules = Inh_VisageRules {isLoc_Inh_VisageRules :: Bool}-data Syn_VisageRules = Syn_VisageRules {aterms_Syn_VisageRules :: [ATerm]}+data Syn_VisageRules = Syn_VisageRules {aterms_Syn_VisageRules :: ([ATerm])} wrap_VisageRules :: T_VisageRules -> Inh_VisageRules -> Syn_VisageRules
src-derived/VisagePatterns.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (VisagePatterns.ag)+-- UUAGC 0.9.24 (VisagePatterns.ag) module VisagePatterns where {-# LINE 2 "VisagePatterns.ag" #-} @@ -26,9 +26,9 @@ child field : {Identifier} child attr : {Identifier} -}-data VisagePattern = VAlias (Identifier) (Identifier) (VisagePattern) - | VConstr (ConstructorIdent) (VisagePatterns) - | VProduct (Pos) (VisagePatterns) +data VisagePattern = VAlias (Identifier) (Identifier) (VisagePattern ) + | VConstr (ConstructorIdent) (VisagePatterns ) + | VProduct (Pos) (VisagePatterns ) | VUnderscore (Pos) | VVar (Identifier) (Identifier) -- VisagePatterns ----------------------------------------------@@ -39,4 +39,4 @@ child tl : VisagePatterns alternative Nil: -}-type VisagePatterns = [(VisagePattern)]+type VisagePatterns = [VisagePattern ]
src-derived/VisageSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.21 (VisageSyntax.ag)+-- UUAGC 0.9.24 (VisageSyntax.ag) module VisageSyntax where {-# LINE 2 "VisageSyntax.ag" #-} @@ -20,7 +20,7 @@ child syn : {Attributes} child rules : VisageRules -}-data VisageChild = VChild (Identifier) (Type) (Attributes) (Attributes) (VisageRules) +data VisageChild = VChild (Identifier) (Type) (Attributes) (Attributes) (VisageRules ) -- VisageChildren ---------------------------------------------- {- alternatives:@@ -29,14 +29,14 @@ child tl : VisageChildren alternative Nil: -}-type VisageChildren = [(VisageChild)]+type VisageChildren = [VisageChild ] -- VisageGrammar ----------------------------------------------- {- alternatives: alternative VGrammar: child nonts : VisageNonterminals -}-data VisageGrammar = VGrammar (VisageNonterminals) +data VisageGrammar = VGrammar (VisageNonterminals ) -- VisageNonterminal ------------------------------------------- {- alternatives:@@ -46,7 +46,7 @@ child syn : {Attributes} child alts : VisageProductions -}-data VisageNonterminal = VNonterminal (NontermIdent) (Attributes) (Attributes) (VisageProductions) +data VisageNonterminal = VNonterminal (NontermIdent) (Attributes) (Attributes) (VisageProductions ) -- VisageNonterminals ------------------------------------------ {- alternatives:@@ -55,7 +55,7 @@ child tl : VisageNonterminals alternative Nil: -}-type VisageNonterminals = [(VisageNonterminal)]+type VisageNonterminals = [VisageNonterminal ] -- VisageProduction -------------------------------------------- {- alternatives:@@ -65,7 +65,7 @@ child rules : VisageRules child locrules : VisageRules -}-data VisageProduction = VProduction (ConstructorIdent) (VisageChildren) (VisageRules) (VisageRules) +data VisageProduction = VProduction (ConstructorIdent) (VisageChildren ) (VisageRules ) (VisageRules ) -- VisageProductions ------------------------------------------- {- alternatives:@@ -74,7 +74,7 @@ child tl : VisageProductions alternative Nil: -}-type VisageProductions = [(VisageProduction)]+type VisageProductions = [VisageProduction ] -- VisageRule -------------------------------------------------- {- alternatives:@@ -85,7 +85,7 @@ child rhs : {Expression} child owrt : {Bool} -}-data VisageRule = VRule ([(Identifier,Identifier)]) (Identifier) (VisagePattern) (Expression) (Bool) +data VisageRule = VRule (([(Identifier,Identifier)])) (Identifier) (VisagePattern) (Expression) (Bool) -- VisageRules ------------------------------------------------- {- alternatives:@@ -94,4 +94,4 @@ child tl : VisageRules alternative Nil: -}-type VisageRules = [(VisageRule)]+type VisageRules = [VisageRule ]
src/Ag.hs view
@@ -91,28 +91,26 @@ Seq.>< Pass2.errors_Syn_Grammar output2 ) furtherErrors = toList ( Pass3.errors_Syn_Grammar output3 Seq.>< Pass4.errors_Syn_CGrammar output4)- - errorList = parseErrorList- ++ mainErrors- ++ if null mainErrors || null (filter (PrErr.isError flags') mainErrors)- then furtherErrors- else []++ errorList = if null parseErrorList+ then mainErrors+ ++ if null mainErrors || null (filter (PrErr.isError flags') mainErrors)+ then furtherErrors+ else []+ else [head parseErrorList] fatalErrorList = filter (PrErr.isError flags') errorList - allErrors = if null parseErrors- then if wignore flags'- then fatalErrorList- else errorsToFront flags' errorList- else take 1 parseErrorList- -- the other 1000 or so parse errors are usually not that informative- + allErrors = if wignore flags'+ then fatalErrorList+ else errorsToFront flags' errorList+ errorsToReport = take (wmaxerrs flags') allErrors errorsToStopOn = if werrors flags' then errorList else fatalErrorList- + blocks1 = (Pass1.blocks_Syn_AG output1) {-SM `Map.unionWith (++)` (Pass3.blocks_Syn_Grammar output3)-} (pragmaBlocks, blocks2) = Map.partitionWithKey (\(k, at) _->k==BlockPragma && at == Nothing) blocks1 (importBlocks, textBlocks) = Map.partitionWithKey (\(k, at) _->k==BlockImport && at == Nothing) blocks2@@ -299,7 +297,7 @@ reportDeps flags files = do results <- mapM (depsAG flags (searchPath flags)) files let (fs, mesgs) = foldr combine ([],[]) results- let errs = take (wmaxerrs flags) (map message2error mesgs)+ let errs = take (min 1 (wmaxerrs flags)) (map message2error mesgs) let ppErrs = PrErr.wrap_Errors (PrErr.sem_Errors errs) PrErr.Inh_Errors {PrErr.options_Inh_Errors = flags} if null errs then mapM_ putStrLn fs
src/Version.hs view
@@ -1,4 +1,4 @@ module Version where banner :: String -banner = "Attribute Grammar compiler / HUT project. Version 0.9.24" +banner = "Attribute Grammar compiler / HUT project. Version 0.9.26"
uuagc.cabal view
@@ -1,7 +1,7 @@ cabal-version: >=1.2 build-type: Simple name: uuagc-version: 0.9.24+version: 0.9.26 license: GPL license-file: LICENSE maintainer: Arie Middelkoop <ariem@cs.uu.nl>
uuagc.cabal-for-ghc-6.6 view
@@ -1,5 +1,5 @@ name: uuagc-version: 0.9.24+version: 0.9.26 license: GPL license-file: LICENSE maintainer: Arie Middelkoop <ariem@cs.uu.nl>